I am using a large daily data panel for over 250 companies and over several years. I am concerned about adjusting for stock splits. Is there any program in SAS to detect stock splits? How do I adjust the stock splits?
yahoo provides adjusted_close. You could use this to detect splits
adjustment_factor = adjusted_close/close
change in adjustment_factor = adjustment_factor (yesterday's)/adjustment_factor(today)
if this number is less than 0.9 or greater than 1, you have a split
Here is R code which calculates the "Split Ratio" for historical data:
However (and this is a big however): the cumulated amount of dividends paid will slowly distort this ratio. For example, IBM hasn't had a stock split since 1999, yet the "SplitRatio" at 2007-01-03 is 0.897. This means that IBM has paid out a total of (1/0.897)-1 = 11% dividends since 2007-01-03.
In addition, I'm not 100% sure that this is the complete story, so I've made this a community Wiki so any correct inassumptions can be addressed.
This answer is wrong, according to the comment below from Joshua Ullrich: