Directory of Open Source for Quantitative Finance and Trading
Username: Password: Not registered?
 
Quick Search:    (AJAX based: No need to press button)

Main : Quantlib : 


Category: Quantlib View Full Details
Download Now!Bond Option Pricing in Vasicek Model
Submitter: vanna Date: 2007/12/11
Description:
A simple example, demonstartes how to price bond option in Vasicek model.
atm_option_price : At the money bond option price
itm_option_price : In the money bond option price
otm_option_price : Out of the money bond option price


  Rate r0 = 0.05;
  Real a = 0.1;
  Real b = 0.05;
  Real sigma = 0.01;
  Real lambda = 0.0;

  Vasicek object_vasicek(r0,a,b,sigma,lambda);
  Option::Type oType=Option::Call;
  
  Time maturity=1;
  Time bondMaturity=2;
  Time now=0;
  Real bondPrice=object_vasicek.discountBond(maturity,bondMaturity,r0);
  Real strike=bondPrice;
  Real atm_option_price=object_vasicek.discountBondOption(oType, strike,  maturity, bondMaturity);

  strike=bondPrice*0.9;
  Real itm_option_price=object_vasicek.discountBondOption(oType, strike,  maturity, bondMaturity);

  strike=bondPrice*1.1;
  Real otm_option_price=object_vasicek.discountBondOption(oType, strike,  maturity, bondMaturity);


Got a question or problem with this link? Just enter your message and click on submit. No registration is required.

Note: A copy of this message will also be emailed to the submitter of this link
Downloaded 884 times  884  File Size 0 bytes  Supported Platforms Quantlib 0.8.0  Home Page http://www.quantcode.com
Rating: 0.00 (0 votes)
Rate this File | Modify | Delete | Report Broken File | Tell a Friend | Comments (13)

Discuss this file. Just enter your message and click on submit. No registration is required.
Similar Links:
Bond Option pricing in Hull White Model (Software)
Levy Models in Option Pricing (Paper)
Swaption Pricing in Vasicek Model using Simulation (Software)
Bond Option Price in Hull White Model (Software)
Vasicek Bond Option pricing using Forward Measure (Software)

Subscribe to RSS or daily email updates of latest quantitative finance code listings
Email address :
Copyright © 2011 QuantCode Inc. All rights reserved.