|
From: Peter C. <pca...@gm...> - 2013-05-15 19:03:27
|
For zero days between option and start date the results are identical up to 1E-14, for example the old engine resp. new engine gives 0.06257488979659526 0.06257488979659394 for a 5y into 5y atm swaption vs. Euribor 6m, 3% forward flat yts, 1% volatility and reversion, asof 30-04-2013. The differences in the test suite displayed below are much bigger because there a start delay of 2 business days applies. We could maybe produce cached values with the old engine for a test case with expiry = start date before moving to the new engine. Thanks for your comments. regards Peter Ferdinando Ametrano <na...@am...> writes: > I'm ok with your extension provided that the new values collapse back to the > old ones (with a reasonable tolerance) in the case of expiry date being equal > the value date. > Is the data you've posted related to this case? > > It's a while now I do not work for a vol desk, but I would never underestimate > the huge difference of analytic vs numerical methods when it comes to > calibration. > > This said I would also add that I'm always amazed how poor the production setup > is, even in very sophisticated banks. Old models stick around for very long > time, just because of the huge effort required to update them in production > systems. The multi-curve framework updates I've seen so far rival with Mary > Shelley's Frankenstein approach > > > On Sat, May 11, 2013 at 1:37 PM, Peter Caspers <pca...@gm...> wrote: > > 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 > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev |