S&C 2013-02 | Volatility Switch (McEwan)
Author: Eugene
Creation Date: 12/31/2012 9:44 AM
profile picture

Eugene

#1
Code for S&C 2013-02 | Volatility Switch (McEwan) strategy published. For more details, please visit this Wiki link.

We recommend downloading it directly using the convenient "Strategy Download" feature (found in Wealth-Lab's "Open Strategy" dialog).

profile picture

Eugene

#2
In a deleted duplicate thread, rmandel00 asks:


The published strategy uses signals from two indicators depending on the volatility switch, MA when in trending mode and RSI when not in trending mode.

According to the TASC write up of this program the following conditions for trend mode exist:
Entry rules: If volatility switch is in trend mode, buy at market next bar when today's close crosses above the 10-day simple moving average of close price
Exit rules: If volatility switch is in trend mode, sell at market next bar when today's close crosses below the 10-day simple moving average of close price
However according to the code the Sell signal occurs when the close crosses over the SMA signal.
CODE:
Please log in to see this code.

The Buy signal also results from a CrossOver of the Close with the SMA:
CODE:
Please log in to see this code.

I played with these signals to see what yielded the best return over a 7 year period for the SPY and found the following:
Buy Sell Profit Per Bar
Over Over 2.93
Over Under 1.89
Under Under 6.94
Under Over 4.83

The second condition would be a trend following condition where you go long when the close crosses above the moving average and close the position when it drops below it. This yields the worst return per bar as well as the lowest profit factor and total return in RAW mode. The best return results from buying and selling the position when the the close crosses below the MA for both cases. This strategy still allows for a sell using the RSI exit as well.
RichMan


profile picture

Eugene

#3
QUOTE:
The published strategy uses signals from two indicators depending on the volatility switch, MA when in trending mode and RSI when not in trending mode.


I don't know where's RSI is coming from as it wasn't in the draft we received. McEwan's strategy uses the VolatilitySwitch indicator to determine trendiness. The code is equivalent to the written rules, and I double checked that there is no error.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).