IndexDefinitions: "Above or Below an indicator value" in percentage?
Author: Harapa
Creation Date: 10/24/2014 10:38 AM
profile picture

Harapa

#1
1. In Index lab one can get an index showing number of stocks in a data set "Above or Below an indicator value". I would like this output in percentage term as well.
2. An index showing total number of symbols traded on a given day.

TIA
profile picture

Eugene

#2
I'll see if it makes practical sense.

1 - Here's how you can do it yourself in Strategy:

CODE:
Please log in to see this code.


2 - Frankly, this sounds too utilitarian. Have you tried subtracting "Unchanged Issues Index" from DataSetSymbols.Count in Strategy code? An approximation, I know.

Thanks for suggestions.
profile picture

Harapa

#3
QUOTE:
I'll see if it makes practical sense.


As percentage normalizes the data, it helps to set a cut off in code. This becomes critical if your data set have symbols that don't all start on one day (which is the case for most data sets I have).

How do I define the source for "Data Set" for count symbols?

2. Isn't the out put of "Unchanged Issue index" in %age?
profile picture

Eugene

#4
2. I don't remember (and am too busy right now). Anyway, this should do it (to be run in Single Symbol mode):

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

Harapa

#5
Above code returns no value (gap in date) whenever a new symbol began trading. So for data set of ~ 2000 symbols I have ~ 1800 holes in the data series. (This is akin to many other volume derived IL indices as we discussed before). Actually "Advancing issues or Declining issues" IL index also exhibit same gappy behavior, probably they all derived by a similar code!
profile picture

Eugene

#6
This may help (haven't tested):
CODE:
Please log in to see this code.
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).