How does MLDownloader handle split and dividends?
Data is adjusted using appropriate split and dividend multipliers, adhering to Center for Research in Security Prices (CRSP) standards. Split multipliers are determined by the split ratio. For instance, in a 2 for 1 split, the pre-split data is multiplied by 0.5. Dividend multipliers are calculated based on dividend as a percentage of price, primarily to avoid negative historical pricing. For example, when a $0.08 cash dividend is distributed on Feb 19 (ex-date), and the Feb 18 closing price was 24.96, the pre-dividend data is multiplied by (1-0.08/24.96) = 0.9968. Below is a detailed example of adjusted close calculations. Example: Adjusted Close Calculations 2/13/03 Close = 46.99 2/14/03 Close = 48.30 2/18/03 Split = 2:1 2/18/03 Close = 24.96 2/19/03 Cash Dividend = 0.08 (ex-date) 2/19/03 Close = 24.53 Split Multiplier = 0.5 Dividend Multiplier = 1 (0.08/24.96) = 0.9968 2/13/03 Adj. Close = 0.5 * 0.9968 * 46.99 = 23.419816 2/14/03 Adj. Close = 0.5 * 0.9968 * 48.30 = 24.07272 2/18/03