camisatx / pySecMaster

An automated system to store and maintain financial data.
GNU Affero General Public License v3.0
69 stars 25 forks source link

Adding Quandl's EOD #24

Closed mueljul closed 6 years ago

mueljul commented 6 years ago

Hi Josh, your program is awesome, thank you for making it available and maintaining it. I would like to add Quandl's EOD dataset as a source to complement the somewhat disappointing WIKI data. Though, I am running into an issue. Maybe you could tell what I am doing wrong and how to add Quandl's EOD? I am receiving this error message: (AAPL as an example, not working for any symbol, despite > 9000 tsids are recognised correctly) _"The data source for EOD/AAPL is not implemented in the price extractor. Please define the columns in QuandlDownload.download_quandldata."

So I guess something is wrong with class QuandlDownload(object) -> download_quandl_data or class QuandlDataExtraction(object) ?

I tried adding a paragraph elif q_code[:4] == 'EOD': in the download_quandl_data function and a elif self.download_selection[:4] == 'eod': in the init function of class QuandlDataExtraction(object). I have also added a section in the build_symbology.py to include EOD/ . But that's not doing the job. What am I missing here?

camisatx commented 6 years ago

Hey Julien,

Adding the EOD dataset is a fantastic suggestion. I really like how it will provide high quality unadjusted prices, splits and dividends. This is especially pertinent since the Yahoo Finance and Google Finance extractors are currently broken.

I quickly looked things over, and these are the changes that are required:

This is kind of an extensive addition, but I really think it will be worth it. If you don't mind, I think I can add this functionality over the weekend.

mueljul commented 6 years ago

That would be great!

camisatx commented 6 years ago

I updated the system so Quandl EOD can now be downloaded. I only tested it with the few dozen test codes, but it appears to work fine.

Also, I added a price adjustment function for converting the raw prices into adjusted prices. Check out the notes I wrote here.

To actually download the EOD data:

You can download both WIKI and EOD if you want, by using --daily-download quandl.wiki quandl.eod.

I'm closing this issue, but feel free to ask any questions/bugs you have!