Pass a Named DataSet to the Beta indicator
Author: alsilva86
Creation Date: 1/23/2017 10:52 AM
profile picture

alsilva86

#1
Hi, I´m beginer on WL and I need a help for use a DataSet which I´ve created ("Ibra") with Yahho in order to calculate the beta of one stock in relation to this created index.

Could you help me, please? Tks in advance.

I´m trying this (I believe that the problem is in a mismatch of the number of bars, but not abble to fix for while):

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

Eugene

#2
Hi,

For this to work, the "Ibra" must be a symbol - not the DataSet name. "IBRA" is an invalid symbol name at Yahoo so this isn't going to work either way. Taking Bovespa for example, you could use it like this:
CODE:
Please log in to see this code.


However, what you wrote makes me think that you believe that the DataSet becomes an index that could be passed on to an indicator like Beta. No, not automatically. The Beta DataSeries accepts an existing symbol. To reiterate, the "Ibra" is not a symbol but a DataSet; and your DataSet is not an index.

Please clarify your task. Do you want to create an index symbol first and then pass it on to the Beta indicator? If so, how exactly is the index constructed? (Hint: custom Indices are created using Index-Lab).