collapse = TRUE,
  comment = "#>"


This package utilizes functionality from the package "optionstrat" and "plotly" to produce a 3D graph plotting a selected option parameter over time for a double vertical option spread. The available parameters are the option premium or an option greek such as delta, gamma, vega, theta or rho. A double vertical option spread is an option strategy composed of 4 options of the same type (calls or puts) with different strike prices, the highest and lowest strike option are typically long while the middle two are short. The double vertical spread is also known as an "Iron Condor", or an "Iron Butterfly" if the middle two options have the same strike.

visualize((type = "call", parameter = "premium", s = 100, si = 100, x1 = 90, x2 = 95, x3 = 105, x4 = 110, v1 = 0.20, v2 = v1, v3 = v1, v4 = v1, ti = 45/365, r = 0.02, d = 0, ls = 1, low = 75, high = 125, e1 =(45/365), e2 = (30/365), e3 = (15/365), e4 = (1/365), c1 = 1, c2 = 1, c3 = 1, c4 = 1))


This function produces a 3d Plot of the volatility skew any publicly traded corporation or index. It plots the implied volatility of option contracts of five expirations, the expirations used are the contracts closest to 5, 15, 25, 35 and 45 days to expiration. Only contracts with a strike between the current spot price multiplied by the lower limit and the upper limit will be used in the plot.

Try the visualR package in your browser

Any scripts or data that you put into this service are public.

visualR documentation built on Aug. 21, 2019, 1:05 a.m.