Posted by
Ferdinando M. Ametrano-3 on
URL: http://quantlib.414.s1.nabble.com/Building-the-ZeroRate-curve-from-deposit-futures-irs-tp5625p5628.html
Hi Luca
> Taking this "rosetta's legend" in my previous message:
>
> 1D = overnight
> 2D = tomorrow-next
> 3D = spot next
I would suggest you to abandon your 1D, 2D, 3D dialect and conform to
market jargon: ON, TN, SN
> // 1D=overnight (fix today, start today, last 1 day)
>
> boost::shared_ptr<RateHelper> d1d(new DepositRateHelper(
> Handle<Quote>(d1dRate),
> 1*Days, 0,
> calendar, ModifiedFollowing,
> true, 0, depositDayCounter));
> [...]
the market convention for deposits under 1 Month is Following, not
ModifiedFollowing. Besides that your code looks ok to me
> if today is 22/11/2007 and I want to obtain the zero-rate curve
> starting from tomorrow [..]
why should you? You probably want to have discount = 1.0 at today's date.
The only reasonable alternative (which I would NOT suggest) is to have
discount = 1.0 at spot date, i.e. two business days from today. In the
former case you can include ON, TN, and SN; in the latter you would
only include SN, as nothing before spot makes sense in that case.
You must have some really contrived reason to require discount = 1.0 tomorrow...
> should I write the following code ???
>
> Calendar calendar = Italy();
the reference holiday calendar for EUR is TARGET, not Italy
> Date todaysDate = Date(22, November, 2007);
> Settings::instance().evaluationDate() = todaysDate;
>
> Integer fixingDays = 1;
> Date settlementDate = calendar.advance(todaysDate, fixingDays, Days);
fixing date should be 2, or even better fix settlementDate =
todaysDate and get rid of fixingDays
> Setting settlementDate as referenceDate in the PieacewiseYieldCurve,
> this code fails to evaluate the first deposit, because says that it has
> a date in the past.
This makes sense: if you fix discount = 1.0 at tomorrow's date nothing
exists before tomorow's date, i.e. the SN depo is in the past
Hope it helps... and also hope you have less trouble with futures and swaps ;-)
ciao -- Nando
-------------------------------------------------------------------------
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