Re: Swap start date and length

Posted by Xavier.Abulker on
URL: http://quantlib.414.s1.nabble.com/Swap-start-date-and-length-tp2655p2657.html

Hi Navin,
For the maturitry I had the same issue last week and this is what I did:

/// I define the Swap
SimpleSwap spot5YearSwap(payFixedRate, spotDate, lenghtInYears,
            Years, calendar, roll, nominal, fixedLegFrequency, fixedRate,
            fixedLegIsAdjusted, fixedLegDayCounter, floatingLegFrequency,
            euriborIndex, fixingDays, spread,
            discountingTermStructure); // using the discounting curve


std::cout <<  " The swap maturity is: "
<<DateFormatter::toString(spot5YearSwap.maturity())<< std::endl;

Now for the start date I don't know either.
It looks it's missing in the list of the class inspectors.
You should create your own method to access this argument of the SimpleSwap
class and propose it to Quantlib.

I hope it helps a little bit.
Xavier


                                                                                                                     
                    navin mehta                                                                                      
                    <[hidden email]>                To:     [hidden email]              
                    Sent by:                               cc:                                                      
                    [hidden email]       Subject:     [Quantlib-users] Swap start date and length  
                    eforge.net                                                                                      
                                                                                                                     
                                                                                                                     
                    09/09/2003 00:49                                                                                
                                                                                                                     
                                                                                                                     




Given a swap object, how can I get the start date and length ? (I tried to
find it in the heirarchy,and even the Swaphelper, but could not find any
public method)


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software








*************************************************************************
Ce message et toutes les pieces jointes (ci-apres le "message") sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration.
La Fimat et ses filiales declinent toute responsabilite au
titre de ce message s'il a ete altere, deforme ou falsifie.
                    ********
This message and any attachments (the "message") are confidential and
intended solely for the addressees.
Any unauthorised use or dissemination is prohibited.
E-mails are susceptible to alteration.
Neither Fimat nor any of its subsidiaries or affiliates shall
be liable for the message if altered, changed or falsified.
*************************************************************************