StockFetcher Forums · Filter Exchange · TRADING DIVERGENCES ON THE S&P 500<< 1 2 3 4 5 ... 33 >>Post Follow-up
mahkoh
894 posts
msg #108225
Ignore mahkoh
10/1/2012 4:05:59 AM

Kevin, wondering to what extent the returns of these filters were generated by outperforming the index during the bear market. Can you provide some info on how they did during the last 3 year bull market?

As for the composite filter, it does indeed not seem like there is any obvious edge to be found in there.

Fetcher[
SYMLIST(SPY)

/*CODING FOR DIVERGENCE BETWEEN MA(3) AND CHAIKIN MONEY FLOW*/

SET{CMF14DOWN, COUNT(CMF(14) BELOW CMF(14) 7 DAYS AGO,1)}
SET{CMF14DOWN2, COUNT(CMF(14) DROPPED MORE THAN 2% OVER THE LAST 7
DAYS,1)}

SET{MA3UP1, COUNT(MA(3) ABOVE MA(3) 7 DAYS AGO,1)}
SET{MA3UP1_2, COUNT(MA(3) GAINED MORE THAN 2% OVER THE LAST 7 DAYS,1)}

SET{DIV1A, CMF14DOWN * MA3UP1}
SET{DIV2A, CMF14DOWN2 + MA3UP1_2}
SET{DIV3A, COUNT(DIV2A ABOVE 0.5,1)}
SET{CMF14DIV, DIV1A*DIV3A}

ADD COLUMN CMF14DIV



/*CODING FOR DIVERGENCE BETWEEN MA(3) AND THE STOCHASTIC MOMENTUM
INDICATOR*/

SET{SMI11down, COUNT(SMI(3,6,6) below SMI(3,6,6) 11 days ago,1)}
SET{SMI11down7, COUNT(SMI(3,6,6) DROPPED MORE THAN 7% OVER THE LAST 11
DAYS,1)}

SET{MA3UP2, COUNT(MA(3) above MA(3) 11 days ago,1)}
SET{MA3UP2_7, COUNT(MA(3) gained MORE THAN 7% OVER THE LAST 11 DAYS,1)}

SET{DIV1B, SMI11down * MA3UP2}
SET{DIV2B, SMI11DOWN7 + MA3UP2_7}
SET{DIV3B, COUNT(DIV2B ABOVE 0.5,1)}
SET{SMI11DIV, DIV1B*DIV3B}

ADD COLUMN SMI11DIV




/*CODING FOR DIVERGENCE BETWEEN MA(3) AND THE WILLIAMS %R INDICATOR*/

SET{WLR12down, COUNT(WILLIAMS %R(14) below WILLIAMS %R(14) 12 days ago,1)}
SET{WLR12down1, COUNT(WILLIAMS %R(14) DROPPED MORE THAN 1% OVER THE LAST
12 DAYS,1)}

SET{MA3UP3, COUNT(MA(3) above MA(3) 12 days ago,1)}
SET{MA3UP3_1, COUNT(MA(3) gained MORE THAN 1% OVER THE LAST 12 DAYS,1)}

SET{DIV1C, WLR12down * MA3UP3}
SET{DIV2C, WLR12DOWN1 + MA3UP3_1}
SET{DIV3C, COUNT(DIV2C ABOVE 0.5,1)}
SET{WLR12DIV, DIV1C * DIV3C}

ADD COLUMN WLR12DIV




/*CODING FOR DIVERGENCE BETWEEN MA(3) AND THE +DI INDICATOR*/
SET{PDI10down, COUNT(PDI(10) below PDI(10) 8 days ago,1)}
SET{PDI10down10, COUNT(PDI(10) DROPPED MORE THAN 10% OVER THE LAST 8 DAYS,1)}

SET{MA3UP4, COUNT(MA(3) above MA(3) 8 days ago,1)}
SET{MA3UP4_1, COUNT(MA(3) gained MORE THAN 10% OVER THE LAST 8 DAYS,1)}

SET{DIV1D, PDI10down * MA3UP4}
SET{DIV2D, PDI10DOWN10 + MA3UP4_1}
SET{DIV3D, COUNT(DIV2D ABOVE 0.5,1)}
SET{PDI10DIV, DIV1D * DIV3D}

ADD COLUMN PDI10DIV




/*CODING FOR DIVERGENCE BETWEEN MA(3) AND THE AROON UP INDICATOR*/

SET{ARUP6down, COUNT(AROON UP(6) below AROON UP(6) 4 days ago,1)}
SET{ARUP6down4, COUNT(AROON UP(6) DROPPED MORE THAN 4% OVER THE LAST 4 DAYS,1)}

SET{MA3UP5, COUNT(MA(3) above MA(3) 4 days ago,1)}
SET{MA3UP5_1, COUNT(MA(3) gained MORE THAN 4% OVER THE LAST 10 DAYS,1)}

SET{DIV1E, ARUP6down * MA3UP5}
SET{DIV2E, ARUP6DOWN4 + MA3UP5_1}
SET{DIV3E, COUNT(DIV2E ABOVE 0.5,1)}
SET{ARUP6DIV, DIV1E * DIV3E}

ADD COLUMN ARUP6DIV




/*CODING FOR DIVERGENCE BETWEEN MA(3) AND THE LINEAR REGRESSION SLOPE*/

SET{LRS8down, COUNT(LRS(8) below LRS(8) 10 days ago,1)}
SET{LRS8down10, COUNT(LRS(8) DROPPED MORE THAN 10% OVER THE LAST 10 DAYS,1)}

SET{MA3UP6, COUNT(MA(3) above MA(3) 10 days ago,1)}
SET{MA3UP6_1, COUNT(MA(3) gained MORE THAN 10% OVER THE LAST 10 DAYS,1)}

SET{DIV1F, LRS8down * MA3UP6}
SET{DIV2F, LRS8DOWN10 + MA3UP6_1}
SET{DIV3F, COUNT(DIV2F ABOVE 0.5,1)}
SET{LRS8DIV, DIV1F * DIV3F}

ADD COLUMN LRS8DIV





/*CODING FOR DIVERGENCE BETWEEN MA(3) AND THE Q-STICK INDICATOR*/

SET{QST12down, COUNT(QSTICK(12) below QST(12) 12 days ago,1)}
SET{QST12down2, COUNT(QSTICK(12) DROPPED MORE THAN 2% OVER THE LAST 12 DAYS,1)}

SET{MA3UP7, COUNT(MA(3) above MA(3) 12 days ago,1)}
SET{MA3UP7_1, COUNT(MA(3) gained MORE THAN 2% OVER THE LAST 12 DAYS,1)}

SET{DIV1G, QST12down * MA3UP7}
SET{DIV2G, QST12DOWN2 + MA3UP7_1}
SET{DIV3G, COUNT(DIV2G ABOVE 0.5,1)}
SET{QST12DIV, DIV1G * DIV3G}

ADD COLUMN QST12DIV





/*CODING FOR DIVERGENCE BETWEEN MA(3) AND THE RSI INDICATOR*/

SET{RSI10down, COUNT(RSI(10) below RSI(10) 12 days ago,1)}
SET{RSI10down3, COUNT(RSI(10) DROPPED MORE THAN 3% OVER THE LAST 12 DAYS,1)}

SET{MA3UP8, COUNT(MA(3) above MA(3) 12 days ago,1)}
SET{MA3UP8_1, COUNT(MA(3) gained MORE THAN 3% OVER THE LAST 12 DAYS,1)}

SET{DIV1H, RSI10down * MA3UP8}
SET{DIV2H, RSI10DOWN3 + MA3UP8_1}
SET{DIV3H, COUNT(DIV2H ABOVE 0.5,1)}
SET{RSI10DIV, DIV1H * DIV3H}

ADD COLUMN RSI10DIV




/*CODING FOR DIVERGENCE BETWEEN MA(3) AND THE RMI INDICATOR*/

SET{RMI82down, COUNT(RMI(8,2) below RMI(8,2) 12 days ago,1)}
SET{RMI82down1, COUNT(RMI(8,2) DROPPED MORE THAN 1% OVER THE LAST 12 DAYS,1)}

SET{MA3UP9, COUNT(MA(3) above MA(3) 12 days ago,1)}
SET{MA3UP9_1, COUNT(MA(3) gained MORE THAN 1% OVER THE LAST 12 DAYS,1)}

SET{DIV1I, RMI82down * MA3UP9}
SET{DIV2I, RMI82DOWN1 + MA3UP9_1}
SET{DIV3I, COUNT(DIV2I ABOVE 0.5,1)}
SET{RMI82DIV, DIV1I * DIV3I}

ADD COLUMN RMI82DIV




/*CODING FOR DIVERGENCE BETWEEN MA(3) AND THE STOCHASTICS %D INDICATOR*/

SET{STD325down, COUNT(FULL STOCHASTICS %D(3,2,5) below FULL STOCHASTICS %D(3,2,5) 11 days ago,1)}
SET{STD325down2, COUNT(FULL STOCHASTICS %D(3,2,5) DROPPED MORE THAN 2% OVER THE LAST 11 DAYS,1)}

SET{MA3UP10, COUNT(MA(3) above MA(3) 11 days ago,1)}
SET{MA3UP10_1, COUNT(MA(3) gained MORE THAN 2% OVER THE LAST 11 DAYS,1)}

SET{DIV1J, STD325down * MA3UP10}
SET{DIV2J, STD325DOWN2 + MA3UP10_1}
SET{DIV3J, COUNT(DIV2J ABOVE 0.5,1)}
SET{STD325DIV, DIV1J * DIV3J}

ADD COLUMN STD325DIV

set{x,cmf14div + smi11div}
set{x1,x + wlr12div}
set{x2,x1 + pdi10div}
set{x3,x2 + arup6div}
set{x4,x3 + lrs8div}
set{x5,x4 + qst12div}
set{x6,x5 + rsi10div}
set{x7,x6 + rmi82div}
set{comp,x7 + std325div}
add column comp
draw comp

set{exit1, count(close reached a new 10 day high,1)}
set{exit2, count(ROC(15,1) is below ROC(15,1) 10 day high,1)}
set{exit, exit1 * exit2}

ADD COLUMN EXIT

draw exit

]





















Kevin_in_GA
4,553 posts
msg #108226
Ignore Kevin_in_GA
modified
10/1/2012 8:19:48 AM

Agreed - the composite filter performs at a slightly lower level than several of the individual ones. That is mostly because each individual filter exits on the same day, and that the batting averages are unusually high for these guys, even if the gains are modest.

That is why I posted each filter separately. I might want to look at divergence-based exits as well.

jackmack
334 posts
msg #108267
Ignore jackmack
10/3/2012 4:31:31 PM

Kevin - again thank you so much for sharing these - I like the returns.
I am just having a hard time figuring out the entry and exit signals.
Is there any way to make them a bit easier to understand?
There appear to be long times where neither signal is given and I am not sure what one should have done during these periods.
I am just making a simple observation so please do not read this as a criticism in any way - you know what you are looking for and at whereas I am not really sure what to do when for example the enter and exit signals occur together.
I am just wondering if there might not be a simpler entry and exit signal.
Thanks for all of your hard work and sharing here.


Kevin_in_GA
4,553 posts
msg #108269
Ignore Kevin_in_GA
10/3/2012 8:27:17 PM

There are only two signals - the entry and the exit. Right now you have had entry signals on all 10 filters, and are in trades. Once the exit signal triggers you are out the next day.

When you get an entry signal (essentially a divergence between price and the indicator) that can persist as long as the divergence persists, but the signal does not stay "on" during the whole time in trade.

jackmack
334 posts
msg #108276
Ignore jackmack
10/4/2012 8:00:55 AM

Kevin
I get it now - I see it plain as day now - sorry.
WOW that is amazing and if you load SSO in using the STOCH filter it has you in at 61.79 on 1 OCT 12.
Very interesting. Have you run a backtest on SSO/SDS using either the RSI or STOCH divergence filters
to see if performance is any better than your original SSO/SDS filter?
Thank you again - man this filter set is amazingly dynamic.


mdmink
8 posts
msg #108289
Ignore mdmink
10/4/2012 6:11:10 PM

Kevin, thank you for sharing and great work as always. I know that you mentioned that you did all the testing in Stratasearch , and from previous threads you prefer that platform for back-testing. I was wondering 1) if you had backtested either IWM or QQQ? If you think that stockfetcher could successfully backtest those using one of these filters? Would you expect much difference, or given the high correlation with the spy, expect the near-same results? Thanks

jackmack
334 posts
msg #108291
Ignore jackmack
10/5/2012 11:25:05 AM

Kevin have you looked into trying to create these divergences in Prodigio?

Kevin_in_GA
4,553 posts
msg #108297
Ignore Kevin_in_GA
modified
10/5/2012 2:55:10 PM

There is an exit triggered today. Sell at end of day or at the open on Tuesday.

Note that all 10 filters close their trades profitably.

EDIT: I am out at SPY 146.00. Looks like the market now is trading negative for the day, which removes the exit signal (today must be a 10 day high on the close).

mahkoh
894 posts
msg #108301
Ignore mahkoh
10/5/2012 5:56:05 PM

Didn't the exit signal trigger Thursday?

Kevin_in_GA
4,553 posts
msg #108302
Ignore Kevin_in_GA
10/5/2012 9:59:12 PM

You're right, it did (I have been traveling for work and not checking this filter until today). Ether way the filters delivered a profitable trade.

StockFetcher Forums · Filter Exchange · TRADING DIVERGENCES ON THE S&P 500<< 1 2 3 4 5 ... 33 >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2016 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus