In
Investing with Volume Analysis by Buff Pelz Dormeier, he discusses a problem with volume in the current indexes. He provides a solution by creating capital-weighted volume (see
http://books.google.com/books?id=BS2-qfWucygC&lpg=PP1&dq=investing%20with%20volume%20analysis&pg=PA233#v=onepage&q&f=false). My attempt to create an index seems to have hit a road block as I can not figure out how to:
1) get fundamental data for a security from within an IndexDefinition;
2) recalculate the prices for the index.
Here is my first attempt (unsuccessful compile and test so far):
CODE:
Please log in to see this code.
I'm still trying to figure out what Buff was attempting to do in Step 6 too...
QUOTE:
Step 6: Recalculate index or exchange capital-weighted volume with price index change backed out. Capital-Weighted Volume Index x -1 x (Index's price change)
Any thoughts would be appreciated.
Size:
Color:
GetFundamentalItem isn't accessible from IndexDefinitions. Perhaps unless you (seriously) go out of your way with System.Reflection. (Same applies to external Bars data as well, and in general to any WealthScript methods.)
Workaround: export the fundamental items for shares outstanding with accompanying DateTimes to an ASCII CSV file, read them back in your IndexDefinition.
Size:
Color:
Are there any plans to allow fundamental data to be accessible in IndexDefinitions?
Size:
Color:
No, and the problem is that WealthScript isn't made accessible here (or in Indicators, for instance).
Size:
Color:
That's too bad. Cap-weighted indexes sounded like a good idea, but I haven't been able to test the authors concept yet.
I can still play around with putting all the calculations in a WealthScript strategy to see how it works. It sounds like IndexDefinitions is not designed for this type of index.
Size:
Color:
Yes, sounds like that IndexDefinitions were not designed with access to a non-standard type of data in mind - like FundamentalItems.
Size:
Color: