Back to Community
Alternative Strategy for a Moderate Portfolio

Hi all,

I have further developed my original strategy that I posted here to be less aggressive in order to become more suitable for the average investor in terms of risk tolerance. Since I want to compare my strategy to the typical retail investor's moderately conservative allocation of 40% stocks and 60% bonds, I am using $AOM (iShares Core Moderate Allocation ETF) as my benchmark.

Instead of shorting $VXX (or long $XIV) with 100% of the portfolio's cash every time there's a bullish WVF signal, the algo only does so with 20% of the portfolio's cash and the remaining 80% balance is parked in $AGG to hedge as well as collect yield. When there's a bearish WVF signal, the algo dumps everything and moves the entire portfolio in $TLT, which is considered a safe-haven asset. If less risk/volatility is desired, simply reduce the short-$VXX/long-$XIV portion and increase the $AGG portion. If more risk/performance is desired, do the opposite.

As you can see, for the returns generated, the algo has very impressive Beta, Sharpe, Max Drawdown, and Volatility ratings.

TRADING RULES
28-day WVF cross> 14 = sell $TLT + short $VXX + buy $AGG
28-day WVF cross< 14 = cover $VXX + sell $AGG + buy $TLT

Clone Algorithm
279
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 571a8b333c81521091976eec
There was a runtime error.
10 responses

Here is the same algo but instead of shorting $VXX, it goes long $XIV. Backtest period is shorter for this one because $XIV only started trading in December 2010 while $VXX started trading during early 2009.

Clone Algorithm
279
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 571a8d3e3c81521091976f08
There was a runtime error.

And here's the long-$XIV version compared to $SPY.

Clone Algorithm
279
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 571a8f00ecfe3720e25f1446
There was a runtime error.

Looks awesome. Any way to modify so its performance during the great recession can be tested?

Unfortunately, no. $VXX didn't exist before 2009.

Good point. Will be interesting to test this out when futures come to Quantopian. Thanks for sharing.

Here's the closest I got to replicating this strategy for performance testing during the 2008 crisis. It's not exactly the same thing because instead of using VIX ETNs, this version simply applies the WVF onto $SPY. It still uses $TLT as a safe-haven asset. When there's a bullish WVF signal, the algo holds 100% $SPY. When there's a bearish signal, the algo dumps $SPY and goes into 100% $TLT.

TRADING RULES
28-day WVF cross< 5 = sell $TLT + buy $SPY
28-day WVF cross> 5 = sell $SPY + buy $TLT

Clone Algorithm
23
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 571af7a40b22bb1109120c38
There was a runtime error.

Very nice. It spotted the 08-09 crash pretty early, and then the Euro Debt Crisis. Seems to have missed the dip in August of 2015, but did a good job getting out in January of this year. Thanks again for sharing. This algo will be a good addition to a strategy like the one found in this paper:

http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2609814

Hey Kory,

Just wondering why the move from a signal value of 14 to 5? Was there some reasoning for these choices?

You have to re-calibrate the trigger for different asset classes (or different lookback settings). For $VXX and $XIV, I've discovered that a good range for the trigger's value is around 12-18. That value tends to increase if the asset is more volatile. For $SPY or $SH, they are less volatile than VIX ETNs so a better range for the trigger's value is around 4-6.

The "trigger" basically represents the average threshold that separates positive momentum from negative momentum based on WVF readings. The WVF is viewed as a "synthetic VIX" that can be applied to any asset class because its value is derived from only the underlying's price (read more here). Since it is derived strictly from price history, the WVF essentially measures the price's rate of change (inverse rate of change, to be exact) and therefore it should be classified as a momentum oscillator.

I am aware that finding and using a fixed value for the trigger is a bit dangerous (also pretty much akin to data mining). Right now, I am working on creating a variable trigger, such as applying a moving average on the WVF and use the moving average as the trigger. I've actually already coded it here on TradingView. Now I need to figure out how to do it here on Quantopian.

Variable trigger could increment its predictive capability. Maybe something that adjusts the trigger with respect to rate of change of the trigger in the lookback window? Just spit-balling ideas...was not able to view the pine script so I am not sure what you are testing.