from finalytics import Ticker
= Ticker(symbol="AAPL",
ticker ="2023-01-01",
start_date="2024-01-01",
end_date="1d",
interval="^GSPC",
benchmark_symbol=0.95,
confidence_level=0.02) risk_free_rate
Ticker Module Documentation
Ticker
A class representing a Ticker object.
__new__
Create a new Ticker object.
Parameters:
symbol
(str): The ticker symbol of the asset.start_date
(Optional[str]): Optional start date for historical data, defaults to None.end_date
(Optional[str]): Optional end date for historical data, defaults to None.interval
(Optional[str]): Optional data interval (2m, 5m, 15m, 30m, 1h, 1d, 1wk, 1mo, 3mo), defaults to None.benchmark_symbol
(Optional[str]): Optional benchmark symbol, defaults to None.confidence_level
(Optional[float]): Optional confidence level for statistics, defaults to None.risk_free_rate
(Optional[float]): Optional risk-free rate for calculations, defaults to None.
Returns:
Ticker
: A Ticker object.
Example:
get_quote
Get the current ticker quote stats.
Returns:
dict
: Dictionary containing current ticker quote stats.
Example:
= ticker.get_quote()
quote print(quote)
{'Symbol': 'AAPL', 'Name': 'Apple Inc.', 'Exchange': 'NasdaqGS', 'Currency': 'USD', 'Timestamp': 1755010001, 'Current Price': 228.66, '24H Volume': 14076763.0, '24H Open': 228.005, '24H High': 229.9399, '24H Low': 227.1, '24H Close': 227.18}
get_summary_stats
Get summary technical and fundamental statistics for the ticker.
Returns:
dict
: Dictionary containing summary statistics.
Example:
= ticker.get_summary_stats()
summary_stats print(summary_stats)
shape: (65, 2)
┌──────────────────────────┬─────────────────┐
│ Metric ┆ Value │
│ --- ┆ --- │
│ str ┆ str │
╞══════════════════════════╪═════════════════╡
│ Currency ┆ USD │
│ Current Price ┆ 228.66 │
│ Day Range ┆ 229.94 - 227.10 │
│ 52 Week Change ┆ 2.67% │
│ Previous Close ┆ 227.18 │
│ … ┆ … │
│ Morningstar Risk Rating ┆ │
│ Annual Holdings Turnover ┆ │
│ Annual Expense Ratio ┆ │
│ Circulating Supply ┆ │
│ CoinMarketCap Link ┆ │
└──────────────────────────┴─────────────────┘
get_price_history
Get the OHLCV data for the ticker for a given time period.
Returns:
DataFrame
: Polars DataFrame containing OHLCV data.
Example:
= ticker.get_price_history()
price_history print(price_history)
shape: (250, 7)
┌──────────────┬────────────┬────────────┬────────────┬────────────┬────────────┬────────────┐
│ timestamp ┆ open ┆ high ┆ low ┆ close ┆ volume ┆ adjclose │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ datetime[ms] ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 │
╞══════════════╪════════════╪════════════╪════════════╪════════════╪════════════╪════════════╡
│ 2023-01-03 ┆ 130.279999 ┆ 130.899994 ┆ 124.169998 ┆ 125.07 ┆ 1.121175e8 ┆ 123.330643 │
│ 00:00:00 ┆ ┆ ┆ ┆ ┆ ┆ │
│ 2023-01-04 ┆ 126.889999 ┆ 128.660004 ┆ 125.080002 ┆ 126.360001 ┆ 8.91136e7 ┆ 124.602707 │
│ 00:00:00 ┆ ┆ ┆ ┆ ┆ ┆ │
│ 2023-01-05 ┆ 127.129997 ┆ 127.769997 ┆ 124.760002 ┆ 125.019997 ┆ 8.09627e7 ┆ 123.281342 │
│ 00:00:00 ┆ ┆ ┆ ┆ ┆ ┆ │
│ 2023-01-06 ┆ 126.010002 ┆ 130.289993 ┆ 124.889999 ┆ 129.619995 ┆ 8.77547e7 ┆ 127.817375 │
│ 00:00:00 ┆ ┆ ┆ ┆ ┆ ┆ │
│ 2023-01-09 ┆ 130.470001 ┆ 133.410004 ┆ 129.889999 ┆ 130.149994 ┆ 7.07908e7 ┆ 128.340027 │
│ 00:00:00 ┆ ┆ ┆ ┆ ┆ ┆ │
│ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │
│ 2023-12-22 ┆ 195.179993 ┆ 195.410004 ┆ 192.970001 ┆ 193.600006 ┆ 3.71496e7 ┆ 191.974686 │
│ 00:00:00 ┆ ┆ ┆ ┆ ┆ ┆ │
│ 2023-12-26 ┆ 193.610001 ┆ 193.889999 ┆ 192.830002 ┆ 193.050003 ┆ 2.89193e7 ┆ 191.429306 │
│ 00:00:00 ┆ ┆ ┆ ┆ ┆ ┆ │
│ 2023-12-27 ┆ 192.490005 ┆ 193.5 ┆ 191.089996 ┆ 193.149994 ┆ 4.80877e7 ┆ 191.528458 │
│ 00:00:00 ┆ ┆ ┆ ┆ ┆ ┆ │
│ 2023-12-28 ┆ 194.139999 ┆ 194.660004 ┆ 193.169998 ┆ 193.580002 ┆ 3.40499e7 ┆ 191.954849 │
│ 00:00:00 ┆ ┆ ┆ ┆ ┆ ┆ │
│ 2023-12-29 ┆ 193.899994 ┆ 194.399994 ┆ 191.729996 ┆ 192.529999 ┆ 4.26721e7 ┆ 190.913666 │
│ 00:00:00 ┆ ┆ ┆ ┆ ┆ ┆ │
└──────────────┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────┘
get_options_chain
Get the options chain for the ticker.
Returns:
DataFrame
: Polars DataFrame containing the options chain.
Example:
= ticker.get_options_chain()
options_chain print(options_chain)
shape: (2_048, 16)
┌────────────┬───────────┬──────┬────────────┬───┬────────────┬────────────┬───────────┬───────────┐
│ expiration ┆ ttm ┆ type ┆ contractSy ┆ … ┆ contractSi ┆ lastTradeD ┆ impliedVo ┆ inTheMone │
│ --- ┆ --- ┆ --- ┆ mbol ┆ ┆ ze ┆ ate ┆ latility ┆ y │
│ str ┆ f64 ┆ str ┆ --- ┆ ┆ --- ┆ --- ┆ --- ┆ --- │
│ ┆ ┆ ┆ str ┆ ┆ str ┆ datetime[m ┆ f64 ┆ bool │
│ ┆ ┆ ┆ ┆ ┆ ┆ s] ┆ ┆ │
╞════════════╪═══════════╪══════╪════════════╪═══╪════════════╪════════════╪═══════════╪═══════════╡
│ 2025-08-15 ┆ 0.098555 ┆ call ┆ AAPL250815 ┆ … ┆ REGULAR ┆ 2025-08-11 ┆ 4.04688 ┆ true │
│ ┆ ┆ ┆ C00090000 ┆ ┆ ┆ 19:26:37 ┆ ┆ │
│ 2025-08-15 ┆ 0.098555 ┆ call ┆ AAPL250815 ┆ … ┆ REGULAR ┆ 2025-08-11 ┆ 3.914063 ┆ true │
│ ┆ ┆ ┆ C00095000 ┆ ┆ ┆ 14:02:05 ┆ ┆ │
│ 2025-08-15 ┆ 0.098555 ┆ call ┆ AAPL250815 ┆ … ┆ REGULAR ┆ 2025-08-11 ┆ 3.476564 ┆ true │
│ ┆ ┆ ┆ C00100000 ┆ ┆ ┆ 19:28:31 ┆ ┆ │
│ 2025-08-15 ┆ 0.098555 ┆ call ┆ AAPL250815 ┆ … ┆ REGULAR ┆ 2025-08-08 ┆ 2.703128 ┆ true │
│ ┆ ┆ ┆ C00105000 ┆ ┆ ┆ 17:57:07 ┆ ┆ │
│ 2025-08-15 ┆ 0.098555 ┆ call ┆ AAPL250815 ┆ … ┆ REGULAR ┆ 2025-08-08 ┆ 3.378908 ┆ true │
│ ┆ ┆ ┆ C00110000 ┆ ┆ ┆ 18:42:39 ┆ ┆ │
│ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │
│ 2027-12-17 ┆ 28.153745 ┆ put ┆ AAPL271217 ┆ … ┆ REGULAR ┆ 2025-07-10 ┆ 0.18232 ┆ true │
│ ┆ ┆ ┆ P00350000 ┆ ┆ ┆ 19:16:51 ┆ ┆ │
│ 2027-12-17 ┆ 28.153745 ┆ put ┆ AAPL271217 ┆ … ┆ REGULAR ┆ 2025-04-15 ┆ 0.00001 ┆ true │
│ ┆ ┆ ┆ P00370000 ┆ ┆ ┆ 16:23:18 ┆ ┆ │
│ 2027-12-17 ┆ 28.153745 ┆ put ┆ AAPL271217 ┆ … ┆ REGULAR ┆ 2025-05-22 ┆ 0.499959 ┆ true │
│ ┆ ┆ ┆ P00400000 ┆ ┆ ┆ 18:39:16 ┆ ┆ │
│ 2027-12-17 ┆ 28.153745 ┆ put ┆ AAPL271217 ┆ … ┆ REGULAR ┆ 2025-05-14 ┆ 0.548436 ┆ true │
│ ┆ ┆ ┆ P00435000 ┆ ┆ ┆ 14:15:57 ┆ ┆ │
│ 2027-12-17 ┆ 28.153745 ┆ put ┆ AAPL271217 ┆ … ┆ REGULAR ┆ 2025-07-07 ┆ 0.00001 ┆ true │
│ ┆ ┆ ┆ P00440000 ┆ ┆ ┆ 13:33:18 ┆ ┆ │
└────────────┴───────────┴──────┴────────────┴───┴────────────┴────────────┴───────────┴───────────┘
get_news
Get the historical news headlines for the given ticker.
Returns:
DataFrame
: Polars DataFrame containing news headlines.
Example:
= ticker.get_news()
news print(news)
shape: (1_914, 5)
┌────────────────┬─────────────────────┬────────────────────┬────────────────────┬─────────────────┐
│ Published Date ┆ Source ┆ Title ┆ Link ┆ Sentiment Score │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ datetime[ms] ┆ str ┆ str ┆ str ┆ f64 │
╞════════════════╪═════════════════════╪════════════════════╪════════════════════╪═════════════════╡
│ 2023-01-04 ┆ Bloomberg.com ┆ Apple’s (AAPL) ┆ <a href="https://n ┆ -0.70956 │
│ 08:00:00 ┆ ┆ Stock Is Losing… ┆ ews.google.c… ┆ │
│ 2023-01-04 ┆ Reuters ┆ Apple to sign ┆ <a href="https://n ┆ 0.0 │
│ 08:00:00 ┆ ┆ Luxshare for iPh… ┆ ews.google.c… ┆ │
│ 2023-01-03 ┆ Al Jazeera ┆ Apple’s market ┆ <a href="https://n ┆ 0.33995 │
│ 08:00:00 ┆ ┆ value drops bel… ┆ ews.google.c… ┆ │
│ 2023-01-03 ┆ Financial Times ┆ Apple’s market ┆ <a href="https://n ┆ 0.33995 │
│ 08:00:00 ┆ ┆ value falls bel… ┆ ews.google.c… ┆ │
│ 2023-01-04 ┆ The Guardian ┆ Death of the ┆ <a href="https://n ┆ -0.622427 │
│ 08:00:00 ┆ ┆ narrator? Apple u… ┆ ews.google.c… ┆ │
│ … ┆ … ┆ … ┆ … ┆ … │
│ 2024-01-01 ┆ Yahoo Finance ┆ Sodium Phosphate ┆ <a href="https://n ┆ 0.226348 │
│ 08:00:00 ┆ ┆ Market Size W… ┆ ews.google.c… ┆ │
│ 2024-01-01 ┆ Yahoo Finance ┆ 7 Megatrend Stocks ┆ <a href="https://n ┆ 0.0 │
│ 08:00:00 ┆ ┆ to Buy for … ┆ ews.google.c… ┆ │
│ 2023-12-30 ┆ The Indian Express ┆ iPhone 15 Pro Max ┆ <a href="https://n ┆ 0.0 │
│ 08:00:00 ┆ ┆ at Rs 10,000… ┆ ews.google.c… ┆ │
│ 2024-01-01 ┆ Yahoo Finance ┆ 3 Overhyped Crypto ┆ <a href="https://n ┆ -0.401924 │
│ 08:00:00 ┆ ┆ Projects to… ┆ ews.google.c… ┆ │
│ 2023-12-31 ┆ Analytics Insight ┆ Apple’s Innovation ┆ <a href="https://n ┆ 0.381819 │
│ 08:00:00 ┆ ┆ Journey: Ke… ┆ ews.google.c… ┆ │
└────────────────┴─────────────────────┴────────────────────┴────────────────────┴─────────────────┘
get_income_statement
Get the Income Statement for the ticker.
Parameters:
frequency
(str): frequency of the Income Statement (annual, quarterly).formatted
(optional[bool]): Whether to return the data in a formatted manner, defaults to True.
Returns:
DataFrame
: Polars DataFrame containing the Income Statement.
Example:
= ticker.get_income_statement(frequency="quarterly")
income_statement print(income_statement)
shape: (11, 6)
┌──────────────────────────────┬───────────┬───────────┬───────────┬───────────┬───────────┐
│ Items ┆ 2024Q2 ┆ 2024Q3 ┆ 2024Q4 ┆ 2025Q1 ┆ 2025Q2 │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 │
╞══════════════════════════════╪═══════════╪═══════════╪═══════════╪═══════════╪═══════════╡
│ Revenue ┆ 8.5777e10 ┆ 9.4930e10 ┆ 1.2430e11 ┆ 9.5359e10 ┆ 9.4036e10 │
│ Cost of Goods Sold ┆ 4.6099e10 ┆ 5.1051e10 ┆ 6.6025e10 ┆ 5.0492e10 ┆ 5.0318e10 │
│ Gross Profit ┆ 3.9678e10 ┆ 4.3879e10 ┆ 5.8275e10 ┆ 4.4867e10 ┆ 4.3718e10 │
│ Operating Expenses ┆ 1.4326e10 ┆ 1.4288e10 ┆ 1.5443e10 ┆ 1.5278e10 ┆ 1.5516e10 │
│ EBITDA ┆ 2.8202e10 ┆ 3.2502e10 ┆ 4.5912e10 ┆ 3.2250e10 ┆ 3.1032e10 │
│ … ┆ … ┆ … ┆ … ┆ … ┆ … │
│ Operating Profit (EBIT) ┆ 2.5352e10 ┆ 2.9591e10 ┆ 4.2832e10 ┆ 2.9589e10 ┆ 2.8202e10 │
│ Income Tax Expense ┆ 4.0460e9 ┆ 1.4874e10 ┆ 6.2540e9 ┆ 4.5300e9 ┆ 4.5970e9 │
│ Net Income ┆ 2.1448e10 ┆ 1.4736e10 ┆ 3.6330e10 ┆ 2.4780e10 ┆ 2.3434e10 │
│ Earnings per Share - Basic ┆ 1.4 ┆ 0.97 ┆ 2.41 ┆ 1.65 ┆ 1.57 │
│ Earnings per Share - Diluted ┆ 1.4 ┆ 0.97 ┆ 2.4 ┆ 1.65 ┆ 1.57 │
└──────────────────────────────┴───────────┴───────────┴───────────┴───────────┴───────────┘
get_balance_sheet
Get the Balance Sheet for the ticker.
Parameters:
frequency
(str): frequency of the Balance Sheet (annual, quarterly).formatted
(optional[bool]): Whether to return the data in a formatted manner, defaults to True.
Returns:
DataFrame
: Polars DataFrame containing the Balance Sheet.
Example:
= ticker.get_balance_sheet(frequency="quarterly")
balance_sheet print(balance_sheet)
shape: (21, 6)
┌──────────────────────────────┬───────────┬────────────┬────────────┬────────────┬────────────┐
│ Items ┆ 2024Q2 ┆ 2024Q3 ┆ 2024Q4 ┆ 2025Q1 ┆ 2025Q2 │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 │
╞══════════════════════════════╪═══════════╪════════════╪════════════╪════════════╪════════════╡
│ Cash and Cash Equivalents ┆ 2.5565e10 ┆ 2.9943e10 ┆ 3.0299e10 ┆ 2.8162e10 ┆ 3.6269e10 │
│ Accounts Receivable ┆ 2.2795e10 ┆ 3.3410e10 ┆ 2.9639e10 ┆ 2.6136e10 ┆ 2.7557e10 │
│ Inventories ┆ 6.1650e9 ┆ 7.2860e9 ┆ 6.9110e9 ┆ 6.2690e9 ┆ 5.9250e9 │
│ Other Current Assets ┆ 1.4297e10 ┆ 1.4287e10 ┆ 1.3248e10 ┆ 1.4109e10 ┆ 1.4359e10 │
│ Total Current Assets ┆ 1.2544e11 ┆ 1.5299e11 ┆ 1.3324e11 ┆ 1.1867e11 ┆ 1.2249e11 │
│ … ┆ … ┆ … ┆ … ┆ … ┆ … │
│ Total Liabilities ┆ 2.6490e11 ┆ 3.0803e11 ┆ 2.7733e11 ┆ 2.6444e11 ┆ 2.6566e11 │
│ Common Stock ┆ 7.9850e10 ┆ 8.3276e10 ┆ 8.4768e10 ┆ 8.8711e10 ┆ 8.9806e10 │
│ Retained Earnings ┆ -4.7260e9 ┆ -1.9154e10 ┆ -1.1221e10 ┆ -1.5552e10 ┆ -1.7607e10 │
│ Total Equity ┆ 6.6708e10 ┆ 5.6950e10 ┆ 6.6758e10 ┆ 6.6796e10 ┆ 6.5830e10 │
│ Total Liabilities and Equity ┆ 6.6708e10 ┆ 5.6950e10 ┆ 6.6758e10 ┆ 6.6796e10 ┆ 6.5830e10 │
└──────────────────────────────┴───────────┴────────────┴────────────┴────────────┴────────────┘
get_cashflow_statement
Get the Cashflow Statement for the ticker.
Parameters:
frequency
(str): frequency of the Cashflow Statement (annual, quarterly).formatted
(optional[bool]): Whether to return the data in a formatted manner, defaults to True.
Returns:
DataFrame
: Polars DataFrame containing the Cashflow Statement.
Example:
= ticker.get_cashflow_statement(frequency="quarterly")
cashflow_statement print(cashflow_statement)
shape: (26, 6)
┌─────────────────────────────────┬────────────┬────────────┬────────────┬────────────┬────────────┐
│ Items ┆ 2024Q2 ┆ 2024Q3 ┆ 2024Q4 ┆ 2025Q1 ┆ 2025Q2 │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 │
╞═════════════════════════════════╪════════════╪════════════╪════════════╪════════════╪════════════╡
│ Net Income from Continuing Ope… ┆ 2.1448e10 ┆ 1.4736e10 ┆ 3.6330e10 ┆ 2.4780e10 ┆ 2.3434e10 │
│ Depreciation, Amortization, an… ┆ 2.8500e9 ┆ 2.9110e9 ┆ 3.0800e9 ┆ 2.6610e9 ┆ 2.8300e9 │
│ Stock-Based Compensation ┆ 2.8690e9 ┆ 2.8580e9 ┆ 3.2860e9 ┆ 3.2260e9 ┆ 3.1680e9 │
│ Changes in Working Capital ┆ 1.6840e9 ┆ 6.6080e9 ┆ -1.0752e10 ┆ -6.5070e9 ┆ -2.0340e9 │
│ Cash Flow from Continuing Oper… ┆ 2.8858e10 ┆ 2.6811e10 ┆ 2.9935e10 ┆ 2.3952e10 ┆ 2.7867e10 │
│ … ┆ … ┆ … ┆ … ┆ … ┆ … │
│ Operating Cash Flow ┆ 2.8858e10 ┆ 2.6811e10 ┆ 2.9935e10 ┆ 2.3952e10 ┆ 2.7867e10 │
│ Investing Cash Flow ┆ -1.2700e8 ┆ 1.4450e9 ┆ 9.7920e9 ┆ 2.9170e9 ┆ 5.0730e9 │
│ Financing Cash Flow ┆ -3.6017e10 ┆ -2.4948e10 ┆ -3.9371e10 ┆ -2.9006e10 ┆ -2.4833e10 │
│ Ending Cash Position ┆ 2.6635e10 ┆ 2.9943e10 ┆ 3.0299e10 ┆ 2.8162e10 ┆ 3.6269e10 │
│ Free Cash Flow ┆ 2.6707e10 ┆ 2.3903e10 ┆ 2.6995e10 ┆ 2.0881e10 ┆ 2.4405e10 │
└─────────────────────────────────┴────────────┴────────────┴────────────┴────────────┴────────────┘
get_financial_ratios
Get the Financial Ratios for the ticker.
Parameters:
frequency
(str): frequency of the Financial Ratios (annual, quarterly).
Returns:
DataFrame
: Polars DataFrame containing the Financial Ratios.
Example:
= ticker.get_financial_ratios(frequency="quarterly")
financial_ratios print(financial_ratios)
shape: (21, 6)
┌─────────────────────────┬──────────┬──────────┬──────────┬──────────┬──────────┐
│ Items ┆ 2024Q2 ┆ 2024Q3 ┆ 2024Q4 ┆ 2025Q1 ┆ 2025Q2 │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 │
╞═════════════════════════╪══════════╪══════════╪══════════╪══════════╪══════════╡
│ Gross Profit Margin ┆ 0.462572 ┆ 0.462225 ┆ 0.468825 ┆ 0.470506 ┆ 0.464907 │
│ Operating Profit Margin ┆ 0.295557 ┆ 0.311714 ┆ 0.344586 ┆ 0.310291 ┆ 0.299906 │
│ Net Profit Margin ┆ 0.250044 ┆ 0.15523 ┆ 0.292277 ┆ 0.25986 ┆ 0.249202 │
│ Return on Assets ┆ 0.064678 ┆ 0.040375 ┆ 0.105584 ┆ 0.074811 ┆ 0.070692 │
│ Return on Equity ┆ 0.321521 ┆ 0.258753 ┆ 0.544204 ┆ 0.37098 ┆ 0.355978 │
│ … ┆ … ┆ … ┆ … ┆ … ┆ … │
│ Price to Earnings ┆ 7.129056 ┆ 9.683768 ┆ 4.148472 ┆ 5.866102 ┆ 6.326705 │
│ Price to Book ┆ 2.292139 ┆ 2.505707 ┆ 2.257617 ┆ 2.176208 ┆ 2.252165 │
│ Price to Sales ┆ 1.782576 ┆ 1.503213 ┆ 1.212502 ┆ 1.524366 ┆ 1.57663 │
│ Price to Cashflow ┆ 5.298496 ┆ 5.322442 ┆ 5.034709 ┆ 6.068888 ┆ 5.320271 │
│ Price to Free Cashflow ┆ 5.725241 ┆ 5.969962 ┆ 5.583034 ┆ 6.961448 ┆ 6.074985 │
└─────────────────────────┴──────────┴──────────┴──────────┴──────────┴──────────┘
volatility_surface
Computes the implied volatility surface for the ticker options chain.
Returns:
DataFrame
: Polars DataFrame containing the implied volatility surface.
Example:
= ticker.volatility_surface()
volatility_surface print(volatility_surface)
shape: (68, 13)
┌────────┬──────────┬──────────┬───────────┬───┬──────────┬──────────┬──────────┬──────────┐
│ strike ┆ 3.32M ┆ 4.24M ┆ 5.16M ┆ … ┆ 16.20M ┆ 17.12M ┆ 22.14M ┆ 28.15M │
│ --- ┆ --- ┆ --- ┆ --- ┆ ┆ --- ┆ --- ┆ --- ┆ --- │
│ f64 ┆ f64 ┆ f64 ┆ f64 ┆ ┆ f64 ┆ f64 ┆ f64 ┆ f64 │
╞════════╪══════════╪══════════╪═══════════╪═══╪══════════╪══════════╪══════════╪══════════╡
│ 90.0 ┆ 0.574609 ┆ 0.570742 ┆ 0.530137 ┆ … ┆ 0.410254 ┆ 0.409529 ┆ 0.381613 ┆ 0.363002 │
│ 95.0 ┆ 0.574609 ┆ 0.570742 ┆ 0.533037 ┆ … ┆ 0.396477 ┆ 0.414846 ┆ 0.383063 ┆ 0.359135 │
│ 100.0 ┆ 0.574609 ┆ 0.555273 ┆ 0.509834 ┆ … ┆ 0.387172 ┆ 0.379075 ┆ 0.368198 ┆ 0.345237 │
│ 105.0 ┆ 0.592012 ┆ 0.531104 ┆ 0.492432 ┆ … ┆ 0.380767 ┆ 0.369528 ┆ 0.379135 ┆ 0.340645 │
│ 110.0 ┆ 0.551406 ┆ 0.512734 ┆ 0.4740625 ┆ … ┆ 0.366627 ┆ 0.368198 ┆ 0.356597 ┆ 0.333394 │
│ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │
│ 350.0 ┆ 0.291338 ┆ 0.268135 ┆ 0.249766 ┆ … ┆ 0.239524 ┆ 0.240944 ┆ 0.242575 ┆ 0.243361 │
│ 360.0 ┆ 0.291338 ┆ 0.27877 ┆ 0.256533 ┆ … ┆ 0.242454 ┆ 0.243421 ┆ 0.242515 ┆ 0.245989 │
│ 370.0 ┆ 0.291338 ┆ 0.286504 ┆ 0.265234 ┆ … ┆ 0.244146 ┆ 0.244055 ┆ 0.243814 ┆ 0.246744 │
│ 380.0 ┆ 0.291338 ┆ 0.292305 ┆ 0.265234 ┆ … ┆ 0.245294 ┆ 0.241306 ┆ 0.243572 ┆ 0.23617 │
│ 390.0 ┆ 0.291338 ┆ 0.296172 ┆ 0.276836 ┆ … ┆ 0.249343 ┆ 0.246503 ┆ 0.243179 ┆ 0.243028 │
└────────┴──────────┴──────────┴───────────┴───┴──────────┴──────────┴──────────┴──────────┘
performance_stats
Compute the performance statistics for the ticker.
Returns:
dict
: Dictionary containing performance statistics.
Example:
= ticker.performance_stats()
performance_stats print(performance_stats)
{'Symbol': 'AAPL', 'Benchmark': '^GSPC', 'Start Date': '2023-01-01', 'End Date': '2024-01-01', 'Interval': 1.4457831325301205, 'Confidence Level': 0.95, 'Risk Free Rate': 0.02, 'Daily Return': 0.18275878393802358, 'Daily Volatility': 1.2520202397652223, 'Total Return': 54.79824120885897, 'Annualized Return': 58.56091856778056, 'Annualized Volatility': 19.893271277470422, 'Alpha': 0.004678983105888518, 'Beta': 0.47675588323381524, 'Sharpe Ratio': 2.8432185827494885, 'Sortino Ratio': 4.608921576231433, 'Active Return': 25.797420884864387, 'Active Risk': 13.755359641983038, 'Information Ratio': 1.875445030613922, 'Calmar Ratio': 3.764747464100118, 'Maximum Drawdown': 15.555072186436359, 'Value at Risk': -1.7253767375913702, 'Expected Shortfall': -2.563117993130281, 'Security Prices': shape: (250,)
Series: 'adjclose' [f64]
[
123.330643
124.602707
123.281342
127.817375
128.340027
…
191.974686
191.429306
191.528458
191.954849
190.913666
], 'Security Returns': shape: (250,)
Series: 'AAPL' [f64]
[
0.0
1.031426
-1.060463
3.679416
0.408905
…
-0.554751
-0.284089
0.051795
0.222626
-0.542411
], 'Benchmark Returns': shape: (250,)
Series: 'roc-1' [f64]
[
0.0
0.753897
-1.164553
2.284078
-0.076763
…
0.166006
0.423169
0.143046
0.037017
-0.282648
]}
performance_chart
Display the performance chart for the ticker.
Parameters:
height
(Optional[int]): Optional height of the plot in pixels, defaults to None.width
(Optional[int]): Optional width of the plot in pixels, defaults to None.
Returns:
Plot
: Plot object containing the performance chart.
Example:
= ticker.performance_chart()
performance_chart performance_chart.show()
candlestick_chart
Display the candlestick chart for the ticker.
Parameters:
height
(Optional[int]): Optional height of the plot in pixels, defaults to None.width
(Optional[int]): Optional width of the plot in pixels, defaults to None.
Returns:
Plot
: Plot object containing the candlestick chart.
Example:
= ticker.candlestick_chart()
candlestick_chart candlestick_chart.show()
news_sentiment_chart
Display the News Sentiment chart for the ticker.
Parameters:
height
(Optional[int]): Optional height of the plot in pixels, defaults to None.width
(Optional[int]): Optional width of the plot in pixels, defaults to None.
Returns:
Plot
: Plot object containing the news sentiment chart.
Example:
= ticker.news_sentiment_chart()
news_sentiment_chart news_sentiment_chart.show()
options_chart
Display the options volatility surface, smile and term structure charts for the ticker.
Parameters:
chart_type
(str): Type of options chart (surface, smile, term_structure).height
(Optional[int]): Optional height of the plot in pixels, defaults to None.width
(Optional[int]): Optional width of the plot in pixels, defaults to None.
Returns:
Plot
: Plot object containing the options chart.
Example:
= ticker.options_chart(chart_type="surface")
options_chart options_chart.show()
report
Generate a report for the ticker.
Parameters:
report_type
(Optional[str]): Type of report to generate (performance, financials, options, news_sentiment).- display (Optional[str]): The display mode for the report. set to “notebook” for Jupyter Notebook display, defaults to “browser”.
Example:
"performance") ticker.report(