Equity - finflux.equity()#

Before accessing the equity() class functions, you must first assign a string-formatted ticker symbol to the class’s ticker attribute.

import finflux as ff
ff.equity('TICKER').example_function(param1 = 'param', ...)
#NOTE: Only ticker symbols searchable via Yahoo Finance are supported

Functions#

timeseries(display='table', period='5y', start=None, end=None, interval='1d', data='all', calculation='price', round=True, show=True, save=False)#
Parameters:
  • display (str) – Specifies the output format; VALID VALUES: 'json' , 'table' , 'line'

  • period (str) – The duration of the timeseries (used if start and end parameters are not provided); VALID VALUES: '1mo' , '6mo' , '1y' , '2y' , '5y' , '10y' , 'ytd' , 'max'

  • start (None or str) – Optional start date in 'YYYY-MM-DD' format. Overrides period parameter if both start and end parameters are set.

  • end (None or str) – Optional end date in 'YYYY-MM-DD' format. Overrides period parameter if both start and end parameters are set.

  • interval (str) – Data frequency; VALID VALUES: '1d' , '1wk' , '1mo' , '3mo'

  • data (str) – Type of OHLCV data to retrieve; VALID VALUES: 'open' , 'high' , 'low' , 'close' , 'volume' , 'all'

  • calculation (str) – Data interpretation; VALID VALUES: 'price' , 'simple return' , 'log return'

  • round (bool) – Whether to round numerical values to 2 decimal places; VALID VALUES: True , False

  • show (bool) – Display the chart as an output if display == 'line'; VALID VALUES: True , False

  • save (bool) – Download the figure as a png if display == 'line'; VALID VALUES: True , False

Returns:

A pandas DataFrame, row oriented JSON formatted output, or simple matplotlib graph of a timeseries OHLC price and volume data for the specified equity.

Source:

Yahoo Finance (yfinance)

equity_candle(period='6mo', start=None, end=None, interval='1d', sma=None, volume=True, bollinger=None, o_label=True, h_label=True, l_label=True, c_label=True, legend=False, title=True, show=True, save=False)#
Parameters:
  • period (str) – The duration of the chart (used if start and end parameters are not provided); VALID VALUES: '1mo' , '6mo' , '1y' , '2y' , '5y' , '10y' , 'ytd' , 'max'

  • start (None or str) – Optional start date in 'YYYY-MM-DD' format. Overrides period parameter if both start and end parameters are set.

  • end (None or str) – Optional end date in 'YYYY-MM-DD' format. Overrides period parameter if both start and end parameters are set.

  • interval (str) – Candlestick frequency; VALID VALUES: '1d' , '1wk' , '1mo'

  • sma (None or list) – Optional standard moving average line(s) generation (len(sma) capped at 5); VALID VALUES: None , list of int >=10 and <=300

  • volume (bool) – Optional volume chart; VALID VALUES: True , False

  • bollinger (None or list) – Optional bollinger band standard deviation range(s) generation (len(bollinger) must equal len(sma)); VALID VALUES: None or list of int/float >=0.1 and <=3.0

  • o_label (bool) – Optional plot open price label; VALID VALUES: True , False

  • h_label (bool) – Optional plot high price label; VALID VALUES: True , False

  • l_label (bool) – Optional plot low price label; VALID VALUES: True , False

  • c_label (bool) – Optional plot close price label; VALID VALUES: True , False

  • legend (bool) – Optional legend; VALID VALUES: True , False

  • title (bool) – Optional title; VALID VALUES: True , False

  • show (bool) – Display the chart as an output; VALID VALUES: True , False

  • save (bool) – Download the figure as a png; VALID VALUES: True , False

Returns:

A matplotlib OHLC candlestick chart figure for the specified equity

Source:

Yahoo Finance (yfinance)

realtime(display='json')#
Parameters:

display (str) – Specifies the output format; VALID VALUES: 'json' , 'pretty'

Returns:

A JSON- or string-formatted display of the specified equity’s real-time stock price.

Source:

Twelve Data

statement(display='json', statement='all', currency=None, unit='raw', decimal=False, interval='annual')#
Parameters:
  • display – Specifies the output format; VALID VALUES: 'json' , 'table'

  • statement – Type of finanial statement to retrieve; VALID VALUES: 'income' , 'balance' , 'cash' , 'all'

  • currency – Optional currency code (e.g., 'EUR' or 'KRW') for value conversion.

  • unit – Numerical unit format; VALID VALUES: 'thousand' , 'million' , 'raw'

  • decimal – Whether to return values with decimal precision; VALID VALUES: True , False

  • interval – Reporting frequency; VALID VALUES: 'annual' , 'quarter'

Returns:

The specified equity’s financial statement data for the four most recent periods, formatted as either JSON or a pandas DataFrame.

Source:

Yahoo Finance (yfinance), Twelve Data

equity_quote(display='json')#
Parameters:

display (str) – Specifies the output format; VALID VALUES: 'json' , 'pretty'

Returns:

The specified equity’s stock quote, including EOD OHLCV figures, TTM high/low, percentage changes over various periods, and SMAs for price and volume, formatted as either JSON or a string.

Source:

Yahoo Finance (yfinance)

info(display='json')#
Parameters:

display (str) – Specifies the output format; VALID VALUES: 'json' , 'pretty'

Returns:

An overview of the specified equity’s descriptive metadata, formatted as either JSON or a string.

Source:

Yahoo Finance (yfinance), US Securities and Exchange Commission

filings(form=None)#
Parameters:

form (str) – Specifies the form (e.g., '10-K' or '8-K') to retrieve - REQUIRED

Returns:

A pandas DataFrame of the metadata of the specified equity’s form within “at least one year’s of filing or to 1,000 (whichever is more) of the most recent filings” (SEC EDGAR APIs)

Source:

US Securities and Exchange Commission

analyst_estimates(display='json')#
Parameters:

display (str) – Specifies the output format; VALID VALUES: 'json' , 'pretty'

Returns:

The specified equity’s earnings, revenue, growth, and price estimates for the current/next quarter and year, formatted as either JSON or a string.

Source:

Yahoo Finance (yfinance)

dividend(display='json', period='5y', show=True, save=False)#
Parameters:
  • display (str) – Specifies the output format; VALID VALUES: 'json' , 'table' , 'line' , 'bar'

  • period (str) – The duration of the timeseries; VALID VALUES: '1y' , '2y' , '5y' , '10y' , 'ytd' , 'max'

  • show (bool) – Display the chart as an output if display in ('line', 'bar'); VALID VALUES: True , False

  • save (bool) – Download the figure as a png if display in ('line', 'bar'); VALID VALUES: True , False

Returns:

A pandas DataFrame, JSON-formatted output, or simple matplotlib graph of the timeseries dividend data for the specified equity.

Source:

Yahoo Finance (yfinance)

split(display='json')#
Parameters:

display (str) – Specifies the output format; VALID VALUES: 'json' , 'table'

Returns:

A pandas DataFrame or JSON-formatted output of the timeseries stock split data for the specified equity.

Source:

Yahoo Finance (yfinance)

stats(display='json')#
Parameters:

display (str) – Specifies the output format; VALID VALUES: 'json' , 'pretty'

Returns:

A comprehensive overview of the specified equity’s valuation, profitability, growth, liquidity, leverage, efficiency, and cash flow metrics across the past four fiscal years and the most recent period.

Source:

Yahoo Finance (yfinance)

eps(display='json')#
Parameters:

display (str) – Specifies the output format; VALID VALUES: 'json' , 'table'

Returns:

A pandas DataFrame or row oriented JSON formatted output of the timeseries eps data for the past 10 or 11 quarters of the specified equity.

Source:

Yahoo Finance (yfinance)