Posted by
elton wang on
URL: http://quantlib.414.s1.nabble.com/ask-help-on-swapratehelper-earilst-date-tp5432p5433.html
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