mahkoh 1,065 posts msg #112593 - Ignore mahkoh |
4/2/2013 2:41:19 PM
Well.. that is what Jack was trying.
|
Cheese 1,374 posts msg #112594 - Ignore Cheese modified |
4/2/2013 3:44:54 PM
Thank you Kevin_in_GA, mahkoh, frsrblch, and everyone for the info you've shared in this thread.
Here is my version of the divergence filter using ^SPX
* * *
Note (Apr 2, 2013 at 7PM PST):
- Filter designed to be run after close end-of-day
- Suggestions for improvement are welcome
Edit (Apr 2, 2013 at 7PM PST):
- change code for exit1 and exit2 to use close of ^SPX instead of SPY, per Kevin_in_GA
Disclaimers (Apr 2, 2013 at 7PM PST):
- The total number of divergences using ^SPX in sF may not always match Kevin_in_GA in SS, or Excel from frsrblch
* * *
|
Kevin_in_GA 4,599 posts msg #112595 - Ignore Kevin_in_GA |
4/2/2013 4:42:47 PM
Note that today was an exit day, but since there are 7 filters also showing a divergence BUY signal, one only closes 2 of the nine open trades.
Having backtested this new approach, it works quite well. Using this approach you would be up over 120% from the Oct 2007 closing high, versus only 14.5% for the S&P 500, with only an 8% Maximum Drawdown. Compare that to the drawdown for the S&P 500 and you'll see why I like this one.
|
mahkoh 1,065 posts msg #112597 - Ignore mahkoh |
4/2/2013 5:07:05 PM
Cheese,
Not that it makes a difference for today's signal, but I think the exit should be based on SPX data as well.
|
mahkoh 1,065 posts msg #112599 - Ignore mahkoh |
4/2/2013 5:37:48 PM
fsrlblch and Kevin:
The spreadsheet from fsrlblch shows 8 divergences where cheese's spx version has only 7, it's missing the CMF.
At this point SF is using today's SPX close for calculation.
Which is correct?
|
Kevin_in_GA 4,599 posts msg #112601 - Ignore Kevin_in_GA |
4/2/2013 6:21:25 PM
SS end-of-day data has 8 still in play including the CMF.
|
Cheese 1,374 posts msg #112608 - Ignore Cheese |
4/2/2013 10:17:43 PM
mahkoh, Kevin_in_GA, frsrblch, or anyone,
I've modified the code for exit1 to use "close of ^SPX" instead of "close of SPY" in my msg #112594 above.
If you know how to change the ROC code for exit2 to use close of ^SPX instead of close of SPY,
and how to get the correct count for CMF divergence, please post so all can use.
Many thanks.
|
Kevin_in_GA 4,599 posts msg #112609 - Ignore Kevin_in_GA |
4/2/2013 10:25:32 PM
set{exit1, count(ind(^SPX, close) reached a new 10 day high,1)}
set{exit2, count(ind(^SPX,ROC(15,1)) is below ind(^SPX,ROC(15,1)) 10 day high,1)}
set{exit, exit1 * exit2}
|
Cheese 1,374 posts msg #112610 - Ignore Cheese |
4/2/2013 10:57:42 PM
Thank you for the code and for this thread, Kevin.
At the time of writing, the CMF divergence using ^SPX in sF still does not match your CMF signal in SS,
even though it adheres to your code on page 1.
The CMF divergence using SPY in sF for Apr 2 , 2013 does match your your CMF signal in SS.
Best regards.
|
Kevin_in_GA 4,599 posts msg #112616 - Ignore Kevin_in_GA |
4/3/2013 8:44:31 AM
That likely means the methods of calculation are different. The easy solution is to drop the CMF Divergence filter from this system if you are relying on SF as your source for signals. Just go with 5 instead of 10.
|