Posted by
Peter Caspers-4 on
May 11, 2013; 11:37am
URL: http://quantlib.414.s1.nabble.com/Jamshidian-engine-with-start-delay-tp14252.html
Hello,
in the JamshidianSwaptionEngine the option expiry date and the value
date of the underlying swap are handled a bit simplified assuming
both dates equal (see the warning in the code). Though the impact is
usually not very big we might want to improve this detail in the
library ? See below for a possible approach. Thank you Sebastian for
our discussions on the topic.
Aside I would be interested whether the Jamshidian method is still
in use for model calibration in the world of multi curve enhanced
models (where by enhanced I mean something simple like a static
spread correction) because I believe the generalization of the
method to this setting is not straightforward. Also I feel that
numerical integration does nearly a just as efficient and accurate
job and it directly allows for multiple curve computations. Or do
you ignore multi curve in the calibration phase and only adjust the
curves for the actual pricing ?
Back to Jamshidian and the start delay. Some theoretical background
and numerical examples can be found here
http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2246054
A possible implementation goes as follows. First we need to provide
an extended zerobond option method, which we can add to AffineModel
in model.hpp
https://github.com/pcaspers/quantlib/commit/e16b4ea5ffbfe33bd6acd0ee6cb3ecd8a43f72a4
The default implementation uses the same simplification as mentioned
above ignoring the bond start delay. To improve the pricing in the
JamshidianEngine we have to overwrite this method in the model
implementations for which we want it. For the Hull White model I did
it here
https://github.com/pcaspers/quantlib/commit/e8b5912cac2e236fe59a885e8cd1e2ed9243cc47
Finally we have to modify the Jamshidian engine a bit
https://github.com/pcaspers/quantlib/commit/019f37a498846d9a6e89a897300f126c01d6ef86
(maybe we should keep some warning in the code because you are not
forced to support the start delay in your model implementations)
Not suprisingly the test suite breaks when comparing computation
results to cached values computed with the simplified engine, so the
cached values should be updated (given that we believe in the new
engine)
1> Testing Hull-White calibration against cached values...
1> shortratemodels.cpp(126): error in
"QuantLib::detail::quantlib_test_case(&ShortRateModelTest::testCachedHullWhite)":
Failed to reproduce cached calibration results:
1> calculated: a = 0.0464041, sigma = 0.00579912, f(a) = 0.1158,
1> expected: a = 0.0488565, sigma = 0.00593662, f(a) =
0.121599,
1> difference: a = -0.00245242, sigma = -0.000137495, f(a) =
-0.00579896,
1> end criteria = StationaryFunctionValue
regards
Peter
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today!
http://p.sf.net/sfu/neotech_d2d_may_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev