A package to get stock data from Yahoo Finance
Project description
Stockdex
Stockdex is a Python package that provides a simple interface to access financial data from Yahoo Finance. Data is returned as a pandas DataFrame.
Installation
Install the package using pip:
pip install stockdex
Usage
Create a Ticker
object by passing the ticker symbol of the stock you want to access. Then, you can access the following data:
from stockdex import Ticker
# Pick arbitrary ticker
ticker = Ticker('AAPL')
Chart data:
Pass the range and interval (by default, range is '1d' and interval is '1m') to get a dataframe of the stock's historical price data including open, high, low, close, and volume on each timestamp.
chart = ticker.chart(range='1y', dataGranularity='1d')
Summary data:
summary = ticker.summary
Historical data:
statistics = ticker.statistics
Financial data:
income_stmt = ticker.income_stmt
balance_sheet = ticker.balance_sheet
cash_flow = ticker.cash_flow
Analyst data:
analysis = ticker.analysis
Option data:
calls = ticker.calls
puts = ticker.puts
Profile data:
key_executives = ticker.key_executives
description = ticker.description
corporate_governance = ticker.corporate_governance
Holders data:
major_holders = ticker.major_holders
top_institutional_holders = ticker.top_institutional_holders
top_mutual_fund_holders = ticker.top_mutual_fund_holders
Dividends data from Digrin
Webstite:
History of dividends paid by the company.
dividend = ticker.dividend
Check out sphinx documentation here for more information about the package.
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.