Options
The Options menu provides the user with tools for analyzing equity options. Wikipedia is a great resource for definitions and for learning about the mechanics of derivatives, read it here. These are complex, leveraged, financial instruments requiring specialized knowledge and a different frame-of-mind than the approach taken by an equities long-only investor. Always conduct thorough due diligence.
Usage
Navigate to the menu by typing options
, from the /stocks
menu, and then pressing enter. The menu can also be entered by the absolute path:
/stocks/options
The source for the options data can be defined using the load
command, and a default preference is be defined in the /sources
menu - or on the OpenBB Hub. The chains data returned will vary by source. The following sources are currently available to use:
- YahooFinance
- Nasdaq
- Tradier (requires API key)
- Intrinio (requires API key)
The menu can be entered without a ticker symbol loaded. If one is already loaded from the stocks menu, it will automatically fetch the chains data from the default source. The commands displayed above the currently active Ticker and Expiry do not require any data to be loaded, while the functions below do.
Function Key | Description |
---|---|
calc | A basic payoff diagram for a single call or put. |
chains | Display options chains and Greeks. |
eodchain | Gets the option chain for a ticker, on a specific date. |
exp | Select a target expiration date. |
greeks | Shows or recalculates the Greeks for an expiration date. |
grhist | Plot the historical Greeks of an individual contract. |
hedge | A calculator for weighting a position to neutralize delta. |
hist | Historical prices of an individual contract. |
info | Basic stats for the options chain. |
load | Load a new ticker. |
oi | Plot the open interest. |
plot | Plot x vs. y as defined by the user. |
pcr | Display historical rolling put/call ratios for a ticker over a selectable window. |
screen | An options screener. |
unu | Unusual options activity for S&P 500 stocks. |
voi | Plot the volume and open interest together. |
vol | Plot the volume. |
vsurf | 3-D volatility surface chart. |
The examples here will start by entering the Options menu without a ticker symbol loaded.
/stocks/options
UNU
Unusual options are described as those having a very high volume/open interest ratio. This function is built using the data provided by fdscanner.com. By default, the top 20 options with the highest vol/OI ratio are returned as a table.
unu
With the new interactive tables, it may be better to remove the limit and utilize the table's built-in filtering.
unu -l 500
This returned over 500 results which can then be filtered, for example, by June/23 expirations. There were thirty-four results.
Load
Let's take a look at one of these tickers, GM. The default source will be YahooFinance
. Select a different source by attaching --source
to the command.
load gm
This obtains the data for all the expirations, very long chains - like SPY - may take a few moments to load.
Getting Option Chain ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Loaded option chain from YahooFinance
PCR
The pcr
command plots a rolling put/call ratio (ten years max) over a selectable window of time (default is 30 days).
pcr -l 90 -s 2010-04-01
Adding in an overlay from an exported CSV file adds more context to the story.
/stocks/load GM --start 2013-04-01 --monthly --export gm_monthly.csv
EXP
After loading, select an expiration date for the chain using the exp
command. To display the list of available expirations, use the function with no arguments. The date can be selected by entering a number - with 0
being the nearest expiry - or by entering the date, formatted as YYYY-MM-DD
.
exp 2023-06-02
Expiration set to 2023-06-02
Plot
Use the plot
function to draw the volatility smile for the selected expiration date.
plot -c smile
Greeks
Calculate the second order Greeks - Rho, Phi, Charm, Vanna, Vomma - with the greeks
command.
greeks --risk-free 4.8 --all