Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Can someone backtest this portfolio?

Using the SPDR ETFs:

XLY
XLP
XLE
XLF
XLV
XLI
XLB
XLRE
XLK
XLU

If you re-balanced a portfolio on the first trading day of each year and weighted the sectors with the worst performing sector getting the highest allocation (20% being the ceiling) and best performing sector (from the past year) getting the lowest (2% being the floor), how would this portfolio perform over time? Each sector must have at least a 2% allocation and the "middle" sector ETFs should have relative allocations based on the look-back period performance (in other words, they would have allocations reflecting the inverse of their look-back period performance). What about with a 2/3/4/5 year look-back period for determining the new yearly sector weightings?

Thanks in advance for any help!