- Joined
- 8/29/14
- Messages
- 4
- Points
- 11
Hi everyone!
I'm currently trying to calibrate the G2++ model by Brigo and Mercurio to the ATM volatility surface in Matlab.
But, instead of using the percentage difference between market prices and model prices as the objective function (for LSQNONLIN and GA) , I'm using the difference between market volatilities and model's implied volatilities (I know it is unusual, but it is for my master thesis). Unfortunately some G2 implied volatilities are NaN (especially for short tenors and maturities) and stop the Genetic Algorithm from finding the minimum.
So I was wandering if:
Is it a good idea to substitute NaN values with the corrisponding Market Volatility multiplied by a large number or is it better to eliminate the corresponding Market Volatility?
Or is it better to put a large value of the objective function each time there is a NaN implied volatility as a result of the model?
I cannot change algorithm, otherwise I would have used PATTERNSEARCH.
So please help me!
Thanks.
P.S. I'm sorry for any grammar mistake, but English isn't my first language.
I'm currently trying to calibrate the G2++ model by Brigo and Mercurio to the ATM volatility surface in Matlab.
But, instead of using the percentage difference between market prices and model prices as the objective function (for LSQNONLIN and GA) , I'm using the difference between market volatilities and model's implied volatilities (I know it is unusual, but it is for my master thesis). Unfortunately some G2 implied volatilities are NaN (especially for short tenors and maturities) and stop the Genetic Algorithm from finding the minimum.
So I was wandering if:
Is it a good idea to substitute NaN values with the corrisponding Market Volatility multiplied by a large number or is it better to eliminate the corresponding Market Volatility?
Or is it better to put a large value of the objective function each time there is a NaN implied volatility as a result of the model?
I cannot change algorithm, otherwise I would have used PATTERNSEARCH.
So please help me!
Thanks.
P.S. I'm sorry for any grammar mistake, but English isn't my first language.