Re: Why does DayCounter Business252 blow up thepricing time

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Why-does-DayCounter-Business252-blow-up-the-pricing-time-tp852p855.html

On Tue, 2010-02-02 at 18:02 +0000, [hidden email] wrote:
> Why does it have to be so inefficient?

It _doesn't_ have to be, but...

> If the time period is greater than even a few days, it would be more
> efficient to count the number of holidays between the days (and total
> up the number of weekends) and remove the total from the number of
> days...

...as Piter said, the point is to count the number of holidays between
any two days.  Right now they're implemented as rules (i.e., logic such
as 'December 25th each year' or 'the third Monday in January') not a
list of days.  To count them, you have to loop---unless you precalculate
stuff, but it has to be stored cleverly to work for any two days.

Luigi



--

Innovation is hard to schedule.
-- Dan Fylstra



------------------------------------------------------------------------------
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