|
From: Luigi B. <lui...@gm...> - 2007-03-21 08:43:58
|
On Tue, 2007-03-20 at 18:24 +1100, Ibrahim ElFayoumi wrote: > I am trying to write a wrapper around quantlib to do various simple > things. I wanted to be able to use black school formulae to calculate > the call Primium at a given date given the various Required values, > like underlying, strike, volatility and rate… > > Why I get zero at the end? > > Date settlementDate = todaysDate + (int) DaysToMature; > > Date maturity = todaysDate + (int) DaysToMature; The settlement date is the date to which the option value is discounted to get its NPV---depending on where you are based, it might be today's date or a couple of days from today. Setting it to be the same as the maturity is probably causing the option to be seen as expired. Luigi ---------------------------------------- All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can't get them together again, there must be a reason. By all means, do not use a hammer. -- IBM maintenance manual, 1925 |