Login  Register

LogLinear interpolation

Posted by Andre Louw-2 on Jun 26, 2002; 5:34am
URL: http://quantlib.414.s1.nabble.com/LogLinear-interpolation-tp10120.html

Nando,

I just checked out loglinearinterpolation and noted the change you
implemented. I have a comment.

Correct me if i'm wrong, but I see you are using linear interpolation on
cont. compounded rates to get to the resulting discount factor i.o.w:

        cf1 = ln(df1), cf2 = ln(df2)
        dfx = exp(cf1+((tx-t1)/(t2-t1))*(cf2-cf1)))

I implemented loglinear interpolation to get to the result i.o.w:

        dfx = (df1^(tx/t1*(t2-tx)/(t2-t1)))*(df2^(tx/t2*(tx-t1)/(t2-t1)))

Not quite the same thing.

If that is your institution's standard, fine, but could I then rename your
implementation as contcomplinearinterpolation.hpp (or some such name), as I
see the original implementation being log-linear interpolation? We could the
implement a mechanism in DiscountCurve to distinguish which to use?

I had a problem with the original implementation between t1 = 0 and some tx
which I solved by testing for this condition and calculating dfx:
        dfx = 1/1+((1/df2-1)/t2)*tx

Comments?

Andre


 
-------------------------------------------------------------------------
This e-mail is intended only for the use of the individual or entity named
above and may contain information that is confidential and privileged,
proprietary to the company and protected by law. If you are not the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this e-mail is strictly prohibited. Opinions, conclusions and
other information in this message that do not relate to the official
business of our company shall be understood as neither given nor endorsed by
it.