This is a massive step forward for all Dip Traders(not the underlying Dip model above, but rather your masterful filter to identify(& prevent) trading EPS release dates ). I've tried it on several dip models & it improves Stats on all of them!!!
Eugene, while Cone's "Full Solution" is the icing on the cake, your invention of "GetNextEarningsDate" is the cake. Thank you both :-)
Several observations for you both (after extensive testing) AND then one quick question.
1) I ran Robert's latest code today(Sept 6 & Mkt holiday & Mkt closed) on US stocks that YAHOO earnings calendar says will report in next two days;
a) For Sep 7(tommorrow), 63% of Alerts(EPS release dates only) were removed vs. script w/o this filter. I assume not 100%, b/c WebSource that GetNextEarningsDate uses... disagrees with YAHOO earnings calendar.... Do you concur?
b) For Sep 8(day after tommorrow), 100% of Alerts(EPS release dates only) were removed vs. script w/o this filter. Incredible!!!
c) Wiki example does not remove any Alerts(EPS release dates only) yet (for Sept 7, tommorow). Perhaps it can be tweaked to help others going forward.
2) The "Full Solution"(as Cone calls it,... appears flawless. I've done historical testing going back many months and WOW!... It also removes both "EPS Release Dates" in backtesting as well as removing Alerts currently. Conversely, one can quicly change the code to
CODE:
Please log in to see this code.
and see what happened if they did trade in the EPS TimeSpan window. Perfect.
3) Regarding speed: No action requested, just FYI,... When running script on 2000 symbols:
a) on script w/o this (EPS release Date) filter, it takes about 30secs.
b) on script with this filter, it takes about 10mins (using 32bit PC, don't have 64bit yet).
c) I assume difference... b/c script is accessing external web-source... just wanted you (& others) to be forewarned.
My only question:
1) When the Print Debug window opens showing TimeSpan as... "ts: 21, ts: 22, etc)... what is it telling me exactly?... That last EPS date was ts: x days ago??? Have not figured that one out quite yet.
Thanks again to you two Jedi,
Ted