atreadw1492/yahoo_fin
소개
Scrape stock price history from new (Spring 2017) Yahoo Finance layout
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalyahoo_fin
Scrape stock price history from new (Spring 2017) Yahoo Finance layout
Full documentation is available on my website, here: http://theautomatic.net/yahoo_fin-documentation/.
If you're familiar with the "get_data_yahoo" method in pandas.io.data, this package's initial purpose was to serve as an updated replacement based off Yahoo Finance's change in layout and its API (Spring 2017). Since then, the package has been developed to scrape stock fundamentals data, ticker symbols from popular exchanges, (including S&P 500, NASDAQ, Dow Jones, and NYSE), balance sheets, income statements, cash flows, data on holders and analysts, and additional data such as beta / dividend information / 1 yr est. etc. Additionally, it contains a module for scraping options data.
The package contains two modules: stock_info and options.
Download using pip:
pip install yahoo_fin
Examples:
from yahoo_fin.stock_info import get_data, tickers_sp500, tickers_nasdaq, tickers_other, get_quote_table
""" pull historical data for Netflix (NFLX) """
nflx = get_data("NFLX")
""" pull data for Apple (AAPL) """
"""case sensitivity does not matter"""
aapl = get_data("aapl")
In
""" get list of all stocks currently traded
on NASDAQ exchange """
nasdaq_ticker_list = tickers_nasdaq()
""" get list of all stocks currently in the S&P 500 """
sp500_ticker_list = tickers_sp500()
""" get other tickers not in NASDAQ (based off nasdaq.com)"""
other_tickers = tickers_other()
""" get information on stock from quote page """
info = get_quote_table("amzn")
For more in-depth tutorials on yahoo_fin, check out the following links:
Introduction & Getting historical stock prices: http://theautomatic.net/2018/01/25/coding-yahoo_fin-package/
Getting stock fundamentals data: http://theautomatic.net/2020/05/05/how-to-download-fundamentals-data-with-python/
Retrieving real-time stock prices: http://theautomatic.net/2018/07/31/how-to-get-live-stock-prices-with-python/
Getting options chains: http://theautomatic.net/2019/04/17/how-to-get-options-data-with-python/
YouTube playlist on collecting stock data: https://www.youtube.com/playlist?list=PL1EfVfbD6djHHxTzicLzdX5jzH0wEgDs7
관련 프로젝트 살펴보기
불러오는 중…