omaha package

Submodules

omaha.client module

class omaha.client.Client(apikey)[source]

Bases: object

Buffett Code API Client

apikey

Apikey for BuffettCode API

Type

str

ENDPOINT = 'https://api.buffett-code.com'
companies()[source]

Company endpoint

See: http://docs.buffett-code.com/#/default/get_api_v2_company

quarter(ticker, from_q, to_q)[source]

Quarter endpoint

See: http://docs.buffett-code.com/#/default/get_api_v2_quarter

Parameters
  • ticker (str) – Ticker symbol

  • from_q (str) – Beginning quarter of the target range

  • to_q (str) – End quarter of the target range

search(keywords)[source]

Search endpoint

See: http://docs.buffett-code.com/#/default/get_api_v2_search

omaha.company module

class omaha.company.Company(ticker, from_q, to_q, client)[source]

Bases: omaha.joinable.Joinable

Container for the financial indicators of the public company

ticker

Ticker symbol

Type

str

from_q

Beginning quarter of the target range

Type

str

to_q

End quarter of the target range

Type

str

client

BuffettCode API Client

Type

Client

all()[source]
classmethod dict_pairs(d, keys)[source]
get(item)[source]
raw_df()[source]
class omaha.company.Stockprice(ticker, start_date, end_date)[source]

Bases: omaha.joinable.Joinable

Container for the daily stockprice of the public company.

raw_df()[source]

omaha.indicator module

class omaha.indicator.Indicator(apikey)[source]

Bases: object

Financial indicators for the given company

get(ticker, from_q, to_q)[source]

omaha.joinable module

class omaha.joinable.Joinable(joinables)[source]

Bases: object

Joinable views

The dataframe of the class can be joined with the end date of the financial report.

df()[source]

DataFrame representing the underlying financial data.

Returns

DataFrame representing the underlying financial data

Return type

DataFrame

join(other)[source]

Joined with other financial data container.

raw_df()[source]

omaha.omaha module

class omaha.omaha.Omaha(bc_apikey, quandl_apikey)[source]

Bases: object

Omaha provides a unified view of the financial information of the public companies.

bc_apikey

Apikey of BuffettCode API

Type

str

quandl_apikey

Apikey of Quandl

Type

str

category(cat, from_q, to_q)[source]

List of companies filtering by the given TSE 33 sectors.

See: https://www.jpx.co.jp/english/markets/indices/line-up/files/e_fac_13_sector.pdf

Parameters
  • keywords (str) – Keyword used for searching companies

  • from_q (str) – Beginning quarter of the target range

  • to_q (str) – End quarter of the target range

Returns

List of companies matching with the given TSE 33 sectors.

Return type

list

Example

>>> factory = Omaha(bc_apikey='xxxx'), quandl_apikey='yyyy')
>>> factory.category('サービス業', '2019-01-01', '2019-12-31')
company(ticker, from_q, to_q)[source]

Basic financial indicators of the company

Parameters
  • ticker (str) – Ticker symbol

  • from_q (str) – Beginning of the target quarter

  • to_q (str) – End of the target quarter

Returns

Target company

Return type

Company

Example

>>> factory = Omaha(bc_apikey='xxxx'), quandl_apikey='yyyy')
>>> factory.company('1111', '2019Q1', '2019Q4')
search(keywords, from_q, to_q)[source]

List of matched companies with given search keyword

Parameters
  • keywords (str) – Keyword used for searching companies

  • from_q (str) – Beginning quarter of the target range

  • to_q (str) – End quarter of the target range

Returns

List of companies matching with the given keyword.

Return type

list

Example

>>> factory = Omaha(bc_apikey='xxxx'), quandl_apikey='yyyy')
>>> factory.search('不動産', '2019-01-01', '2019-12-31')
stockprice(ticker, start_date, end_date)[source]

Stockprice of the given company

Parameters
  • ticker (str) – Ticker symbol

  • start_date (str) – Start date of the target range

  • end_date (str) – End date of the target range

Returns

Object containing stock prices

Return type

Stockprice

Example

>>> factory = Omaha(bc_apikey='xxxx'), quandl_apikey='yyyy')
>>> factory.stockprice('1111', '2019-01-01', '2019-12-31')

omaha.version module

Module contents