1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

G2++: Swaption analytic formula

Discussion in 'Computing' started by Andrea, 11/15/08.

  1. Andrea

    Andrea
    Expand Collapse
    New Member

    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