This code demonstrates the concept of local volatility. A simple case is considered of a time varying implied volatility. After calculating the local volaltility, we try to verify the fact that iplied volatility is average of local volatiliies. After avergaging the volaltilties, we find that both vectors match. The idea is similar to the difference between caplet and cap volatilities. Cap volatility is average of the constituent caplet vols. In a similar way, we fnd that implied vol. is avergae of the local vols.
Got a question or problem with this link? Just enter your message and click on submit. No registration is required.