summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanglewood <85772166+deeleeramone@users.noreply.github.com>2024-02-27 07:34:24 -0800
committerGitHub <noreply@github.com>2024-02-27 15:34:24 +0000
commit2ae66518d1176ca55c8830984742b12debc5c775 (patch)
tree6661e59444870dac40915f26ef9bfab80601d552
parent577a42461d9a123b0a717603aed0fb4e306b69eb (diff)
[Docs] Adds Example Notebook for the Implied Earnings Move (#6128)
* adds example notebook for the implied earnings move * remove commented out line --------- Co-authored-by: James Maslek <jmaslek11@gmail.com>
-rw-r--r--examples/README.md10
-rw-r--r--examples/content.json7
-rw-r--r--examples/impliedEarningsMove.ipynb1490
-rw-r--r--examples/impliedEarningsMove.webpbin0 -> 7350 bytes
4 files changed, 1507 insertions, 0 deletions
diff --git a/examples/README.md b/examples/README.md
index 8a496fabdd5..b50fc62499d 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -67,3 +67,13 @@ This notebook demonstrates how to query the Federal Reserve Economic Database an
- Perform arithmetic operations on a DataFrame.
- Normalization methods for a series or DataFrame.
- Simple processes for creating charts.
+
+### impliedEarningsMove
+
+This notebook demonstrates how to calculate the implied earnings move using options prices from free sources.
+
+- Get upcoming earnings calendar.
+- Fetch options chains data.
+- Get the last price of the underlying stock.
+- Find the nearest call and put strikes to the last price of the stock.
+- Calculate the implied daily move using the price of a straddle.
diff --git a/examples/content.json b/examples/content.json
index 7c5d748bd1e..fd257a4a4be 100644
--- a/examples/content.json
+++ b/examples/content.json
@@ -40,5 +40,12 @@
"img": "https://raw.githubusercontent.com/OpenBB-finance/OpenBBTerminal/develop/examples/financialStatements.webp",
"description":
"Get started with financial statements in the OpenBB Platform. This notebook compares the data from different providers and demonstrates how to access items within the three main financial statements - balance, cash, and income."
+ },
+ {
+ "title": "Implied Earnings Move",
+ "url": "https://github.com/OpenBB-finance/OpenBBTerminal/blob/develop/examples/impliedEarningsMove.ipynb",
+ "img": "https://raw.githubusercontent.com/OpenBB-finance/OpenBBTerminal/develop/examples/impliedEarningsMove.webp",
+ "description":
+ "Calculate the implied earnings move using options prices. This notebook demonstrates how to get the data from free sources and apply filters to arrive at the expected move, as a percent, in either direction."
}
]
diff --git a/examples/impliedEarningsMove.ipynb b/examples/impliedEarningsMove.ipynb
new file mode 100644
index 00000000000..60fa3df3115
--- /dev/null
+++ b/examples/impliedEarningsMove.ipynb
@@ -0,0 +1,1490 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "BzQ2PSUMb1O7"
+ },
+ "source": [
+ "# Calculating the Implied Earnings Move Using Options Prices\n",
+ "\n",
+ "Earnings day can be a pivotal moment for a company's share price. The confluence of expectations and reality is a tradable event, drawing crowds to the options market. Observing the surrounding action can provide insight into the consensus view on, and general sentiment of, the company.\n",
+ "\n",
+ "The cost of a straddle - the combined price of an at-the-money call and put - is a common way to gauge the near-term volatility. It's the market's expectation of the price band until expiration. While this includes time value, the isolated price of volatility will generally be higher for the expiry immediately following an earnings release.\n",
+ "\n",
+ "Have a look at companies that trade weekly options and are reporting a on Thursday. If they report after the close, the price of the one-day straddle at the bell will be the purest sample of information.\n",
+ "\n",
+ "The cells below will demonstrate how to get the data from free sources, using the OpenBB Platform."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "id": "da3wLFHJaK1n"
+ },
+ "outputs": [],
+ "source": [
+ "# If using in Google Colab, install the OpenBB library.\n",
+ "\n",
+ "!pip install openbb[\"all\"]\n",
+ "\n",
+ "# Restart the runtime before the next block"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "7xcKh78TaTot",
+ "outputId": "1b00dbc7-21cd-421a-b191-b2e8685f491d"
+ },
+ "outputs": [],
+ "source": [
+ "from datetime import datetime, timedelta\n",
+ "\n",
+ "import pandas as pd\n",
+ "from openbb import obb\n",
+ "\n",
+ "obb.user.preferences.output_type = \"dataframe\"\n",
+ "obb.user.credentials.nasdaq_api_key = \"PLACE_HOLDER\" # You don't actually need to replace this."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "WyKBFJg-R_r2"
+ },
+ "source": [
+ "If the earnings date falls on an option expiry, contracts expiring that day will not provide exposure to the after-market earnings reports."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 711
+ },
+ "id": "49D8bfFFPEwC",
+ "outputId": "b2eebaaa-ef2c-456a-fca2-96f6bee41b2d"
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "<div>\n",
+ "<style scoped>\n",
+ " .dataframe tbody tr th:only-of-type {\n",
+ " vertical-align: middle;\n",
+ " }\n",
+ "\n",
+ " .dataframe tbody tr th {\n",
+ " vertical-align: top;\n",
+ " }\n",
+ "\n",
+ " .dataframe thead th {\n",
+ " text-align: right;\n",
+ " }\n",
+ "</style>\n",
+ "<table border=\"1\" class=\"dataframe\">\n",
+ " <thead>\n",
+ " <tr style=\"text-align: right;\">\n",
+ " <th></th>\n",
+ " <th>report_date</th>\n",
+ " <th>symbol</th>\n",
+ " <th>name</th>\n",
+ " <th>eps_previous</th>\n",
+ " <th>eps_consensus</th>\n",
+ " <th>num_estimates</th>\n",
+ " <th>period_ending</th>\n",
+ " <th>previous_report_date</th>\n",
+ " <th>reporting_time</th>\n",
+ " <th>market_cap</th>\n",
+ " </tr>\n",
+ " </thead>\n",
+ " <tbody>\n",
+ " <tr>\n",
+ " <th>26</th>\n",
+ " <td>2024-03-07</td>\n",
+ " <td>AVGO</td>\n",
+ " <td>Broadcom Inc.</td>\n",
+ " <td>9.83</td>\n",
+ " <td>9.06</td>\n",
+ " <td>8.0</td>\n",
+ " <td>2024-01</td>\n",
+ " <td>2023-03-02</td>\n",
+ " <td>after-hours</td>\n",
+ " <td>6.108766e+11</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>27</th>\n",
+ " <td>2024-03-07</td>\n",
+ " <td>COST</td>\n",
+ " <td>Costco Wholesale Corporation</td>\n",
+ " <td>3.30</td>\n",
+ " <td>3.60</td>\n",
+ " <td>14.0</td>\n",
+ " <td>2024-02</td>\n",
+ " <td>2023-03-02</td>\n",
+ " <td>after-hours</td>\n",
+ " <td>3.259489e+11</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>553</th>\n",
+ " <td>2024-02-28</td>\n",
+ " <td>CRM</td>\n",
+ " <td>Salesforce, Inc.</td>\n",
+ " <td>1.01</td>\n",
+ " <td>1.72</td>\n",
+ " <td>16.0</td>\n",
+ " <td>2024-01</td>\n",
+ " <td>2023-03-01</td>\n",
+ " <td>after-hours</td>\n",
+ " <td>2.842532e+11</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>554</th>\n",
+ " <td>2024-02-28</td>\n",
+ " <td>RY</td>\n",
+ " <td>Royal Bank Of Canada</td>\n",
+ " <td>2.26</td>\n",
+ " <td>2.10</td>\n",
+ " <td>4.0</td>\n",
+ " <td>2024-01</td>\n",
+ " <td>2023-03-01</td>\n",
+ " <td>pre-market</td>\n",
+ " <td>1.380355e+11</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>796</th>\n",
+ " <td>2024-02-27</td>\n",
+ " <td>LOW</td>\n",
+ " <td>Lowe's Companies, Inc.</td>\n",
+ " <td>2.28</td>\n",
+ " <td>1.68</td>\n",
+ " <td>15.0</td>\n",
+ " <td>2024-01</td>\n",
+ " <td>2023-03-01</td>\n",
+ " <td>pre-market</td>\n",
+ " <td>1.325692e+11</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>28</th>\n",
+ " <td>2024-03-07</td>\n",
+ " <td>PBR</td>\n",
+ " <td>Petroleo Brasileiro S.A.- Petrobras</td>\n",
+ " <td>1.25</td>\n",
+ " <td>1.13</td>\n",
+ " <td>3.0</td>\n",
+ " <td>2023-12</td>\n",
+ " <td>2023-03-02</td>\n",
+ " <td>not-supplied</td>\n",
+ " <td>1.146585e+11</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>555</th>\n",
+ " <td>2024-02-28</td>\n",
+ " <td>TJX</td>\n",
+ " <td>TJX Companies, Inc. (The)</td>\n",
+ " <td>0.89</td>\n",
+ " <td>1.11</td>\n",
+ " <td>10.0</td>\n",
+ " <td>2024-01</td>\n",
+ " <td>2023-02-22</td>\n",
+ " <td>pre-market</td>\n",
+ " <td>1.129534e+11</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>29</th>\n",
+ " <td>2024-03-07</td>\n",
+ " <td>PBR.A</td>\n",
+ " <td>Petroleo Brasileiro S.A.- Petrobras</td>\n",
+ " <td>1.25</td>\n",
+ " <td>NaN</td>\n",
+ " <td>5.0</td>\n",
+ " <td>2023-12</td>\n",
+ " <td>None</td>\n",
+ " <td>not-supplied</td>\n",
+ " <td>1.108105e+11</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>383</th>\n",
+ " <td>2024-02-29</td>\n",
+ " <td>BUD</td>\n",
+ " <td>Anheuser-Busch Inbev SA</td>\n",
+ " <td>0.98</td>\n",
+ " <td>0.76</td>\n",
+ " <td>4.0</td>\n",
+ " <td>2023-12</td>\n",
+ " <td>2023-03-02</td>\n",
+ " <td>pre-market</td>\n",
+ " <td>1.101379e+11</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>384</th>\n",
+ " <td>2024-02-29</td>\n",
+ " <td>TD</td>\n",
+ " <td>Toronto Dominion Bank (The)</td>\n",
+ " <td>1.64</td>\n",
+ " <td>1.46</td>\n",
+ " <td>4.0</td>\n",
+ " <td>2024-01</td>\n",
+ " <td>2023-03-02</td>\n",
+ " <td>pre-market</td>\n",
+ " <td>1.074778e+11</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>797</th>\n",
+ " <td>2024-02-27</td>\n",
+ " <td>AMT</td>\n",
+ " <td>American Tower Corporation (REIT)</td>\n",
+ " <td>2.34</td>\n",
+ " <td>2.10</td>\n",
+ " <td>7.0</td>\n",
+ " <td>2023-12</td>\n",
+ " <td>2023-02-23</td>\n",
+ " <td>pre-market</td>\n",
+ " <td>8.764370e+10</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>1099</th>\n",
+ " <td>2024-02-26</td>\n",
+ " <td>WDAY</td>\n",
+ " <td>Workday, Inc.</td>\n",
+ " <td>-0.14</td>\n",
+ " <td>0.32</td>\n",
+ " <td>6.0</td>\n",
+ " <td>2024-01</td>\n",
+ " <td>2023-02-27</td>\n",
+ " <td>after-hours</td>\n",
+ " <td>8.064106e+10</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>217</th>\n",
+ " <td>2024-03-05</td>\n",
+ " <td>CRWD</td>\n",
+ " <td>CrowdStrike Holdings, Inc.</td>\n",
+ " <td>-0.17</td>\n",
+ " <td>0.18</td>\n",
+ " <td>14.0</td>\n",
+ " <td>2024-01</td>\n",
+ " <td>2023-03-07</td>\n",
+ " <td>after-hours</td>\n",
+ " <td>7.466342e+10</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>556</th>\n",
+ " <td>2024-02-28</td>\n",
+ " <td>SNOW</td>\n",
+ " <td>Snowflake Inc.</td>\n",
+ " <td>-0.60</td>\n",
+ " <td>-0.49</td>\n",
+ " <td>4.0</td>\n",
+ " <td>2024-01</td>\n",
+ " <td>2023-03-01</td>\n",
+ " <td>after-hours</td>\n",
+ " <td>7.429667e+10</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>385</th>\n",
+ " <td>2024-02-29</td>\n",
+ " <td>CNQ</td>\n",
+ " <td>Canadian Natural Resources Limited</td>\n",
+ " <td>1.44</td>\n",
+ " <td>1.53</td>\n",
+ " <td>5.0</td>\n",
+ " <td>2023-12</td>\n",
+ " <td>2023-03-02</td>\n",
+ " <td>pre-market</td>\n",
+ " <td>7.205709e+10</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>386</th>\n",
+ " <td>2024-02-29</td>\n",
+ " <td>NTES</td>\n",
+ " <td>NetEase, Inc.</td>\n",
+ " <td>0.88</td>\n",
+ " <td>1.62</td>\n",
+ " <td>2.0</td>\n",
+ " <td>2023-12</td>\n",
+ " <td>2023-02-23</td>\n",
+ " <td>pre-market</td>\n",
+ " <td>7.017184e+10</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>218</th>\n",
+ " <td>2024-03-05</td>\n",
+ " <td>TGT</td>\n",
+ " <td>Target Corporation</td>\n",
+ " <td>1.89</td>\n",
+ " <td>2.38</td>\n",
+ " <td>16.0</td>\n",
+ " <td>2024-01</td>\n",
+ " <td>2023-02-28</td>\n",
+ " <td>pre-market</td>\n",
+ " <td>6.940624e+10</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>798</th>\n",
+ " <td>2024-02-27</td>\n",
+ " <td>BMO</td>\n",
+ " <td>Bank Of Montreal</td>\n",
+ " <td>2.39</td>\n",
+ " <td>2.28</td>\n",
+ " <td>4.0</td>\n",
+ " <td>2024-01</td>\n",
+ " <td>2023-02-28</td>\n",
+ " <td>pre-market</td>\n",
+ " <td>6.832777e+10</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>387</th>\n",
+ " <td>2024-02-29</td>\n",
+ " <td>DELL</td>\n",
+ " <td>Dell Technologies Inc.</td>\n",
+ " <td>1.55</td>\n",
+ " <td>1.47</td>\n",
+ " <td>4.0</td>\n",
+ " <td>2024-01</td>\n",
+ " <td>2023-03-02</td>\n",
+ " <td>after-hours</td>\n",
+ " <td>6.247146e+10</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>30</th>\n",
+ " <td>2024-03-07</td>\n",
+ " <td>MRVL</td>\n",
+ " <td>Marvell Technology, Inc.</td>\n",
+ " <td>0.34</td>\n",
+ " <td>0.29</td>\n",
+ " <td>12.0</td>\n",
+ " <td>2024-01</td>\n",
+ " <td>2023-03-02</td>\n",
+ " <td>after-hours</td>\n",
+ " <td>6.040262e+10</td>\n",
+ " </tr>\n",
+ " </tbody>\n",
+ "</table>\n",
+ "</div>"
+ ],
+ "text/plain": [
+ " report_date symbol name eps_previous \\\n",
+ "26 2024-03-07 AVGO Broadcom Inc. 9.83 \n",
+ "27 2024-03-07 COST Costco Wholesale Corporation 3.30 \n",
+ "553 2024-02-28 CRM Salesforce, Inc. 1.01 \n",
+ "554 2024-02-28 RY Royal Bank Of Canada 2.26 \n",
+ "796 2024-02-27 LOW Lowe's Companies, Inc. 2.28 \n",
+ "28 2024-03-07 PBR Petroleo Brasileiro S.A.- Petrobras 1.25 \n",
+ "555 2024-02-28 TJX TJX Companies, Inc. (The) 0.89 \n",
+ "29 2024-03-07 PBR.A Petroleo Brasileiro S.A.- Petrobras 1.25 \n",
+ "383 2024-02-29 BUD Anheuser-Busch Inbev SA 0.98 \n",
+ "384 2024-02-29 TD Toronto Dominion Bank (The) 1.64 \n",
+ "797 2024-02-27 AMT American Tower Corporation (REIT) 2.34 \n",
+ "1099 2024-02-26 WDAY Workday, Inc. -0.14 \n",
+ "217 2024-03-05 CRWD CrowdStrike Holdings, Inc. -0.17 \n",
+ "556 2024-02-28 SNOW Snowflake Inc. -0.60 \n",
+ "385 2024-02-29 CNQ Canadian Natural Resources Limited 1.44 \n",
+ "386 2024-02-29 NTES NetEase, Inc. 0.88 \n",
+ "218 2024-03-05 TGT Target Corporation 1.89 \n",
+ "798 2024-02-27 BMO Bank Of Montreal 2.39 \n",
+ "387 2024-02-29 DELL Dell Technologies Inc. 1.55 \n",
+ "30 2024-03-07 MRVL Marvell Technology, Inc. 0.34 \n",
+ "\n",
+ " eps_consensus num_estimates period_ending previous_report_date \\\n",
+ "26 9.06 8.0 2024-01 2023-03-02 \n",
+ "27 3.60 14.0 2024-02 2023-03-02 \n",
+ "553 1.72 16.0 2024-01 2023-03-01 \n",
+ "554 2.10 4.0 2024-01 2023-03-01 \n",
+ "796 1.68 15.0 2024-01 2023-03-01 \n",
+ "28 1.13 3.0 2023-12 2023-03-02 \n",
+ "555 1.11 10.0 2024-01 2023-02-22 \n",
+ "29 NaN 5.0 2023-12 None \n",
+ "383 0.76 4.0 2023-12 2023-03-02 \n",
+ "384 1.46 4.0 2024-01 2023-03-02 \n",
+ "797 2.10 7.0 2023-12 2023-02-23 \n",
+ "1099 0.32 6.0 2024-01 2023-02-27 \n",
+ "217 0.18 14.0 2024-01 2023-03-07 \n",
+ "556 -0.49 4.0 2024-01 2023-03-01 \n",
+ "385 1.53 5.0 2023-12 2023-03-02 \n",
+ "386 1.62 2.0 2023-12 2023-02-23 \n",
+ "218 2.38 16.0 2024-01 2023-02-28 \n",
+ "798 2.28 4.0 2024-01 2023-02-28 \n",
+ "387 1.47 4.0 2024-01 2023-03-02 \n",
+ "30 0.29 12.0 2024-01 2023-03-02 \n",
+ "\n",
+ " reporting_time market_cap \n",
+ "26 after-hours 6.108766e+11 \n",
+ "27 after-hours 3.259489e+11 \n",
+ "553 after-hours 2.842532e+11 \n",
+ "554 pre-market 1.380355e+11 \n",
+ "796 pre-market 1.325692e+11 \n",
+ "28 not-supplied 1.146585e+11 \n",
+ "555 pre-market 1.129534e+11 \n",
+ "29 not-supplied 1.108105e+11 \n",
+ "383 pre-market 1.101379e+11 \n",
+ "384 pre-market 1.074778e+11 \n",
+ "797 pre-market 8.764370e+10 \n",
+ "1099 after-hours 8.064106e+10 \n",
+ "217 after-hours 7.466342e+10 \n",
+ "556 after-hours 7.429667e+10 \n",
+ "385 pre-market 7.205709e+10 \n",
+ "386 pre-market 7.017184e+10 \n",
+ "218 pre-market 6.940624e+10 \n",
+ "798 pre-market 6.832777e+10 \n",
+ "387 after-hours 6.247146e+10 \n",
+ "30 after-hours 6.040262e+10 "
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# Lookup some upcoming earnings dates and sort them by market cap.\n",
+ "\n",
+ "earnings_calendar = obb.equity.calendar.earnings(\n",
+ " start_date=(datetime.now()+timedelta(days=1)).date(),\n",
+ " end_date = (datetime.now()+timedelta(days=14)).date(),\n",
+ " provider=\"nasdaq\"\n",
+ ")\n",
+ "\n",
+ "earnings_calendar.sort_values(by=[\"market_cap\", \"num_estimates\"], ascending=False).head(20)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "1WNFH5_kPFHh",
+ "outputId": "7fb6be6c-4450-47b8-e73d-a0bf95cf8ecc"
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Last Price: $292.8\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Get the last price of the underlying stock.\n",
+ "symbol = \"CRM\"\n",
+ "\n",
+ "quote = obb.equity.price.quote(symbol, provider=\"yfinance\").T\n",
+ "\n",
+ "last_price = quote.loc[\"last_price\", 0]\n",
+ "\n",
+ "print(f\"Last Price: ${last_price}\")\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ },
+ "id": "IzmLloIfTQJo",
+ "outputId": "1c08fa80-eaf2-4548-8c27-70c82fac79ea"
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "2024-03-01\n"
+ ]
+ }
+ ],
+ "source": [
+ "# Get the options chains data.\n",
+ "\n",
+ "options = obb.derivatives.options.chains(symbol, provider=\"cboe\")\n",
+ "\n",
+ "print(options.expiration.unique()[0])"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 444
+ },
+ "id": "pXM5lHrnUU26",
+ "outputId": "8641ff33-0802-42f0-864f-217dc64f6014"
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "<div>\n",
+ "<style scoped>\n",
+ " .dataframe tbody tr th:only-of-type {\n",
+ " vertical-align: middle;\n",
+ " }\n",
+ "\n",
+ " .dataframe tbody tr th {\n",
+ " vertical-align: top;\n",
+ " }\n",
+ "\n",
+ " .dataframe thead th {\n",
+ " text-align: right;\n",
+ " }\n",
+ "</style>\n",
+ "<table border=\"1\" class=\"dataframe\">\n",
+ " <thead>\n",
+ " <tr style=\"text-align: right;\">\n",
+ " <th></th>\n",
+ " <th>contract_symbol</th>\n",
+ " <th>expiration</th>\n",
+ " <th>strike</th>\n",
+ " <th>option_type</th>\n",
+ " <th>open_interest</th>\n",
+ " <th>volume</th>\n",
+ " <th>theoretical_price</th>\n",
+ " <th>last_trade_price</th>\n",
+ " <th>tick</th>\n",
+ " <th>bid</th>\n",
+ " <th>...</th>\n",
+ " <th>change</th>\n",
+ " <th>change_percent</th>\n",
+ " <th>implied_volatility</th>\n",
+ " <th>delta</th>\n",
+ " <th>gamma</th>\n",
+ " <th>theta</th>\n",
+ " <th>vega</th>\n",
+ " <th>rho</th>\n",
+ " <th>last_trade_timestamp</th>\n",
+ " <th>dte</th>\n",
+ " </tr>\n",
+ " </thead>\n",
+ " <tbody>\n",
+ " <tr>\n",
+ " <th>0</th>\n",
+ " <td>CRM240301C00135000</td>\n",
+ " <td>2024-03-01</td>\n",
+ " <td>135.0</td>\n",
+ " <td>call</td>\n",
+ " <td>0</td>\n",
+ " <td>0</td>\n",
+ " <td>157.9118</td>\n",
+ " <td>0.00</td>\n",
+ " <td>no_change</td>\n",
+ " <td>157.15</td>\n",
+ " <td>...</td>\n",
+ " <td>0.000</td>\n",
+ " <td>0.000</td>\n",
+ " <td>2.1031</td>\n",
+ " <td>0.9997</td>\n",
+ " <td>0.0000</td>\n",
+ " <td>0.0000</td>\n",
+ " <td>0.0004</td>\n",
+ " <td>0.0210</td>\n",
+ " <td>NaT</td>\n",
+ " <td>5</td>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <th>1</th>\n",
+ " <td>CRM240301P00135000</td>\n",
+ " <td>2024-03-01</td>\n",
+ " <td>135.0</td>\n",
+ " <td>put</td>\n",
+ " <td>64</td>\n",
+ " <td>5</td>\n",
+ " <td>0.0038</td>\n",
+ " <td>0.01</td>\n",
+ " <td>down</td>\n",
+ " <td>0.00</td>\n",
+ " <td>...</td>\n",
+ " <td>-0.070</td>\n",
+ " <td>-0.875</td>\n",
+ " <td>1.6854</td>\n",
+ " <td>-0.0002&l