DiscretizedAsset

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

DiscretizedAsset

andrea.odetti-2
Hi guys

I would like to suggest an idea about DiscretizedAsset class

I think that there should be methods in the DiscretizedAsset class to add,
multiply, subtract, max, min, etc... a DiscretizedAsset object with another
DiscretizedAsset object or a double value.

for instance, to price a payer swap (equal frequencies) you could do

1) create DiscretizedAsset at time T (value 0)

2) loop:

     subtract (1 + Rate * tenor)
     roll back to previous payment date
     add 1

   until the first fixing date

3) rollback at origin

and you would not need to derive a new class from DiscretizedAsset...

what do you think about that?

ciao

andrea

----------------------------------------------------------------------------------------------------------------------------------------
La presente comunicazione è destinata esclusivamente al soggetto indicato
più sopra quale destinatario o ad eventuali altri soggetti autorizzati a
riceverla. Essa contiene informazioni strettamente confidenziali e
riservate, la cui comunicazione o diffusione a terzi è proibita, salvo che
non sia stata espressamente autorizzata.
Se avete ricevuto questa comunicazione per errore, Vi preghiamo di darne
immediata comunicazione al mittente e di cancellarne ogni evidenza dai
Vostri supporti.
----------------------------------------------------------------------------------------------------------------------------------------



Reply | Threaded
Open this post in threaded view
|

Re: DiscretizedAsset

Ferdinando M. Ametrano-2
At 01:35 PM 10/30/2002 +0100, you wrote:
>I think that there should be methods in the DiscretizedAsset class to add,
>multiply, subtract, max, min, etc... a DiscretizedAsset object with another
>DiscretizedAsset object or a double value.
I agree. Why don't you go ahead and write the implementation?

ciao -- Nando