Login  Register

Problem with a list of times

Posted by Perissin Francesco on Oct 01, 2002; 3:06pm
URL: http://quantlib.414.s1.nabble.com/Problem-with-a-list-of-times-tp2221.html

Hi,

I am playing around with QL in order to get the pricing of a range accrual
on interest rates, using the tree pricing on one factor models. I am stuck
because of the following problem: when preparing the list of times to be
given to the model, it seems that the std::list<Time> is not able to sort
them efficiently!!!?!! (after waiting 1 minute, I realized that this much
more cpu consuming that the pricing itself!!)

The list contains no more than 2500 times, i.e. the starting and ending
times of a 5 years daily range accrual. Obviously, many of them are equal,
and should be removed using the unique() method.

The questions are:
+ is it necessary that the tree is built using all of these dates? (they are
relevant in order to calculate the digital options...)
+ is there a way to sort them more efficiently? Maybe I should insert them
in the correct place of the list, one by one?

Thanks

Francesco
--
############################### DISCLAIMER #################################

This  message  (including  any  attachments)  is  confidential  and  may be
privileged.  If you have received it by mistake please notify the sender by
return  e-mail  and  delete this message from your system. Any unauthorised
use  or  dissemination  of  this  message  in  whole or in part is strictly
prohibited.  Please  note  that e-mails are susceptible to change. Banca del
Gottardo (including  its  group  companies)  shall not be liable for the
improper  or  incomplete  transmission of the information contained in this
communication  nor  for  any delay in its receipt or damage to your system.
Banca del Gottardo  (or its group companies) does not guarantee that the
integrity   of  this  communication  has  been  maintained  nor  that  this
communication is free of viruses, interceptions or interference.

############################################################################