VisualR

John T. Buynak

2019-03-06

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))