Login  Register

Re: Shocking the Zero Curve

Posted by Luigi Ballabio on Sep 08, 2010; 1:39pm
URL: http://quantlib.414.s1.nabble.com/Shocking-the-Zero-Curve-tp9655p9656.html

On Mon, 2010-08-23 at 13:00 -0400, Robert Philipp wrote:
> The PiecewiseZeroSpreadedTermStructure class does not shock correctly
> when the compounding is different from continuous.

Yes, the curve assumed that the spread was applied to the continuous
rates. Thanks for the generalization; it will make it into next release.

> I believe that the way forward rates are shocked is incorrect. In the
> code, the spread (shock) is simply added to the forward curve of the
> base. The forward curve should be based on the shocked zero curve
> instead. Has anyone fixed that? If not, I'll try to fix that as well.

You're talking of the ForwardSpreadedTermStructure class now, right? I'm
not sure what the behavior should be in this case. The name of the class
seems to imply that we want to add a spread to the forwards, though.

> Not sure how best to contribute the code. Is there a staging area for
> checking in the code?

Posting here is ok.  Next time, you might consider providing a patch
instead of the modified file (i.e., the output of running the diff
program between the original file and your file.)  But it's no big deal.

Just one question on your code: you added a declaration for
  Rate forwardImpl(Time) const;
to the header, but no definition afterwards. Is there a method body you
didn't post, or should I just remove the declaration?

Thanks,
        Luigi

P.S. Make that two questions: to whom should I assign the copyright of
the modified code? (Robert Philipp, Synapsefe, both?)



--

Green's Law of Debate:
Anything is possible if you don't know what you're talking about.



------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev