How to calculate greeks with R in the option market

Greeks in the option market with R

  1. Delta (Δ): Measures the rate of change in the option’s price for a one-point move in the price of the underlying asset. For example, a delta of 0.5 suggests the option price will move $0.50 for every $1 move in the underlying asset. 
  2. Gamma (Γ): Represents the rate of change in the delta with respect to changes in the underlying price. This is important as it shows how stable or unstable the delta is; higher gamma means delta changes more rapidly. 
  3. Theta (Θ): Measures the rate of time decay of an option. It indicates how much the price of an option will decrease as one day passes, all else being equal.
  4. Vega (ν): Indicates the sensitivity of the price of an option to changes in the volatility of the underlying asset. A higher vega means the option price is more sensitive to volatility. 
  5. Rho (ρ): Measures the sensitivity of an option’s price to a change in interest rates. It indicates how much the price of an option should rise or fall as the risk-free interest rate increases or decreases. 

These Greeks are essential tools for traders to manage risk, construct hedging strategies, and understand the potential price changes in their options with respect to various market factors. Understanding and effectively using the Greeks can be crucial for the profitability and risk management of options trading.


Greeks in the option market

  R Programming Language Code:
plotbullcall(s= 100, x1 = 95, x2 = 105, t = (45/365), r = 0.02,sigma = 0.20, sigma2 = 0.20, d = 0, ll = 0.75, ul = 1.25)
> plotbullput(s= 100, x1 = 95, x2 = 105, t = (45/365), r = 0.02,
+             sigma = 0.20, sigma2 = 0.20, d = 0, ll = 0.75, ul = 1.25)
> plotbullput(s= 100, x1 = 95, x2 = 105, t = (45/365), r = 0.02,
+             sigma = 0.20, sigma2 = 0.20, d = 0, ll = 0.75, ul = 1.25)
> puttheta(100, 100, 0.20, (45/365), 0.02, 0.02)
[1] -0.02979083
> optiongamma(100, 100, 0.20, (45/365), 0.02, 0.02)
[1] 0.05663458
> calleval(100, 100, 0.20, (45/365), 0.02, 0.02)
   Premium     Delta      Gamma      Vega       Theta
1 2.794086 0.5127391 0.05663458 0.1396469 -0.02979083
         Rho
1 0.05976964
> callgreek("delta", 100, 100, 0.20, (45/365), 0.02, 0.02)
[1] 0.5127391
> callgreek("gamma", 100, 100, 0.20, (45/365), 0.02, 0.02)
[1] 0.05663458
> callgreek("vega", 100, 100, 0.20, (45/365), 0.02, 0.02)
[1] 0.1396469
> callgreek("theta", 100, 100, 0.20, (45/365), 0.02, 0.02)
[1] -0.02979083

Post a Comment

0 Comments