Posted by
Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Quantlib-tp9291p9292.html
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
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev