Skip to main content

Downloads and saves Yahoo finance stock data.

Project description

download_yfinance_data

Downloads Yahoo Finance data with yfinance in Python.

Usage

It's best to customize the list of stocks you want to download. Change the list at the bottom of download_stocks.py. Then run the file: python download_stocks.py. You can also download the entire stocklist from NASDAQ, which should take around 15 minutes to download the data, then another few minutes to store in a sqlite db. To download all stocks, you can do:

ipython

import download_stocks as ds
ds.download_stocklist()

List of stocks

Retrieved from here: ftp://ftp.nasdaqtrader.com/symboldirectory

Notes

Currently, yfinance is correcting the OHL for dividends by using the same ratio as for the close. I think this is incorrect, and it should be using the dividends to subtract that amount from the days prior to the dividend.

To do

  • Add other storage mechanisms (arctic db which uses MongoDB, postgresql, etc)
  • Error checking/testing

Project details


Release history Release notifications

This version

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for download-yfinance-data, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size download_yfinance_data-0.0.1-py3-none-any.whl (2.6 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size download-yfinance-data-0.0.1.tar.gz (1.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page