financialdatapy.financials module

This module states abstract class for financial statements.

class financialdatapy.financials.Financials(symbol: str, financial: str = 'income_statement', period: str = 'annual')[source]

Bases: abc.ABC

Abstract class representing financial statements of a company.

Parameters
  • symbol (str) – Symbol of a company.

  • financial (str, optional) – One of the three financial statement. ‘income_statement’ or ‘balance_sheet’ or ‘cash_flow’, defaults to ‘income_statement’.

  • period (str, optional) – Either ‘annual’ or ‘quarter’, defaults to ‘annual’.

property symbol: str

Getter method of property symbol.

Returns

Symbol of a company.

Return type

str

property financial: str

Getter method of property financial.

Returns

Selected type of financial statement.

Return type

str

property period: str

Getter method of property period.

Returns

Selected period of financial statement.

Return type

str

abstract get_financials() pandas.core.frame.DataFrame[source]
abstract open_report() None[source]
get_standard_financials() pandas.core.frame.DataFrame[source]

Get standard financial statements of a company from investing.com.

Returns

Standard financial statement.

Return type

pandas.DataFrame

class financialdatapy.financials.UsFinancials(symbol: str, financial: str = 'income_statement', period: str = 'annual')[source]

Bases: financialdatapy.financials.Financials

A class representing financial statements of a company in US.

Parameters
  • symbol (str) – Symbol of a company.

  • financial (str, optional) – One of the three financial statement. ‘income_statement’ or ‘balance_sheet’ or ‘cash_flow’, defaults to ‘income_statement’.

  • period (str, optional) – Either ‘annual’ or ‘quarter’, defaults to ‘annual’

open_report() None[source]

Open a link of the corporate filing in a web browser.

get_financials() pandas.core.frame.DataFrame[source]

Get financial statement as reported.

Returns

Financial statement as reported.

Return type

pandas.DataFrame

class financialdatapy.financials.KorFinancials(symbol: str, financial: str = 'income_statement', period: str = 'annual')[source]

Bases: financialdatapy.financials.Financials

Class representing financial statements of stocks in Korea Exchange.

Parameters
  • symbol (str) – Symbol of a company/stock.

  • financial (str, optional) – Which financial statement to retrieve, defaults to ‘income_statement’.

  • period (str, optional) – Either ‘annual’ or ‘quarter’, defaults to ‘annual’.

  • api_key (str) – Api key for opendart.fss.or.kr, defaults to None.

get_financials() pandas.core.frame.DataFrame[source]

Get financial statement of a company.

Returns

Financial statement.

Return type

pandas.DataFrame

open_report() None[source]

Open a link of the corporate filing in a web browser.