Hedging Experiment in the Hull and White model

European call option that must be hedged: strike price K= /2, time to maturity t ( and t assigned by the user)
European call option used to hedge: strike price K1=(1+0.05)/2, time to maturity t ( and t assigned by the user)

 

Insert risk free interest rate r* (years-1) (0 ≤ r* ≤ 1)
Insert correlation coefficient r (-1 < r < 1)
Insert vol of vol e (years-1/2) (0 ≤ e ≤ 0.2)
Insert drift of variance m (years-1) (-1 ≤m≤1)
Insert initial volatility (years-1/2) (0 < ≤ 0.2)
Insert initial value of the asset price (USD) (0 < ≤ 10)
Insert time to maturity t (years) (0 < t0.5)
Insert sample size N (0 < N ≤ 10000)
Realized variance of the not-hedged position Rt (years-1):
Realized variance of the hedged position Rh,t (years-1):