financialdatapy.price module

This module retrieves the historical stock price of a company.

class financialdatapy.price.Price(symbol: str, start: pandas._libs.tslibs.timestamps.Timestamp, end: pandas._libs.tslibs.timestamps.Timestamp)[source]

Bases: abc.ABC

A Class representing a company’s historical stock price data.

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

  • start (pandas.Timestamp) – Starting date to search.

  • end (pandas.Timestamp) – Ending date to search.

abstract get_price_data()[source]
class financialdatapy.price.UsMarket(symbol: str, start: pandas._libs.tslibs.timestamps.Timestamp, end: pandas._libs.tslibs.timestamps.Timestamp)[source]

Bases: financialdatapy.price.Price

A class representing stock price of a US company.

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

Get historical stock price data.

Parameters

data (dict) – Historical stock price data in JSON

Returns

Historical stock price data.

Return type

pandas.DataFrame

class financialdatapy.price.KorMarket(symbol: str, start: pandas._libs.tslibs.timestamps.Timestamp, end: pandas._libs.tslibs.timestamps.Timestamp)[source]

Bases: financialdatapy.price.Price

A class representing stock price of a South Korea company.

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

Get historical stock price data.

Returns

Historical stock price data.

Return type

pandas.DataFrame