Beating the S&P 500 – Long Term

Category: Strategies By: Derek Created: February 27, 2017, 3:12 PM
February 27, 2017, 3:12 PM
Strategies
11 Comments

Hello!

This is my first submission to the strategy section of this site. My goal is to build filters for market regimes that provide the biases for more short term trading strategies. This submission is a byproduct of my research:

Following is a long term system based on a very simple timing model for capital preservation.

Timeframe is monthly and 2 indicators are used:

  • John Ehlers Supersmoother at the standard value of 8.
  • A 40 period simple moving average. The SMA has been improved and you can check it is robust to a range of variations.

The system is always on the market. Either long or short.

It doesn’t trade very often and it is not supposed to. The very upside of this model is not the profit but the maximum risk exposure of 13.22%! Maximum drawdown is 2.58 percent!

If you think this is interesting, please critique thoroughly because it will be highly appreciated.

DEFPARAM CumulateOrders = false
DEFPARAM PRELOADBARS = 40

//John Ehlers’ "Super Smoother", a 2-pole Butterworth filter combined with a 2-bar SMA that suppresses the Nyquist frequency:
Period = 8
Data = Close
PI = 3.14159
f = (1.414*PI) / Period
a = exp(-f)
c2 = 2*a*cos(f)
c3 = -a*a
c1 = 1 - c2 - c3
if barindex>Period then
 S = c1*(Data[0]+Data[1])*0.5 + c2*S[1] + c3*S[2]
endif

c1 = (close > S)
c2 = (S > S[1])

IF c1 AND c2 THEN
 EXITSHORT 1 CONTRACT AT MARKET
 BUY 1 CONTRACT AT MARKET
ENDIF

c3 = (close CROSSES UNDER Average[40](close))

IF c3 THEN
 SELL  AT MARKET
 SELLSHORT 1 CONTRACT AT MARKET
ENDIF

 

Download
Filename: Beating-the-SP-500.itf
Downloads: 465
Derek Veteran
Currently debugging life, so my bio is on hold. Check back after the next commit for an update.
Author’s Profile

Comments

Logo Logo
Loading...