The document contains code to plot the variation of the Greek values theta, gamma, vega, and delta with changes in stock price and time to maturity for a call option. It defines parameters like the stock price, strike price, interest rate, volatility, and time to maturity. It then calls functions to calculate the Greek values for varying stock prices or time to maturity and plots the results.
The document contains code to plot the variation of the Greek values theta, gamma, vega, and delta with changes in stock price and time to maturity for a call option. It defines parameters like the stock price, strike price, interest rate, volatility, and time to maturity. It then calls functions to calculate the Greek values for varying stock prices or time to maturity and plots the results.
The document contains code to plot the variation of the Greek values theta, gamma, vega, and delta with changes in stock price and time to maturity for a call option. It defines parameters like the stock price, strike price, interest rate, volatility, and time to maturity. It then calls functions to calculate the Greek values for varying stock prices or time to maturity and plots the results.
figure plot(s,gamma,'-') title('gamma vs. s') xlabel('s') ylabel('gamma') legend('gamma')
Plot the variation of vega with stock price
for a call option x=50; r=0.05; t=0.5; sig=0.2; div=0; s=30:120; vega=blsvega(s,x,r,t,sig,div) figure plot(s, delta,'-') title('delta vs. s') xlabel('s') ylabel('delta') legend('delta')
Plot the patterns for variation of delta
with time to maturity for a call option x=50; r=0.05; t=1:10 sig=0.2; div=0; s=30 delta=blsdelta(s,x,r,t,sig,div) figure Plot(t, delta,'-') title('delta vs. s') xlabel('s') ylabel('delta') legend('delta')