Download and store historical stock data to a Pandas dataframe using the Yahoo! Finance API.
Project description
Minimal Yahoo! Finance API
A minimal library for downloading stock data from Yahoo! Finance into a Pandas DataFrame.
Since I am using this functionality for some time now, I thought I might as well write up this code nicely into a library and make it available.
Example
from mini_yahoo_finance import get_stock_df
df = get_stock_df('ADS.DE',
'01-01-2018',
end_date='31-01-2018',
interval='1d',
max_retries=3)
Usage
Accepted values for interval
are:
1d
(default)1wk
1mo
If no end_date
is provided, the current date will be used.
Installation
git clone https://github.com/lucaionescu/mini-yahoo-finance-api.git
cd mini-yahoo-finance-api/
pip install .
Requirements
- BeautifulSoup
- Pandas
- Requests
Possible future to-dos
- remove BeautifulSoup dependency
- bulk download of multiple stocks using multithreading
Suggestions or problems? Don't hesitate to contact me or open a pull request!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for mini_yahoo_finance-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 878049afd34f68f582aae1263d383d4523ab3568d01c023274b75387a433abc7 |
|
MD5 | bb45334d07c8699d2a9f638595072929 |
|
BLAKE2b-256 | 45322f9293c954a7d49463d4ff50cf6e61d970631fa08e377a50af16bc779398 |