Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Is limiting turnover the best way to control slippage impact?

Hi all

Just got my first Algo declined from contest acceptance due to negative Total Returns.

In my backtests, my Algo has positive 7% Total Returns for the 2 year backtest period, whereas when Q checked the backtest for the contest qualification it produced -8% for the same.

Turns out I was not allowing for slippage costs!

When I removed my slippage constraint, the Total Returns matched.

My Algo does have a high turnover rate of 61%.

I'm not certain what the default slippage is for the contest, but have seen the figure of 5 bps pr trade mentioned in the forums?

Assuming 500 trading days in the backtest period, and 61% daily turnover, is the total slippage costs looks like: 500* 61* 0.0005 = 15%

Should I focus on slashing the daily turnover? I can see my problem will then be that am pushing up against individual position size limits.

Thanks

5 responses

OK, that worked!

Specify in the order optimiser constraints that daily turnover should not exceed 0.20, and now my 2 yr backtest is positive even after the default commission and slippage.

My only reservation here is that I have no idea what the heck the Optimiser does, but I guess that's none of my concern.

"Is limiting turnover the best way to control slippage impact?": In my opinion, no. It is a valid strategy, but not the best strategy.

Lower turnover means lower transactions costs, but there's another way to approach the issue. Instead of artificially constraining turnover to lower transaction costs, why not try to improve your short term alpha factors (short term sentiment data, technical indicators, etc), so that the turnover is profitable? In that sense, slippage isn't increased, but the negative effects of high turnover are.

I had a good laugh at "My only reservation here is that I have no idea what the heck the Optimiser does, but I guess that's none of my concern." If you are interested to learn more about how the optimizer works, this post is worth reading.

I'd be interested to know what some of our community members do to lower transaction costs, without artificially constraining leverage.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Tks @Cal - I will have a read, but to be honest I'm more confident in the potential from refining my Alpha than from tweaking the optimiser. I understand the need for such an optimiser as it productises the Algos and makes them marketable. Thats cool with me!

Right now, since the Total Return is back positive with default commission and slippage I'm keen to just submit the Algo, so that at least I'm in the game.

I will then pursue your advice on improving my Alpha on a V2.

New problem has presented itself. The Structural requirement that I use the QtradeableUniverseUS has now flipped from Pass to Fail.

The Algo has been passing this test happily until I made the change to constrain the turnover (the way I overcame the high slippage costs was to hardcap turnover at 20% daily).

Has this come up before? I'm specifying the use of the QtradeableStocksUS universe in my Pipeline (have been from the start of development several weeks back).

Appreciate the support! :-)

I'd be interested to know what some of our community members do to
lower transaction costs, without artificially constraining leverage.

You could increase the rebalancing from e.g. daily to weekly, or increase the number of positions held. However, if a strategy is losing money due to slippage, that to me is indicating that the alpha isn't strong enough to survive real market conditions. Best thing in my view is to go back to research and Alphalens and try to find a stronger alpha factor combination.

Has this come up before? I'm specifying the use of the
QtradeableStocksUS universe in my Pipeline (have been from the start
of development several weeks back).

I've seen this before but not in awhile. I don't know why it happens, but possibly because there are too many 'constraints' so the Optimizer can't find enough stocks within the Universe. How many positions are you holding each side? Try increasing this might enable to Optimizer to find enough positions withing the QTU to trade?

I've seen this before but not in awhile. I don't know why it happens, but possibly because there are too many 'constraints' so the Optimizer can't find enough stocks within the Universe. How many positions are you holding each side? Try increasing this might enable to Optimizer to find enough positions withing the QTU to trade?

I see, makes sense. A minimum of 5 new longs and shorts entered each day and held for 6 days. So always at least 30 pos either side. I will increase.

On the issue about Slippage, yes point taken. I won't flog a dead horse.

Thanks