FundamentalDataSeriesAnnual returns zeros
Author: bgood
Creation Date: 4/1/2013 3:13 PM
profile picture

bgood

#1
I am processing a list of symbols. For each symbol I want to gather information found in FUndamentalDataSeries. I had been using SetContext() then using FundamentalDataSeries(itemName,aggregate,offset) and that worked just fine. I changed to not set the context for each symbol, and altered the code to call FundamentalDataSeries(symbol,itemName). This works correctly for 1 quarter's data. Next I tried to use the FundamentalDataSeries(symbol,itemName,aggregate,average,offset) and I always get back zeros. I further tried FundamentalDataSeriesAnnual() and also got back zeros because I was on a symbol .spx that did not have earnings data. Below shows how I have used the calls. Help please.

CODE:
Please log in to see this code.
profile picture

bgood

#2
After trying to do some debugging I found the following example. If you click on .spx, AAPL, or AFL you will see different behavior. Some of the behavior is that the values for AFL and AAPL are the same likely because of the cache scheme. However when on .spx, only the current quarter data is shown.

CODE:
Please log in to see this code.
profile picture

Eugene

#3
Actually, I see that FundamentalDataSeriesAnnual completely ignores the symbol passed to it, always executing on the current Bars. Therefore a call to SetContext/RestoreContext is really required to get it working. Thanks for the heads-up.
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).