Hello there.
I am looking for a script that scans a list of stocks going back 5 years and issues a message if any of the stocks in the list had a split at some point in the past 5 years. Any help would be appreciated.
Thanks,
Mike
Size:
Color:
Try this example. Run in multi-symbol backtest mode to get the output for a DataSet:
CODE:
Please log in to see this code.
Size:
Color:
Thanks Eugene. If I want to go back 10 years, do I change the 5d to 10d?
Size:
Color:
Sure. Make sure the data loading control is configured to load All Data.
As a DIY excercise, you can make the choice interactive through Straps (Strategy Parameters). See the Programming Guide > Programming Trading Strategies > Strategy Parameters.
Size:
Color:
Hi Eugene,
I did this and it works well. I realized however that this script only shows me the last stock split. How do i modify it so that is shows me all the splits for a particular stock?
Thanks.
Size:
Color:
See FundamentalDataItems in the QuickRef for an example of looping thru a FundamentalItem collection.
Size:
Color:
Thanks, this does it.
Size:
Color:
Hello
I used to apply Eugene's code above once in a while, but it does not seem to work anymore. Is there a possibility to fix that ?
Size:
Color:
Hello Patrick,
The code still works, of course. You just need to fine-tune it because the naming of items is individual across fundamental providers. Notice this:
CODE:
Please log in to see this code.
Uncomment the one you're planning to use, and comment the Fidelity item.
Size:
Color:
Hello Eugene
Thx for the quick response.
When I try either Yahoo or MSN, I got no results at all (the debug window shows nothing) for e.g. S&P 500/400/600 stocks.
Size:
Color:
The MSN provider's version must the latest (2013.06) to work properly. Previous versions will not work at all:
QUOTE:
Fix: due to past MSN website redesign, dividends/splits stopped downloading
With both providers, make sure that the data loading depth is adequate (try it with "All Data").
Size:
Color:
I had all settings as you suggested already. It does not seem to work...
Just to make sure, I do not have to use Datsets with Yahoo or MSN as a price source as a pre-condition, right ? (Because I use BB- and iqFeed as a source for my datasets, but the tickers are naturally identical)
Size:
Color:
QUOTE:
Because I use BB- and iqFeed as a source for my datasets
And it was a
key omission that you're using a different data provider:
QUOTE:
Just to make sure, I do not have to use Datsets with Yahoo or MSN as a price source as a pre-condition, right ?
Only partially right. Until you update the MSN/Yahoo DataSets, the MSN/Yahoo fundamental data will not be available. Only when you update a MSN/Y DataSet, the built-in fundamental providers have a chance to download the split/dividend items for included symbols. Afterwards, any data feed can be used provided that
the tickers are naturally identical.
Size:
Color:
QUOTE:
and it was a key omission that you're using a different data provider:
yep, sorry about that. I had the opinion that it had worked with this setup in the past, but maybe I remembered wrong.
QUOTE:
Only partially right. Until you update the MSN/Yahoo DataSets, the MSN/Yahoo fundamental data will not be available. Only when you update a MSN/Y DataSet, the built-in fundamental providers have a chance to download the split/dividend items for included symbols. Afterwards, any data feed can be used provided that the tickers are naturally identical.
Great, now it works again.
Many thanks
Size:
Color: