Posted by
Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Why-does-DayCounter-Business252-blow-up-the-pricing-time-tp852p853.html
On Tue, 2010-02-02 at 11:15 -0600, ravi agrawal wrote:
> I wanted to know why is Business252
> DayCounter dayCounter252 =
> Business252(UnitedStates(UnitedStates::NYSE));
> is increasing the time taken to price option.
Business252 must count the business days between the dates, which can
only be done by iterating over all the dates in between and checking
whether they are holidays (see the Calendar::businessDaysBetween method,
which is called by Business252::Impl::dayCount.) All other day counters
just count the actual days between the dates (or some approximation
thereof) which can be done very quickly by taking the difference between
the two dates.
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
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users