This Shiny R code will plot option stock open interest for any valid stock ticker (a stock with options) and for a given expiration date.
- Graphing choices:
- Ticker symbol
- Graph Type
- open Interest
- cumulative
- Expiration (available expiration dates for the ticker.)
- All expirations - compbines all future expirations
Options are different from stocks in that a stock has a float, the number of shares available, where options have open interest. For any particular expiration date, for any strike, there are a certain number of put and call contracts: the open interest. Note that this is not the same as the volume.
Open interest is not calculated during the day. It is calculated and posted after market close and before next market open.
Cumulative graph is simply the cumulative sum of put contracts as the strikes increase, and for calls it is as strike prices decrease.
All expirations simply is the simultaneous plotting of all expirations
Run on my shinyio server: https://bravo.shinyapps.io/openinterest/
To run locally install R, then:
install.packages(c("shiny", "ggplot2", "quantmod", "scales"), repos="http://cran.rstudio.com/")
library(shiny)
runGitHub("shiny-openinterest", "dshanabrook")