- ago
I have been back-testing an academic paper that examines the relations between the MOVE index and the VIX. The code below is certainly not a strategy that is tradeable but it seems to show that there is information contained in the MOVE / VIX ratio that could be incorporated in other trading strategies.
Source papers:
https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5001821
https://alphainacademia.substack.com/p/a-strategy-for-the-post-pandemic

I have deviated from the original paper which used a linear fit between MOVE and VIX and used the residuals as a signal. The strategy below uses the ratio of MOVE/VIX and purchases at low values of the ratio. This could be interpreted as situations where equity markets are over-reacting compared to bond markets.

I used SPXL as the underlying and used yahoo data for MOVE and VIX. ( MOVE data is from CBOE but WL does not have it added).





CODE:
// Use the ratio of MOVE to VIX to determine corret timing for long entry. // <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5001821" target="_blank">https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5001821</a> // <a href="https://alphainacademia.substack.com/p/a-strategy-for-the-post-pandemic" target="_blank">https://alphainacademia.substack.com/p/a-strategy-for-the-post-pandemic</a> using WealthLab.Backtest; using System; using WealthLab.Core; using System.Linq; namespace WealthScript14 { public class DFG : UserStrategyBase {       string VIX = "^VIX", MOVE = "^MOVE";       BarHistory MOVE_bars, VIX_bars;       int MAPeriod = 100;       double Threshold , VIX_Upper;       TimeSeries close1, close2, ActualRatio, ActualRatioSMA, Delta;              public DFG() : base()       {          AddParameter("Threshold", ParameterType.Double, 3.0, 1.0, 6.0, 0.5);          }       public override void Initialize(BarHistory bars) {          VIX_bars = GetPairHistory(bars, VIX);          MOVE_bars = GetPairHistory(bars, MOVE);          Threshold = Parameters[0].AsDouble;                   ActualRatio = MOVE_bars.Close / VIX_bars.Close;          PlotTimeSeries(ActualRatio, "Ratio " + MOVE + "/" + VIX, "RatioPane", WLColor.Navy);          StartIndex = MAPeriod;       } public override void Execute(BarHistory bars, int idx) {                            if ( GetPositions().Where(p => p.IsOpen == true).Count() == 0 && ActualRatio[idx] < Threshold )          {                PlaceTrade(bars, TransactionType.Buy, OrderType.Market, 0, "Buy" );          }          else          if (ActualRatio[idx] > Threshold )          {                      PlaceTrade(bars, TransactionType.Sell, OrderType.Market, 0, "Sell" );          } } } }


0
28
0 Replies

Reply

Bookmark

Sort
Currently there are no replies yet. Please check back later.