Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Backtesting needed for basic ETF strategy

I'm in need of someone who can help put together a backtesting strategy for our investment model. For the most part we use the S&P 500 to trigger the selling of certain fixed income positions and moving them to our equity allocation until a recover is triggered. At that point we rebalance back to our original allocation.

1 response

Brady, this algo lays the groundwork for what you are trying to do. It starts by putting ~66% of the portfolio in equities. When the price of S&P goes above $180, it starts raising cash until the portfolio is allocated ~40% equities, ~60% cash. If the price of the S&P dips below $150, it starts to increase allocation into equities up to the original ~66%.