Export Market Cap
Author: mgrech004
Creation Date: 6/27/2011 12:55 PM
profile picture

mgrech004

#1
I have a fidelity 15 mins data set. I am using the script below to export the market cap for symbols in my dataset. Problem is that value is showing as 0. I had same issue when it was trying to export assets instead of market cap. I have updated the dataset so i think it does have fundamental data in it. Besides this issue, how to I modify the code so that it only exports the fundamental data once per day as opposed to each 15 min bar? Thanks.
CODE:
Please log in to see this code.
profile picture

Eugene

#2
QUOTE:
Besides this issue, how to I modify the code so that it only exports the fundamental data once per day as opposed to each 15 min bar?

Switch the chart to Daily, or load a Daily chart. Makes no sense to export the data in non native, intraday time scale if originally it exists as quarterly items.
QUOTE:
I have updated the dataset so i think it does have fundamental data in it.

Just plot the fundamental series to verify that the data actually exists on your disk for each symbol. Also, make sure you click on "Update DataSet" and not "...(Price)" - or used a by provider update (Update All Data).
profile picture

mgrech004

#3
when i switch the chart to daily i get a runtime error message as follows:

Cannot convert Daily Bars to 15 Minute Bars
at Fundamentals2ASCII.Execute()
at WealthLab.WealthScript.RestoreContext()
at WealthLab.BarScaleConverter.ReScale(Bars sb,BarScale scale, Int32 interval)
at WealthLab.BarScaleConverter.ToIntradayCompressed(Bars sb, BarScale scale, Int32 varInterval)
profile picture

Eugene

#4
I'm sure you'll find a solution in the Wiki, in the Knowledge Base > Errors section.
profile picture

mgrech004

#5
I had this script working fine yesterday. I try to run it today but it is outputting 0 for the Market Cap when I save to a file even though if I see it in a chart it is not zero. Code is below. What am I doing wrong?

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

Eugene

#6
1. Turn On Demand Data updates off.
2. Download the Daily data for the symbols.
3. Step on the Daily DataSet title.
4. Run this strategy. Did it work?
CODE:
Please log in to see this code.
profile picture

mgrech004

#7
I have the same problem, market cap shows ok in chart but value in file is 0.
profile picture

Eugene

#8
And if you temporarily redefine the market cap series like this (substitute anything else e.g. "eps" for the "assets" - it's just for testing)...
QUOTE:
DataSeries marketCap = FundamentalDataSeries("assets");

Is it still 0? In other words, if we step back from using WealthLab.Rules and use the pure fundamental series instead.
profile picture

mgrech004

#9
same problem. it shows in the chart but the file output shows zero.

2004/04/12,0
2004/04/13,0
2004/04/14,0
2004/04/15,0
2004/04/16,0
2004/04/19,0
2004/04/20,0
2004/04/21,0
2004/04/22,0
2004/04/23,0
2004/04/26,0
profile picture

Eugene

#10
I couldn't duplicate it if I follow the steps above, but with YCharts data.

I'm not sure whether does Fidelity fundamental data goes back to 2004. Are the recent dates there?

Cone, could you please check this on FF data?
profile picture

mgrech004

#11
yes, that is the problem. it does not go back that far.
profile picture

Eugene

#12
Oh, then it's not a problem at all -- that's by design.

Then you might want to take a closer look at YCharts.
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).