Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
What is the "turnover"

I looked a bit on the web, but I really do not understand it!
So could someone explain me with non-technical words what is the turnover of a strategy?
Then you can set the turnover constrain in the portfolio optimization, what is the effect of this number? What it means if I set it to 0.1 or to 1.0?
Thanks in advance.

4 responses

In non-technical words it is a measure of how much the portfolio changes in a given time frame, on a dollar basis. For the kind of algos Q wants, you want it to be closer to 0.1 than to 1.0, on a daily basis (and have few, if any spikes to large values).

If you look at http://www.morningstar.com/InvGlossary/turnover_ratio.aspx, it is basically saying that if nothing is purchased or nothing is sold, then there is no turnover. In the case of both purchases and sales, suppose the two are equal, and equal to the denominator, which is the total in the portfolio (everything in dollars). Then you get 100% turnover, which is intuitive, since you purchased the total portfolio value, and at the same time sold it (e.g. you went from SPY to BSV, i.e. all stocks to all bonds). If you purchase 50% of the portfolio value and sell 25% of it, then half of the purchase went to increasing the portfolio value, and half went to matching what was sold, 25% of the portfolio value. It's the matching part of the two transactions that matter in the turnover. So, you'd end up with 25% turnover.

By the way, be careful with the turnover constraint, since it can crash the optimizer. I suggest using a try-except structure to avoid a crash, when running the optimization (e.g. with order_optimal_portfolio).

Daily turnover is a measure of an algorithm's trading activity. It's basically

absolute value of trades in a day  /  portfolio value

It can also be a percent of the securities held value (called "actual gross book" which is the same as above but excludes cash) but for the Q contest total portfolio value is used. (The rules say that actual gross book is used however, when testing, it appears that they include cash. See attached backtest). Here's a link to the pyfolio code which is used https://github.com/quantopian/pyfolio/blob/master/pyfolio/txn.py#L149 .

As an example, assume a portfolio with a total value of $100k with $20k in securities and $80k in cash. If one sells all $20k of securities one day and then buys them back the next, this results in a daily turnover of 20%. However if one were to sell all $20k worth of securities and buy $20k back in the same day, then the portfolio would have a 40% turnover. Notice that an algorithm which trades all of it's securities each day will have a turnover of 200% and not 100% (what might be expected).

The Quantopian contest requires :

entries must have a mean daily turnover between 5%-65% measured over a 63-trading-day rolling window.
Turnover is defined as amount of
capital traded divided by the actual gross book (gross market value).
For algorithms that trade once per day, Turnover ranges from 0-200%
(200% means the algorithm completely moved its capital from one set of
assets to another). Entries are allowed to have as little as 3%
rolling mean daily turnover on up to 2% of trading days in the
backtest used to check criteria. In addition, entries are allowed to
have as much as 80% rolling mean daily turnover on 2% of trading days
in the same backtest.

Hope that helps.

oops forgot to attach the backtest

Hmm? So it would seem that Q is not using the same definition as described on http://www.morningstar.com/InvGlossary/turnover_ratio.aspx, but perhaps I'm misinterpreting it? One would think that if in one day, the portfolio were moved from stocks to bonds, this would equate to 100% turnover, but it would be 200% under the Q definition?

On https://www.fool.com/knowledge-center/how-to-calculate-the-turnover-ratio-for-mutual-fun.aspx, they give an example:

The turnover ratio is usually expressed in percent. For instance, if a fund purchased and sold $5 million in assets and had average assets of $50 million, then the resulting answer of 0.1 is translated to a turnover ratio of 10%.

Per the Quantopian definition, this would be 20% turnover?

Why not use the conventional definition, which seems to make sense to me (e.g. in the case of a 2 stock portfolio, moving everything from one stock to the other should equate to 100% turnover, which I think is what the conventional definition would yield).