Hi
Where can I get statistics such as number of S&P500 stocks penetrated yesterday's high or low
or number of S&P500 stocks penetrated upper or lower BB band ? Are there such providers ?
Size:
Color:
There are at least 2 ways to get these numbers in Wealth-Lab
1. Index-Lab
- but this requires a pre-defined Index Definition for the specific rule. Check out "Advancing Issues" or "Declining Issues", for example.
2. The old-fashioned way - write a script. For example, run this by
clicking only the 1st symbol in a DataSet, like the S&P 500. It could take a minute or two for this to complete depending on the amount of data selected.
CODE:
Please log in to see this code.
Size:
Color:
QUOTE:
Where can I get statistics such as ... number of S&P500 stocks penetrated upper or lower BB band ?
Like Cone said, you need an IndexDefinition for that. Unfortunately, already available CrossOver/CrossUnder index definitions work differently: they count the number of instruments which have crossed an indicator's
value whereas you need Price crossing an Indicator.
In next release of MS123 IndexDefinitions (early November), we'll add two more IndexDefinitions that will cover your request:
* Price/Indicator CrossOver
* Price/Indicator CrossUnder
Which will make effortless the creation of index counting the number of S&P500 stocks penetrated upper or lower Bollinger Band.
Size:
Color:
Well, that's ok, I have sort of programmed that in as well. I also got those NYSE stats and advanced decline issue/vol. However, since sp500 changes its components frequently, I wonder if there is any data provider what would give me all the historical numbers.
Sounds like a no to me
Size:
Color:
Size:
Color:
Size:
Color:
Eugene and Cone
I have tried the index lab and it works well.. thanks.
I want to find the % of sp500 stocks penetrating yesterday's high/low, would it be there in the next release or I need to do Cone's custom code ?
Size:
Color:
Hint: You could easily find it out yourself by looking at the library's Change Logs:
MS123 IndexDefinitions libraryAs can be seen there, "Price/Indicator CrossOver (CrossUnder)" are included in the recently released version as promised.
Now, how this can be used to find the % of stocks penetrating yesterday's high/low? Community Indicators includes an auxiliary indicator called
ShiftDelay whose purpose is to delay any indicator by a period specified by user. (
In Strategy code, it could be any indicator; but in IndexLab's GUI, it applies to price series only.) When creating the new index, choose "Price/Indicator CrossOver" (or CrossUnder), select the price to penetrate the yesterday's value, and then pick "ShiftDelay" from the list. Finally, from its "DataSeries" dropdown you choose High (or Low). Voila.
Size:
Color: