Call of NextEarnings extremely slow
Author: Gamba
Creation Date: 2/4/2013 1:53 AM
profile picture

Gamba

#1
Hi,

for a few days the call of

nextReportDate = EarningsDate.GetNext(Bars.Symbol);

is extremely slow. Backtest duration is over 1 hour. Without this call it lasts only a few seconds.
One week ago with calling EanringsDate.GetNExt(...) is lasts only a few minutes.

Could someone confirm this behaviour?

Thx
profile picture

Eugene

#2
As you could read in the documentation of the method:

QUOTE:
GetNext first checks for an upcoming earnings date from earningswhispers.com. If not available, it automatically calls the GetNext2 method, which accesses money.cnn.com for the symbol's earnings release date.


So, this method establishes an internet connection - maybe even two. But since you're using it, you must be doing it on purpose, isn't it? The code example encourages the use of the GetNextUseCache method instead that caches the downloaded data and only updates it when it becomes outdated.

As to your issue, queries from the earningswhispers.com site are taking ages to load right now. This must be a temporary problem of the website. If for whatever purpose you're not using the earnings cache, calling GetNext2 instead of GetNext will speed things up considerably (at the moment).

P.S. Target an appropriate forum when posting, please. This should go to the WealthScript forum.
profile picture

Gamba

#3
Sorry, I clicked the wrong category. It should be posted is WealthSrcipt forum.


I'll try the other methods, but I could not get them to run the first time.

It worked for me with GetNext the last months. I know the examples.
Something has changed the last days but I don't know what it is ... (my internet connection is fine)

I can reproduce the behaviour on different machines.
The code above is called for every symbol in my dataset before the bar-loop.
profile picture

Eugene

#4
As I just said above, it's an issue of the earningswhispers.com site - the feed that delivers the data to the GetNext method. Until they fix their slowness, you can use GetNext2. It will work.
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).