Re: YieldCurve from discount factors

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/YieldCurve-from-discount-factors-tp7795p7797.html

On Mon, 2009-11-16 at 14:04 -0800, javit wrote:
> Build two vectors of types Rate and Date. Call them dates and rates. Find the
> rate for that particular date by using your discount curve data. Define a
> day counter (termStructureDayCounter) and a calendar. Initiate an instant of
> the termstructure class as below.
>
> Handle<YieldTermStructure>
> refTermStructure(boost::shared_ptr<YieldTermStructure>(
> new InterpolatedZeroCurve<LogLinear>(dates, rates,
> termStructureDayCounter)));

Or use InterpolatedDiscountCurve.

Luigi


--

Ogden's Law:
The sooner you fall behind, the more time you have to catch up.



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users