financialdatapy.market module¶
This module handles logic of choosing which stock exchange to search.
- class financialdatapy.market.Market(country_code: str)[source]¶
Bases:
objectThis class represents a stock exchange.
- Parameters
country_code (str) – Country where the stock is listed.
- financial_statement(symbol: str, financial: str, period: str, is_standard: bool, web: bool) Optional[pandas.core.frame.DataFrame][source]¶
Get financial statements.
- Parameters
symbol (str) – Symbol of a company/stock.
financial (str) – Which financial statement to retrieve.
period (str) – Either ‘annual’ or ‘quarter.
is_standard (bool) – Option for retrieving standard financial statements.
web (bool) – Option for opening filings in a web browser.
- Raises
NotAvailable – If the symbol is not listed in the stock exchange.
- Returns
Financials as reported or standard financials or None.
- Return type
pandas.DataFrame or None
- historical_price(symbol: str, start: datetime.datetime, end: datetime.datetime) pandas.core.frame.DataFrame[source]¶
Get historical stock price data.
- Parameters
symbol (str) – Symbol of a company/stock.
start (datetime.datetime) – Start date to query.
end (datetime.datetime) – End date to query.
- Raises
NotAvailable – If the symbol is not listed in the stock exchange.
- Returns
Historical stock price data.
- Return type
pandas.DataFrame