http://quantlib.414.s1.nabble.com/R-Re-Curve-building-with-depo-futures-and-swaps-tp6986p6987.html
or the reason for the runtime error. Are you sure that this is the
method cannot find a satisfied solution for finding a root. Perhaps you
> Thanks in advance,
> ciao
> P
>
>> ----Messaggio originale----
>> Da:
[hidden email]
>> Data: 28/07/2010 20.32
>> A: "
[hidden email]"<
[hidden email]>
>> Cc: <
[hidden email]>
>> Ogg: Re: [Quantlib-users] Curve building with depo, futures and swaps
>>
>>
>> Hi P,
>>
>>
[hidden email] schrieb:
>>
>>> Hello,
>>>
>>> I am just trying to build a curve by using the swap rates, futures and
>>>
> depos
>
>>> but I am having a very strange error (my system crash). Before re-
>>>
> installing I
>
>>> would like to know if someone of you see some error in my piece of code
>>>
> that I
>
>>> used. May be there is some error that I cant see.
>>>
>>>
>> you seemed to have a runtime error. Can you provide a standalone example
>> where we can reproduce the error?
>> BTW did you put your code in a try/catch block to catch the runtime error?
>>
>> -Kim
>>
>>
>>> Legenda = instruments is just a vector containing Rates and prices for
>>>
> depo,
>
>>> swap and futures.
>>> Everithing looks works well till when I added the RateHelper for swap! In
>>>
> fact
>
>>> if I delete the swaps everithing works and I can use the PieceWise Yield
>>> curve.
>>>
>>>
>>> Rgrds
>>>
>>> P
>>>
>>>
>>>
> -----------------------------------------------------------------------------------------------------
>
>>> Code Below
>>>
>>>
> ----------------------------------------------------------------------------
>
>>> // Deposit instruments <---
>>> deporates = instruments[nInst+i];
>>> boost::shared_ptr<Quote> depoquotes(new SimpleQuote(deporates));
>>> boost::shared_ptr<RateHelper> deporatehelper(new DepositRateHelper
>>> (Handle<Quote>(depoquotes),
>>> numtenor * tenor,
>>> fixingdays,
>>> cal,
>>> rollconvention,
>>> false,
>>> daycount));
>>> instrumentCollection.push_back(deporatehelper);
>>>
>>> // Future instruments <---
>>> futprices = instruments[nInst+i];
>>> boost::shared_ptr<Quote> futquotes(new SimpleQuote(futprices));
>>> Date expdate((int)instruments[4*nInst+i] + 1);
>>> Date iMMdates = IMM::nextDate(expdate);
>>> boost::shared_ptr<RateHelper> futratehelper(new FuturesRateHelper
>>>
> (Handle<Quote>
>
>>> (futquotes),
>>> iMMdates,
>>> futmonths,
>>> cal,
>>> rollconvention,
>>> false,
>>> daycount));
>>> instrumentCollection.push_back(futratehelper);
>>>
>>> // Swap instruments <---
>>> swrates = instruments[nInst+i];
>>> boost::shared_ptr<Quote> swquotes(new SimpleQuote(swrates));
>>> boost::shared_ptr<RateHelper> swratehelper(new SwapRateHelper
>>>
> (Handle<Quote>
>
>>> (swquotes),
>>> numtenor * Years,
>>> cal,
>>> swFixedLegFreq, // Annual
>>> rollconvention, // Unadjusted
>>> swFixedLegDc, // Thirty360(thirty360::
>>> European)
>>> swFloatingLegIndex)); // Euribor6M
>>> instrumentCollection.push_back(swratehelper);
>>>
>>> // Yield curve constructor
>>> double tolerance = 1.0e-15;
>>> boost::shared_ptr<YieldTermStructure> depoFutSwapTermStructure(new
>>> PiecewiseYieldCurve<Discount,LogLinear>(referencedate,
>>> instrumentCollection,
>>> daycount,
>>> tolerance));
>>> RelinkableHandle<YieldTermStructure> discountCurve;
>>>
>>>
>>>
> ------------------------------------------------------------------------------
>
>>> This SF.net email is sponsored by Sprint
>>> What will you do first with EVO, the first 4G phone?
>>> Visit sprint.com/first --
http://p.sf.net/sfu/sprint-com-first>>> _______________________________________________
>>> QuantLib-users mailing list
>>>
[hidden email]
>>>
https://lists.sourceforge.net/lists/listinfo/quantlib-users>>>
>>>
>>>
>>
>
>
>
>
of $1 Million in cash or HP Products. Visit us here for more details: