# VisualR

#### Visualize

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

• type Character String: “call” or “put”
• parameter Character String: “premium”, “delta”, “gamma”, “vega”, “theta”, “rho”
• s Underlying Asset Price
• si Initial Price of the underlying asset
• x1 Option 1 Strike
• x2 Option 2 Strike
• x3 Option 3 Strike
• x4 Option 4 Strike
• v1 Option 1 Volatility
• v2 Option 2 Volatility
• v3 Option 3 Volatility
• v4 Option 4 Volatility
• ti Initial time to maturity in years
• r Annualized continuously compounded risk-free rate
• d Annualized continuously compounded dividend yield
• ls Numerical either 1 or -1
• low Lower Limit for the price range
• high Upper Limit for the price range
• e1 Expiration, in years. Set to 45/365
• e2 Expiration, in years. Set to 30/365
• e3 Expiration, in years. Set to 15/365
• e4 Expiration, in years. Set to 1/365
• c1 Option 1, Number of Contracts
• c2 Option 2, Number of Contracts
• c3 Option 3, Number of Contracts
• c4 Option 4, Number of Contracts

#### volskew

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.