Why does DayCounter Business252 blow up thepricing time

Posted by Piter Dias-4 on
URL: http://quantlib.414.s1.nabble.com/Why-does-DayCounter-Business252-blow-up-the-pricing-time-tp852p858.html

On Tue, 2 Feb 2010 18:02:51 +0000, [hidden email] wrote:
> Why does it have to be so inefficient? 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...

It could be improved for weekends but the way holidays are stored (inside
isBusinessDay calendar method) it is not possible to get them without
checking each date in the interval.
The way holidays are stored must change (somehow) or Calendar classes use
some kind of prepared data (a base date + X calendar days = Y business
days) in order improve performance. I already used the last one in a data
base and performance improvement was huge.

Regards,


-------------------------

Piter Dias
[hidden email]
http://www.piterdias.com


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