question on AmericanOption.cpp
Posted by M L-3 on
URL: http://quantlib.414.s1.nabble.com/revisit-Error-compiling-QuantLib-3-10-in-MSVC6-back-inserter-tp4036p4038.html
Pardon me becasue this is not strictly a quantlib question, but a question
on equity option convention.
In the AmericanOption Class examples that come with the package, why is the
option calculated from settlementDate to exerciseDate? I thought the value
of the option was from trade date(todaysDate) to expiration(15 May, 2005,
not 17 May, 1998)? it seems like the example is counting the days from
settle to settle, not from trade to expiration.
Would anyone care to explain?
thanks
mike
-------
code segments from the example:
// our option
Option::Type type(Option::Put);
Real underlying = 36;
Real strike = 40;
Spread dividendYield = 0.00;
Rate riskFreeRate = 0.06;
Volatility volatility = 0.20;
Date todaysDate(15, May, 1998);
Date settlementDate(17, May, 1998);
Date exerciseDate(17, May, 1999);
DayCounter rateDayCounter = Actual365();
Time maturity = rateDayCounter.yearFraction(settlementDate,
exerciseDate);