3 ms·
I feel this; I email Quandl regularly to fix data errors that the simplest of automated checks should catch ("why is this price 1200% higher than the previous o
by claytonjy 8y ago
I feel this; I email Quandl regularly to fix data errors that the simplest of automated checks should catch ("why is this price 1200% higher than the previous one?").
But, they do have a mostly-decent API (tables; timeseries is pretty bad).
Something that always bugs me is properly adjusting prices when backtesting. The "right" way seems to be how Quantopian now handles it [1], in a just-in-time fashion, but that code isn't in their public libraries, and over email they declined to tell me where they get the data.
[1] https://www.quantopian.com/quantopian2/adjustments https://www.quantopian.com/quantopian2/adjustments
- claytonjy 8y agoI stand corrected; the code for on-the-fly adjusting _is_ in Zipline, but you have to know that stock splits are treated like dividends, which wasn't obvious to me. At least some of data they use comes from a vendor they aren't able to name publicly.
- anonu 8y agoAlways store unadjusted prices and volumes Keep an updated corp action table with date, corp action type, and adjustment factor. Corp action type is important because divs adjust prices but not volumes, for example. Splits adjust both. When you're ready to use an adjusted time-series: select the corp actions you care about and calculate a running product of 1+the adjustment factor. As-of join the adjustment factors, multiply and you're done.