You may have noticed that the CBOE Volatility Index, the VIX, is now part of Portfolio123 and accessible through the GetSeries function. Not only is this a useful index in and of itself, as some users are already seeing, but it can also be used to help you decide how to use other tools. FULL ARTICLE.
Interesting use of VIX and #bench using Eval. Also interesting use of the screener to test benchmarks. Thanks for the idea.
I think you are missing a figure or the numbers are off. Figure 1 should track SPY and be in the market all the time, I think.
We went bearish (on May 1st) because the current high VIX level caused the screen to switch to a 5-20 day moving average signal.
I am not sure about this. Running your screen, I get a buy on screen date 5/1, price start = 5/3 (Monday), price end = 5/10 (next Monday) with 1 position. I think you would really get a signal on the 5/8 (Saturday) rebalance, go bearish and sell out on 5/10. Hope I am wrong. The week made a big difference, about -7%.
The images have been corrected. So, too, has the text.
The model actually went bearish for the first time in 2010 on May 7, went bullish again for four days (5/11-5/14) and has been bearish since. On a weekly re-balancing, May 8 would be the date to cite. since the 4/26 peak, the strategy fell 4.9% versus 11.7% for the market.
For those trying to put the VIX to work, I found that looking at the VIX daily and comparing the current VIX to its 10 day moving average gives pretty good exit signals since 1/08, if you look for the difference to be greater than 20%. If the Vix is up 20% in a given day from its 10 day average (SMA), something bad is happening or likely to happen, in the SP500.
Let's say you exited at 4/21/2010 with the above, does anyone know how you would tell the screen or a sim that you are in cash and it is now time to check an alternative formula for entry? Maybe the eval function, but what do you test to determine cash?
Quite similar to this example, I am interested in using measures of overall market valuation to determine when to switch between shorter and longer moving-average comparisons to make buy/sell decisions. Examples would be Hussman's Peak PE Ratio, Shiller's Cyclically Adjusted Price Earning Ratio or the measure of total market cap relative to the US GNP, as espoused by Buffett. I was curious if the relevant macro data was available in Portfolio123 to perform any of these comparisons and/or if any of these methods have ever been used, or discussed in the Forum?
Formula - Close(0,GetSeries("$VIX")) / sma(10,0,GetSeries("$VIX")) > 1.20 - If you think about it, this is really a volatility measure of a volatility index.
We are all looking for a rule that is either/ or - like VIX <= 30 or maybe Benchclose(0) > sma(50,#bench). This means you are in the market if VIX is 30 or under and out over 30; in if Benchclose(0) is over the SP500 SMA(50), out if not. I think things are more complicated, which Marc suggested with the use of two rules and a switch.
Here is my thinking. Maybe others have ideas. You want a good rule to tell you (1) when to get out, (2) when to stay out, and (3) when to re-enter. For the first (1) you want an early warning, before the decline. I think the formula above does a pretty good job for (1) this year. Run a daily screen for this year and the blue bars in the chart give you pretty good exits. Look at the detail and you see that the dates for first occurrences are 1/21, and 4/27 which would have been good exit points. If you look at the VIX and the SP500 daily charts these look like good early warnings of downturns.
For re-entry (3) you want to pick the bottom and not miss the recovery. Hard to do. A consistent reversal is a pretty good signal. If you use a re-entry rule in the screen like - Benchclose(0) / SMA(10,0,#Bench) > 1.02 - for the re-entry, it would signal a re-entry on 2/17 for the 1/21 exit; no re-entry for the current downturn, yet.
So, how do you use this in a sim or screener? You need something that tells the screen that you triggered the exit rule (1), and now wait (2) for the next occurrence of (3). I can't think of a way to do this but others may have ideas. This may be something that is best done by looking at charts and making subjective decisions. Something you can't really quantify and backtest but you can see in the historical charts.