Index definition for Cap-Weighted Volume
Author: thodder
Creation Date: 10/29/2011 1:28 PM
profile picture

thodder

#1
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.
profile picture

Eugene

#2
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.
profile picture

thodder

#3
Are there any plans to allow fundamental data to be accessible in IndexDefinitions?
profile picture

Eugene

#4
No, and the problem is that WealthScript isn't made accessible here (or in Indicators, for instance).
profile picture

thodder

#5
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.
profile picture

Eugene

#6
Yes, sounds like that IndexDefinitions were not designed with access to a non-standard type of data in mind - like FundamentalItems.
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).