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:

from finalytics import Ticker

ticker = Ticker(symbol="AAPL", 
                start_date="2023-01-01", 
                end_date="2024-01-01", 
                interval="1d",
                benchmark_symbol="^GSPC",
                confidence_level=0.95,
                risk_free_rate=0.02)
get_quote

Get the current ticker quote stats.

Returns:

  • dict: Dictionary containing current ticker quote stats.

Example:

quote = ticker.get_quote()
print(quote)
{'Symbol': 'AAPL', 'Name': 'Apple Inc.', 'Exchange': 'NasdaqGS', 'Currency': 'USD', 'Timestamp': 1777579201, 'Current Price': 271.35, '24H Volume': 83815040.0, '24H Open': 270.5, '24H High': 275.94, '24H Low': 268.14, '24H Close': 270.17}
get_summary_stats

Get summary technical and fundamental statistics for the ticker.

Returns:

  • dict: Dictionary containing summary statistics.

Example:

summary_stats = ticker.get_summary_stats()
print(summary_stats)
shape: (65, 2)
┌──────────────────────────┬─────────────────┐
│ Metric                   ┆ Value           │
│ ---                      ┆ ---             │
│ str                      ┆ str             │
╞══════════════════════════╪═════════════════╡
│ Currency                 ┆ USD             │
│ Current Price            ┆ 271.35          │
│ Day Range                ┆ 275.94 - 268.14 │
│ 52 Week Change           ┆ 32.14%          │
│ Previous Close           ┆ 270.17          │
│ …                        ┆ …               │
│ 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:

price_history = ticker.get_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.096024 │
│ 00:00:00     ┆            ┆            ┆            ┆            ┆            ┆            │
│ 2023-01-04   ┆ 126.889999 ┆ 128.660004 ┆ 125.080002 ┆ 126.360001 ┆ 8.91136e7  ┆ 124.365677 │
│ 00:00:00     ┆            ┆            ┆            ┆            ┆            ┆            │
│ 2023-01-05   ┆ 127.129997 ┆ 127.769997 ┆ 124.760002 ┆ 125.019997 ┆ 8.09627e7  ┆ 123.046822 │
│ 00:00:00     ┆            ┆            ┆            ┆            ┆            ┆            │
│ 2023-01-06   ┆ 126.010002 ┆ 130.289993 ┆ 124.889999 ┆ 129.619995 ┆ 8.77547e7  ┆ 127.574203 │
│ 00:00:00     ┆            ┆            ┆            ┆            ┆            ┆            │
│ 2023-01-09   ┆ 130.470001 ┆ 133.410004 ┆ 129.889999 ┆ 130.149994 ┆ 7.07908e7  ┆ 128.09584  │
│ 00:00:00     ┆            ┆            ┆            ┆            ┆            ┆            │
│ …            ┆ …          ┆ …          ┆ …          ┆ …          ┆ …          ┆ …          │
│ 2023-12-22   ┆ 195.179993 ┆ 195.410004 ┆ 192.970001 ┆ 193.600006 ┆ 3.71496e7  ┆ 191.609482 │
│ 00:00:00     ┆            ┆            ┆            ┆            ┆            ┆            │
│ 2023-12-26   ┆ 193.610001 ┆ 193.889999 ┆ 192.830002 ┆ 193.050003 ┆ 2.89193e7  ┆ 191.065125 │
│ 00:00:00     ┆            ┆            ┆            ┆            ┆            ┆            │
│ 2023-12-27   ┆ 192.490005 ┆ 193.5      ┆ 191.089996 ┆ 193.149994 ┆ 4.80877e7  ┆ 191.164108 │
│ 00:00:00     ┆            ┆            ┆            ┆            ┆            ┆            │
│ 2023-12-28   ┆ 194.139999 ┆ 194.660004 ┆ 193.169998 ┆ 193.580002 ┆ 3.40499e7  ┆ 191.589676 │
│ 00:00:00     ┆            ┆            ┆            ┆            ┆            ┆            │
│ 2023-12-29   ┆ 193.899994 ┆ 194.399994 ┆ 191.729996 ┆ 192.529999 ┆ 4.26721e7  ┆ 190.550446 │
│ 00:00:00     ┆            ┆            ┆            ┆            ┆            ┆            │
└──────────────┴────────────┴────────────┴────────────┴────────────┴────────────┴────────────┘
get_options_chain

Get the options chain for the ticker.

Returns:

  • DataFrame: Polars DataFrame containing the options chain.

Example:

options_chain = ticker.get_options_chain()
print(options_chain)
shape: (2_430, 16)
┌────────────┬───────────┬──────┬────────────┬───┬────────────┬────────────┬───────────┬───────────┐
│ expiration ┆ ttm       ┆ type ┆ contractSy ┆ … ┆ contractSi ┆ lastTradeD ┆ impliedVo ┆ inTheMone │
│ ---        ┆ ---       ┆ ---  ┆ mbol       ┆   ┆ ze         ┆ ate        ┆ latility  ┆ y         │
│ str        ┆ f64       ┆ str  ┆ ---        ┆   ┆ ---        ┆ ---        ┆ ---       ┆ ---       │
│            ┆           ┆      ┆ str        ┆   ┆ str        ┆ datetime[m ┆ f64       ┆ bool      │
│            ┆           ┆      ┆            ┆   ┆            ┆ s]         ┆           ┆           │
╞════════════╪═══════════╪══════╪════════════╪═══╪════════════╪════════════╪═══════════╪═══════════╡
│ 2026-05-01 ┆ 0.0       ┆ call ┆ AAPL260501 ┆ … ┆ REGULAR    ┆ 2026-04-28 ┆ 0.00001   ┆ true      │
│            ┆           ┆      ┆ C00110000  ┆   ┆            ┆ 15:31:58   ┆           ┆           │
│ 2026-05-01 ┆ 0.0       ┆ call ┆ AAPL260501 ┆ … ┆ REGULAR    ┆ 2026-04-30 ┆ 0.00001   ┆ true      │
│            ┆           ┆      ┆ C00120000  ┆   ┆            ┆ 19:42:52   ┆           ┆           │
│ 2026-05-01 ┆ 0.0       ┆ call ┆ AAPL260501 ┆ … ┆ REGULAR    ┆ 2026-04-30 ┆ 0.00001   ┆ true      │
│            ┆           ┆      ┆ C00145000  ┆   ┆            ┆ 19:49:19   ┆           ┆           │
│ 2026-05-01 ┆ 0.0       ┆ call ┆ AAPL260501 ┆ … ┆ REGULAR    ┆ 2026-04-30 ┆ 0.00001   ┆ true      │
│            ┆           ┆      ┆ C00150000  ┆   ┆            ┆ 19:41:59   ┆           ┆           │
│ 2026-05-01 ┆ 0.0       ┆ call ┆ AAPL260501 ┆ … ┆ REGULAR    ┆ 2026-04-30 ┆ 0.00001   ┆ true      │
│            ┆           ┆      ┆ C00175000  ┆   ┆            ┆ 19:50:13   ┆           ┆           │
│ …          ┆ …         ┆ …    ┆ …          ┆ … ┆ …          ┆ …          ┆ …         ┆ …         │
│ 2028-12-15 ┆ 31.504599 ┆ put  ┆ AAPL281215 ┆ … ┆ REGULAR    ┆ 2026-04-30 ┆ 0.00001   ┆ true      │
│            ┆           ┆      ┆ P00440000  ┆   ┆            ┆ 19:09:21   ┆           ┆           │
│ 2028-12-15 ┆ 31.504599 ┆ put  ┆ AAPL281215 ┆ … ┆ REGULAR    ┆ 2026-04-30 ┆ 0.00001   ┆ true      │
│            ┆           ┆      ┆ P00450000  ┆   ┆            ┆ 19:08:41   ┆           ┆           │
│ 2028-12-15 ┆ 31.504599 ┆ put  ┆ AAPL281215 ┆ … ┆ REGULAR    ┆ 2026-04-16 ┆ 0.00001   ┆ true      │
│            ┆           ┆      ┆ P00460000  ┆   ┆            ┆ 13:32:05   ┆           ┆           │
│ 2028-12-15 ┆ 31.504599 ┆ put  ┆ AAPL281215 ┆ … ┆ REGULAR    ┆ 2026-04-30 ┆ 0.00001   ┆ true      │
│            ┆           ┆      ┆ P00500000  ┆   ┆            ┆ 15:05:49   ┆           ┆           │
│ 2028-12-15 ┆ 31.504599 ┆ put  ┆ AAPL281215 ┆ … ┆ REGULAR    ┆ 2026-04-28 ┆ 0.00001   ┆ true      │
│            ┆           ┆      ┆ P00520000  ┆   ┆            ┆ 19:04:08   ┆           ┆           │
└────────────┴───────────┴──────┴────────────┴───┴────────────┴────────────┴───────────┴───────────┘
get_news

Get the historical news headlines for the given ticker.

Returns:

  • DataFrame: Polars DataFrame containing news headlines.

Example:

news = ticker.get_news()
print(news)
shape: (1_624, 5)
┌────────────────┬───────────────────┬─────────────────────┬─────────────────────┬─────────────────┐
│ Published Date ┆ Source            ┆ Title               ┆ Link                ┆ Sentiment Score │
│ ---            ┆ ---               ┆ ---                 ┆ ---                 ┆ ---             │
│ datetime[ms]   ┆ str               ┆ str                 ┆ str                 ┆ f64             │
╞════════════════╪═══════════════════╪═════════════════════╪═════════════════════╪═════════════════╡
│ 2023-01-04     ┆ Investopedia      ┆ Investing in Apple  ┆ <a href="https://ne ┆ 0.0             │
│ 08:00:00       ┆                   ┆ Stock (AAPL…        ┆ ws.google.c…        ┆                 │
│ 2023-01-04     ┆ Bloomberg.com     ┆ Apple’s (AAPL)      ┆ <a href="https://ne ┆ -0.70956        │
│ 08:00:00       ┆                   ┆ Stock Is Losing…    ┆ ws.google.c…        ┆                 │
│ 2023-01-03     ┆ Al Jazeera        ┆ Apple’s market      ┆ <a href="https://ne ┆ 0.33995         │
│ 08:00:00       ┆                   ┆ value drops bel…    ┆ ws.google.c…        ┆                 │
│ 2023-01-03     ┆ Reuters           ┆ Apple's stock       ┆ <a href="https://ne ┆ 0.33995         │
│ 08:00:00       ┆                   ┆ market value fal…   ┆ ws.google.c…        ┆                 │
│ 2023-01-04     ┆ The Guardian      ┆ Death of the        ┆ <a href="https://ne ┆ -0.622427       │
│ 08:00:00       ┆                   ┆ narrator? Apple u…  ┆ ws.google.c…        ┆                 │
│ …              ┆ …                 ┆ …                   ┆ …                   ┆ …               │
│ 2024-01-01     ┆ Laptop Mag        ┆ How to make a GIF   ┆ <a href="https://ne ┆ 0.440434        │
│ 08:00:00       ┆                   ┆ on iPhone — …       ┆ ws.google.c…        ┆                 │
│ 2023-12-30     ┆ Visual Capitalist ┆ Charted: Tesla’s    ┆ <a href="https://ne ┆ 0.0             │
│ 08:00:00       ┆                   ┆ Global Sales …      ┆ ws.google.c…        ┆                 │
│ 2024-01-01     ┆ Yahoo Finance UK  ┆ 12 charts that show ┆ <a href="https://ne ┆ 0.0             │
│ 08:00:00       ┆                   ┆ the cost o…         ┆ ws.google.c…        ┆                 │
│ 2024-01-01     ┆ Advocate.com      ┆ Republicans freak   ┆ <a href="https://ne ┆ -0.624893       │
│ 08:00:00       ┆                   ┆ out over a b…       ┆ ws.google.c…        ┆                 │
│ 2023-12-31     ┆ Analytics Insight ┆ Apple’s Innovation  ┆ <a href="https://ne ┆ 0.381819        │
│ 08:00:00       ┆                   ┆ Journey: Ke…        ┆ ws.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:

income_statement = ticker.get_income_statement(frequency="quarterly")
print(income_statement)
shape: (11, 6)
┌──────────────────────────────┬───────────┬───────────┬───────────┬───────────┬───────────┐
│ Items                        ┆ 2024Q4    ┆ 2025Q1    ┆ 2025Q2    ┆ 2025Q3    ┆ 2025Q4    │
│ ---                          ┆ ---       ┆ ---       ┆ ---       ┆ ---       ┆ ---       │
│ str                          ┆ f64       ┆ f64       ┆ f64       ┆ f64       ┆ f64       │
╞══════════════════════════════╪═══════════╪═══════════╪═══════════╪═══════════╪═══════════╡
│ Revenue                      ┆ 1.2430e11 ┆ 9.5359e10 ┆ 9.4036e10 ┆ 1.0247e11 ┆ 1.4376e11 │
│ Cost of Goods Sold           ┆ 6.6025e10 ┆ 5.0492e10 ┆ 5.0318e10 ┆ 5.4125e10 ┆ 7.4525e10 │
│ Gross Profit                 ┆ 5.8275e10 ┆ 4.4867e10 ┆ 4.3718e10 ┆ 4.8341e10 ┆ 6.9231e10 │
│ Operating Expenses           ┆ 1.5443e10 ┆ 1.5278e10 ┆ 1.5516e10 ┆ 1.5914e10 ┆ 1.8379e10 │
│ EBITDA                       ┆ 4.5912e10 ┆ 3.2250e10 ┆ 3.1032e10 ┆ 3.5554e10 ┆ 5.4066e10 │
│ …                            ┆ …         ┆ …         ┆ …         ┆ …         ┆ …         │
│ Operating Profit (EBIT)      ┆ 4.2832e10 ┆ 2.9589e10 ┆ 2.8202e10 ┆ 3.2427e10 ┆ 5.0852e10 │
│ Income Tax Expense           ┆ 6.2540e9  ┆ 4.5300e9  ┆ 4.5970e9  ┆ 5.3380e9  ┆ 8.9050e9  │
│ Net Income                   ┆ 3.6330e10 ┆ 2.4780e10 ┆ 2.3434e10 ┆ 2.7466e10 ┆ 4.2097e10 │
│ Earnings per Share - Basic   ┆ 2.41      ┆ 1.65      ┆ 1.57      ┆ 1.85      ┆ 2.85      │
│ Earnings per Share - Diluted ┆ 2.4       ┆ 1.65      ┆ 1.57      ┆ 1.85      ┆ 2.84      │
└──────────────────────────────┴───────────┴───────────┴───────────┴───────────┴───────────┘
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:

balance_sheet = ticker.get_balance_sheet(frequency="quarterly")
print(balance_sheet)
shape: (21, 6)
┌──────────────────────────────┬────────────┬────────────┬────────────┬────────────┬───────────┐
│ Items                        ┆ 2024Q4     ┆ 2025Q1     ┆ 2025Q2     ┆ 2025Q3     ┆ 2025Q4    │
│ ---                          ┆ ---        ┆ ---        ┆ ---        ┆ ---        ┆ ---       │
│ str                          ┆ f64        ┆ f64        ┆ f64        ┆ f64        ┆ f64       │
╞══════════════════════════════╪════════════╪════════════╪════════════╪════════════╪═══════════╡
│ Cash and Cash Equivalents    ┆ 3.0299e10  ┆ 2.8162e10  ┆ 3.6269e10  ┆ 3.5934e10  ┆ 4.5317e10 │
│ Accounts Receivable          ┆ 2.9639e10  ┆ 2.6136e10  ┆ 2.7557e10  ┆ 3.9777e10  ┆ 3.9921e10 │
│ Inventories                  ┆ 6.9110e9   ┆ 6.2690e9   ┆ 5.9250e9   ┆ 5.7180e9   ┆ 5.8750e9  │
│ Other Current Assets         ┆ 1.3248e10  ┆ 1.4109e10  ┆ 1.4359e10  ┆ 1.4585e10  ┆ 1.5002e10 │
│ Total Current Assets         ┆ 1.3324e11  ┆ 1.1867e11  ┆ 1.2249e11  ┆ 1.4796e11  ┆ 1.5810e11 │
│ …                            ┆ …          ┆ …          ┆ …          ┆ …          ┆ …         │
│ Total Liabilities            ┆ 2.7733e11  ┆ 2.6444e11  ┆ 2.6566e11  ┆ 2.8551e11  ┆ 2.9111e11 │
│ Common Stock                 ┆ 8.4768e10  ┆ 8.8711e10  ┆ 8.9806e10  ┆ 9.3568e10  ┆ 9.5221e10 │
│ Retained Earnings            ┆ -1.1221e10 ┆ -1.5552e10 ┆ -1.7607e10 ┆ -1.4264e10 ┆ -2.1770e9 │
│ Total Equity                 ┆ 6.6758e10  ┆ 6.6796e10  ┆ 6.5830e10  ┆ 7.3733e10  ┆ 8.8190e10 │
│ Total Liabilities and Equity ┆ 6.6758e10  ┆ 6.6796e10  ┆ 6.5830e10  ┆ 7.3733e10  ┆ 8.8190e10 │
└──────────────────────────────┴────────────┴────────────┴────────────┴────────────┴───────────┘
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:

cashflow_statement = ticker.get_cashflow_statement(frequency="quarterly")
print(cashflow_statement)
shape: (26, 6)
┌─────────────────────────────────┬────────────┬────────────┬────────────┬────────────┬────────────┐
│ Items                           ┆ 2024Q4     ┆ 2025Q1     ┆ 2025Q2     ┆ 2025Q3     ┆ 2025Q4     │
│ ---                             ┆ ---        ┆ ---        ┆ ---        ┆ ---        ┆ ---        │
│ str                             ┆ f64        ┆ f64        ┆ f64        ┆ f64        ┆ f64        │
╞═════════════════════════════════╪════════════╪════════════╪════════════╪════════════╪════════════╡
│ Net Income from Continuing Ope… ┆ 3.6330e10  ┆ 2.4780e10  ┆ 2.3434e10  ┆ 2.7466e10  ┆ 4.2097e10  │
│ Depreciation, Amortization, an… ┆ 3.0800e9   ┆ 2.6610e9   ┆ 2.8300e9   ┆ 3.1270e9   ┆ 3.2140e9   │
│ Stock-Based Compensation        ┆ 3.2860e9   ┆ 3.2260e9   ┆ 3.1680e9   ┆ 3.1830e9   ┆ 3.5940e9   │
│ Changes in Working Capital      ┆ -1.0752e10 ┆ -6.5070e9  ┆ -2.0340e9  ┆ -5.7070e9  ┆ 5.5480e9   │
│ Cash Flow from Continuing Oper… ┆ 2.9935e10  ┆ 2.3952e10  ┆ 2.7867e10  ┆ 2.9728e10  ┆ 5.3925e10  │
│ …                               ┆ …          ┆ …          ┆ …          ┆ …          ┆ …          │
│ Operating Cash Flow             ┆ 2.9935e10  ┆ 2.3952e10  ┆ 2.7867e10  ┆ 2.9728e10  ┆ 5.3925e10  │
│ Investing Cash Flow             ┆ 9.7920e9   ┆ 2.9170e9   ┆ 5.0730e9   ┆ -2.5870e9  ┆ -4.8860e9  │
│ Financing Cash Flow             ┆ -3.9371e10 ┆ -2.9006e10 ┆ -2.4833e10 ┆ -2.7476e10 ┆ -3.9656e10 │
│ Ending Cash Position            ┆ 3.0299e10  ┆ 2.8162e10  ┆ 3.6269e10  ┆ 3.5934e10  ┆ 4.5317e10  │
│ Free Cash Flow                  ┆ 2.6995e10  ┆ 2.0881e10  ┆ 2.4405e10  ┆ 2.6486e10  ┆ 5.1552e10  │
└─────────────────────────────────┴────────────┴────────────┴────────────┴────────────┴────────────┘
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:

financial_ratios = ticker.get_financial_ratios(frequency="quarterly")
print(financial_ratios)
shape: (21, 6)
┌─────────────────────────┬──────────┬──────────┬──────────┬──────────┬──────────┐
│ Items                   ┆ 2024Q4   ┆ 2025Q1   ┆ 2025Q2   ┆ 2025Q3   ┆ 2025Q4   │
│ ---                     ┆ ---      ┆ ---      ┆ ---      ┆ ---      ┆ ---      │
│ str                     ┆ f64      ┆ f64      ┆ f64      ┆ f64      ┆ f64      │
╞═════════════════════════╪══════════╪══════════╪══════════╪══════════╪══════════╡
│ Gross Profit Margin     ┆ 0.468825 ┆ 0.470506 ┆ 0.464907 ┆ 0.471776 ┆ 0.481587 │
│ Operating Profit Margin ┆ 0.344586 ┆ 0.310291 ┆ 0.299906 ┆ 0.316466 ┆ 0.353738 │
│ Net Profit Margin       ┆ 0.292277 ┆ 0.25986  ┆ 0.249202 ┆ 0.26805  ┆ 0.292836 │
│ Return on Assets        ┆ 0.105584 ┆ 0.074811 ┆ 0.070692 ┆ 0.076456 ┆ 0.110987 │
│ Return on Equity        ┆ 0.544204 ┆ 0.37098  ┆ 0.355978 ┆ 0.372506 ┆ 0.477344 │
│ …                       ┆ …        ┆ …        ┆ …        ┆ …        ┆ …        │
│ Price to Earnings       ┆ 4.148472 ┆ 5.866102 ┆ 6.326705 ┆ 5.536336 ┆ 3.91655  │
│ Price to Book           ┆ 2.257617 ┆ 2.176208 ┆ 2.252165 ┆ 2.062319 ┆ 1.869543 │
│ Price to Sales          ┆ 1.212502 ┆ 1.524366 ┆ 1.57663  ┆ 1.484014 ┆ 1.146909 │
│ Price to Cashflow       ┆ 5.034709 ┆ 6.068888 ┆ 5.320271 ┆ 5.115077 ┆ 3.057487 │
│ Price to Free Cashflow  ┆ 5.583034 ┆ 6.961448 ┆ 6.074985 ┆ 5.741184 ┆ 3.198227 │
└─────────────────────────┴──────────┴──────────┴──────────┴──────────┴──────────┘
volatility_surface

Computes the implied volatility surface for the ticker options chain.

Returns:

  • DataFrame: Polars DataFrame containing the implied volatility surface.

Example:

volatility_surface = ticker.volatility_surface()
print(volatility_surface)
shape: (69, 13)
┌────────┬──────────┬──────────┬──────────┬───┬──────────┬──────────┬──────────┬──────────┐
│ strike ┆ 3.68M    ┆ 4.60M    ┆ 5.52M    ┆ … ┆ 19.55M   ┆ 20.70M   ┆ 22.54M   ┆ 31.50M   │
│ ---    ┆ ---      ┆ ---      ┆ ---      ┆   ┆ ---      ┆ ---      ┆ ---      ┆ ---      │
│ f64    ┆ f64      ┆ f64      ┆ f64      ┆   ┆ f64      ┆ f64      ┆ f64      ┆ f64      │
╞════════╪══════════╪══════════╪══════════╪═══╪══════════╪══════════╪══════════╪══════════╡
│ 110.0  ┆ 0.566875 ┆ 0.574609 ┆ 0.45666  ┆ … ┆ 0.412067 ┆ 0.415088 ┆ 0.403365 ┆ 0.367836 │
│ 120.0  ┆ 0.561074 ┆ 0.528203 ┆ 0.45666  ┆ … ┆ 0.403003 ┆ 0.386205 ┆ 0.386567 ┆ 0.366295 │
│ 125.0  ┆ 0.542705 ┆ 0.598779 ┆ 0.45666  ┆ … ┆ 0.390797 ┆ 0.39261  ┆ 0.396175 ┆ 0.35998  │
│ 130.0  ┆ 0.524336 ┆ 0.505967 ┆ 0.45666  ┆ … ┆ 0.389166 ┆ 0.384271 ┆ 0.403547 ┆ 0.360615 │
│ 135.0  ┆ 0.510801 ┆ 0.50645  ┆ 0.45666  ┆ … ┆ 0.380283 ┆ 0.373032 ┆ 0.370917 ┆ 0.351853 │
│ …      ┆ …        ┆ …        ┆ …        ┆ … ┆ …        ┆ …        ┆ …        ┆ …        │
│ 360.0  ┆ 0.277319 ┆ 0.26463  ┆ 0.267108 ┆ … ┆ 0.285507 ┆ 0.286504 ┆ 0.288951 ┆ 0.289435 │
│ 365.0  ┆ 0.279897 ┆ 0.269504 ┆ 0.262938 ┆ … ┆ 0.266549 ┆ 0.283291 ┆ 0.286287 ┆ 0.286736 │
│ 375.0  ┆ 0.282476 ┆ 0.274379 ┆ 0.26602  ┆ … ┆ 0.267742 ┆ 0.280079 ┆ 0.283624 ┆ 0.284037 │
│ 390.0  ┆ 0.285054 ┆ 0.279253 ┆ 0.269102 ┆ … ┆ 0.264494 ┆ 0.276866 ┆ 0.28096  ┆ 0.281338 │
│ 400.0  ┆ 0.291821 ┆ 0.279736 ┆ 0.265959 ┆ … ┆ 0.276141 ┆ 0.278498 ┆ 0.280265 ┆ 0.288664 │
└────────┴──────────┴──────────┴──────────┴───┴──────────┴──────────┴──────────┴──────────┘
performance_stats

Compute the performance statistics for the ticker.

Returns:

  • dict: Dictionary containing performance statistics.

Example:

performance_stats = ticker.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.0018349267265163399, 'Daily Volatility': 0.012570039046460188, 'Total Return': 0.5479821365994539, 'Annualized Return': 0.5885442873100564, 'Annualized Volatility': 0.19972456417039952, 'Alpha': 0.2062073488235633, 'Beta': 1.1045128515765001, 'Sharpe Ratio': 2.8466417722408446, 'Sortino Ratio': 4.532848925534317, 'Active Return': 0.23052891382646085, 'Active Risk': 0.13810401752204624, 'Information Ratio': 1.6692411847443929, 'Calmar Ratio': 3.9414009276818334, 'Maximum Drawdown': 0.1493236283516616, 'Value at Risk': -0.017176494174410775, 'Expected Shortfall': -0.024986757689988533, 'Security Prices': shape: (250,)
Series: 'adjclose' [f64]
[
    123.096024
    124.365677
    123.046822
    127.574203
    128.09584
    …
    191.609482
    191.065125
    191.164108
    191.589676
    190.550446
], 'Security Returns': shape: (249,)
Series: 'AAPL' [f64]
[
    0.010314
    -0.010605
    0.036794
    0.004089
    0.004456
    …
    -0.005547
    -0.002841
    0.000518
    0.002226
    -0.005424
], 'Benchmark Returns': shape: (249,)
Series: 'benchmark_returns' [f64]
[
    0.007539
    -0.011646
    0.022841
    -0.000768
    0.006978
    …
    0.00166
    0.004232
    0.00143
    0.00037
    -0.002826
]}
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:

performance_chart = ticker.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:

candlestick_chart = ticker.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:

news_sentiment_chart = ticker.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:

options_chart = ticker.options_chart(chart_type="surface")
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:

ticker.report("performance")