I might be able to help next week. I've prepared such an example for one of my students´ thesis, slightly modifying one of the standalone example that I will contribute back on git
Unfortunately I won't be able to help before next week as I am on holiday with the family
Using a SimpleQuote as a parameter of RateHelper is definitely supported. I've done that and it works for me.
If I am not mistaken, qlBucketAnalysis wants as its first argument the SimpleQuote to be perturbed, and as second argument an instrument whose NPV depends on that. For example it may be a VanillaSwap priced on a DiscountingSwapEngine based on your yield curve. I don't think you can pass the yield curve itself as the second argument, if that's what you tried to do.
The yield curve "knows" it has been perturbed because qlBucketAnalysis actually changes the value of the SimpleQuote, and then restores the original value when it's over. Indeed, if you are running your spreadsheet on a multicore computer (which you most likely are unless your PC is several years old), Excel may evaluate multiple cells at once and since the change to the SimpleQuote is NOT local to qlBucketAnalysis, it may alter the result of other function calls running in parallel with it.
At the moment I haven't a simple example that I can post, but if you need it, I may try to build one.
Gerardo Ballabio
Risk Management
Banca Profilo S.p.A.
Via Cerva 28 - 20122 Milano
Tel. <a href="tel:%2B39%2002%2058408.463" value="+390258408463">+39 02 58408.463
www.bancaprofilo.it
-----Messaggio originale-----
Da: Carl [mailto:[hidden email]]
Inviato: martedì 22 aprile 2014 14.13
A: [hidden email]
Oggetto: Re: [Quantlib-users] qlBucketAnalysis always returns 0 for delta and gamma
I have the same issue with qlbucketanalysis().
I have built a yield curve using rateHelpers and qlPiecewiseYieldCurve().
How do I create a link between the simpleQuote objects that are shifted in
qlbucketanalysis() and my yield curve object? In other words, how does the yield curve know it has been perturbed by qlbucketanalysis()? Right now I get 0 delta, just like Hyung-Seok. Intuitively I think I should construct each rateHelper using a simplequote as a parameter, but that is not supported. I have tried using triggers to force a link between the rateHelpers and simpleQuotes, but that does not work either. Can someone give some direction or post an example?
Thank You,
Carl Schmidt
--
View this message in context: http://quantlib.10058.n7.nabble.com/qlBucketAnalysis-always-returns-0-for-delta-and-gamma-tp14382p15178.html
Sent from the quantlib-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform _______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body>
<div style="font-family:Calibri;font-size:10px">
Banca Profilo S.p.A.
Via Cerva, 28 - 20122 Milano - Tel. 02 58408.1, Fax 02 5831 6057
Capitale Sociale Euro 136.794.106,00 i.v.
Iscrizione al Registro Imprese di Milano, C.F. e P.IVA 09108700155 - [hidden email]
Iscritta all’Albo delle Banche e dei Gruppi bancari
Aderente al Fondo Interbancario di Tutela dei depositi
Aderente al Conciliatore Bancario Finanziario e all’Arbitro Bancario Finanziario
Appartenente al Gruppo bancario Banca Profilo e soggetta all’attività di direzione e coordinamento di Arepo BP S.p.A.
DISCLAIMER:
The information transmitted may contain confidential and/or privileged material.
Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient is prohibited.
If you received this in error, please contact the sender and delete the material from any computer.
</div>
</body>
</html>
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
| Free forum by Nabble | Edit this page |