Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Simple 2 Asset Rotation Strategy - 1st project

Hi all,

This is less of a strategy than it is simply a first test project to get my feet wet coding as opposed to relying on 3rd party backtesters and alerts. I would welcome any suggestions or changes.

The strategy is very simple: take 2 assets and, at the end of each month, allocate 100% of the portfolio to the better performer over the past n months. That's it. For the test, I used an S&P 500 Growth ETF and an S&P 500 Value ETF in an attempt to replicate the S&P 500 Growth Value Rotator Index (link is in the code). I purposely left out slippage and commissions for this first run.

Questions for anyone willing to answer: Is there a better / more efficient way to do this? Perhaps so that I could add x number of securities and chose the top n in terms of total return over a defined time period? I have searched through the Forum and wasn't able to find something this simple.

Thanks in advance for any feedback / help.

2 responses

@Michael,

a good idea.
There is some problem with liquidity and as the result excess leverage if you are trading the strategy
near the close of the market.
To avoid this problem, I would recommend trading it near the opening of the market.

Thanks Vladimir! This is very helpful.