financialdatapy.price module

This module retrieves the historical stock price of a company.

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

Bases: 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.

abstractmethod get_price_data()[source]
class financialdatapy.price.UsMarket(symbol: str, start: Timestamp, end: Timestamp)[source]

Bases: Price

A class representing stock price of a US company.

get_price_data() → 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: Timestamp, end: Timestamp)[source]

Bases: Price

A class representing stock price of a South Korea company.

get_price_data() → DataFrame[source]

Get historical stock price data.

Returns:

Historical stock price data.

Return type:

pandas.DataFrame