I attempted to replicate the implied-volatility term structure strategy that Euan Sinclair outlined in Volatility Trading (2e). He used VIX/VXV as an implied-volatility term structure (IVTS) and then specified weights on VXX and VXZ (see below). I attempted to replicate the strategy by borrowing Simon's code from (https://www.quantopian.com/posts/poor-mans-risk-premia-and-the-vix-term-structure). Since I am inexperienced with Quantopian, I was unable to have the backtest match the book's results. I suspect there might be a problem with the way I handled the rebalancing or position sizing (book said "We assume we start with $100 and continue to
reinvest all the money at our disposal." On a similar note, I would appreciate it if someone could also clarify why these specific weights were chosen instead of just using 1 as the threshold.
Weights
If IVTS<=.91, then -.6 VXX & .4 VXZ
If .91<IVTS<=.97, then -.32 VXX & .68 VXZ
If .97<IVTS<=1.05, then -.25 VXX & .75 VXZ
If IVTS>1.05, then -.1 VXX & .9 VXZ