- Joined
- 5/4/08
- Messages
- 8
- Points
- 11
Hi all,
i'm trying to build the analytic formula of an european swaption ,in Matlab, by following Brigo-Mercurio pag.158-59.
I'm using the parameters present in the book (a=0.7735, b=0.08201, sigma=0.02228; eta=0.01038, rho=-0.7019), but when i try to calculate the
rho_xy=((rho*sigma*eta)/((a+b)*sigma_x*sigma_y))*(1-exp(-(a+b)T))
the value, with T=2(maturity), is -1.033.
The problem is that when i have to calculate the h1_x the value sqrt(1-rho_xy^2) is negative, and that is impossible and it creates an error.
Do someone have any suggestions??????
Thank you
i'm trying to build the analytic formula of an european swaption ,in Matlab, by following Brigo-Mercurio pag.158-59.
I'm using the parameters present in the book (a=0.7735, b=0.08201, sigma=0.02228; eta=0.01038, rho=-0.7019), but when i try to calculate the
rho_xy=((rho*sigma*eta)/((a+b)*sigma_x*sigma_y))*(1-exp(-(a+b)T))
the value, with T=2(maturity), is -1.033.
The problem is that when i have to calculate the h1_x the value sqrt(1-rho_xy^2) is negative, and that is impossible and it creates an error.
Do someone have any suggestions??????
Thank you