C++ Programing for Financial Engineering Online Certificate. Join hundreds of graduates from over 35 countries on 5 continents.

Advanced C++11/C++14 and Multidisciplinary Applications Online Certificate. Launched in January 2017.

  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 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


    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