News for hackers. Stuff that matters.
Re:Nasdaq Acquires Quandl to Advance the Use of Alternative ... by claytonjy on Tuesday December 04, 2018 @02:01PM (#18602567)
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

Re:Nasdaq Acquires Quandl to Advance the Use of Alternative ... by anonu on Tuesday December 04, 2018 @08:09PM (#18604960)
Always 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.

Re:Nasdaq Acquires Quandl to Advance the Use of Alternative ... by claytonjy on Tuesday December 04, 2018 @05:25PM (#18604134)
I 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.