Re: ask help on swapratehelper earilst date

Posted by Li, Peter on
URL: http://quantlib.414.s1.nabble.com/ask-help-on-swapratehelper-earilst-date-tp5432p5434.html

Hello, Elton:
The answer is:

The swap in SwapRateHelper uses USDLibor-> fixingCalendar(), which is
London stock exchange, to construct the floating and fixed leg but you
used
Calendar calendar =UnitedStates() to get the settlement date.

------------------------------------
Peter
 

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of elton
wang
Sent: Thursday, January 17, 2008 10:54 AM
To: [hidden email]
Subject: Re: [Quantlib-users] ask help on swapratehelper earilst date

cput from the code below. I am using QL ver 0.9. s1y
rate helper gives 01/21/08(ML King day) as the swap
start date. anything I did wrong? Many thanks to Peter
and all of you.

Today: Thursday, January 17th, 2008
Settlement date: Tuesday, January 22nd, 2008
 s1y->earliestDate()=January 21st, 2008


--- elton wang <[hidden email]> wrote:

> Sorry for asking stupid questions: Could anybody
> help
> me on the use of SwapRateHelper? In the relavant
> code
> below, the evaluation date is 01/17, settlement date
> is 01/22, but the swapratehelper s1y gives an
> earilest
> datet 01/21 so the bootstrap fails.
>
> Thanks a lot!
>
> Calendar calendar =UnitedStates();
> Date todaysDate(17,Jan,2008);
> Integer fixingDays = 2;
> Date settlementDate = calendar.advance(todaysDate,
> fixingDays, Days);
>      
> Settings::instance().evaluationDate() = todaysDate;
>
>
>         Frequency swFixedLegFrequency = Semiannual;
>         BusinessDayConvention swFixedLegConvention =
> ModifiedFollowing;
>         DayCounter swFixedLegDayCounter =
> Thirty360(Thirty360::USA);
>         boost::shared_ptr<IborIndex>
> swFloatingLegIndex(new USDLibor(Period(3,Months)));
>
>         boost::shared_ptr<RateHelper> s1y(new
> SwapRateHelper(
>             Handle<Quote>(s1yRate), 1*Years,
>             calendar, swFixedLegFrequency,
>             swFixedLegConvention,
> swFixedLegDayCounter,
>             swFloatingLegIndex));
>
>
>      
>
________________________________________________________________________
____________
> Looking for last minute shopping deals?  
> Find them fast with Yahoo! Search.
>
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>
>
------------------------------------------------------------------------
-
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio
> 2008.
>
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
>
https://lists.sourceforge.net/lists/listinfo/quantlib-users
>



 
________________________________________________________________________
____________
Never miss a thing.  Make Yahoo your home page.
http://www.yahoo.com/r/hs

------------------------------------------------------------------------
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users