I'm trying to implement MC-simulation with local vol in Matlab and my algorithm is (assume one simulation)
S(tn+1) = S(tn) + r*deltaT*S(tn) + LV(K,tn)*S(tn)*sqrt(deltaT)*N(0,1)
where
tn = time
deltaT = time interval
K = strike
The LV-function is a matrix consisting of local volatilities for each pair of strike/maturity combination. I get that if I am at time tn I can look in my LV-matrix and find the local vol corresponding to that maturity but the problem is that for each tn I also have a lot of different local volatilities in my LV-matrix (one for each strike price). So which one do I choose
S(tn+1) = S(tn) + r*deltaT*S(tn) + LV(K,tn)*S(tn)*sqrt(deltaT)*N(0,1)
where
tn = time
deltaT = time interval
K = strike
The LV-function is a matrix consisting of local volatilities for each pair of strike/maturity combination. I get that if I am at time tn I can look in my LV-matrix and find the local vol corresponding to that maturity but the problem is that for each tn I also have a lot of different local volatilities in my LV-matrix (one for each strike price). So which one do I choose