Hello all, If I want to compute a forward sensitivitiy of a swap, is it ok to just move the evaluation date with: Settings::instance().evaluationDate() = evaluationDate;
Or is that wrong? If the yield curves used to price the swap are built before I move the evaluation date, will it work? Thanks, Pierre ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
It depends on how you build the curves. If you passed them an explicit reference date, it won't work. If you passed them a number of business days and a calendar, they will adjust to the new evaluation date. More details at <http://implementingquantlib.blogspot.it/2013/09/chapter-3-part-1-of-n-term-structures.html>. Luigi On Thu, Mar 5, 2015 at 4:58 PM, Grison PG Pierre (External DEXIA-US) <[hidden email]> wrote:
------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Thanks for your quick answer. So let’s say I first define my curves with a number of business days and a calendar. Then I define and create a new instance of
a swap. Then I move the evaluation date (I don’t change the swap) and recalculate sensitivities. Should it work ? I think it works as long as the schedules defined in the swap don’t move, and that is what Ql does, doesn’t it? Pierre From: Luigi Ballabio [mailto:[hidden email]]
It depends on how you build the curves. If you passed them an explicit reference date, it won't work. If you passed them a number of business days and a calendar, they will adjust to the new evaluation date. More details at <http://implementingquantlib.blogspot.it/2013/09/chapter-3-part-1-of-n-term-structures.html>. Luigi On Thu, Mar 5, 2015 at 4:58 PM, Grison PG Pierre (External DEXIA-US) <[hidden email]> wrote: Hello all, If I want to compute a forward sensitivitiy of a swap, is it ok to just move the evaluation date with:
Settings::instance().evaluationDate() = evaluationDate;
Or is that wrong? If the yield curves used to price the swap are built before I move the evaluation date, will it work? Thanks, Pierre
--
------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Yes, it should recalculate the same swap as of the new evaluation date. Since I'm in self-promotion mode, a similar example with an equity option is at about halfway through <https://www.youtube.com/watch?v=__PBUqjCy6E>. Luigi On Thu, Mar 5, 2015 at 5:19 PM, Grison PG Pierre (External DEXIA-US) <[hidden email]> wrote:
------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Great! Thanks a lot Luigi.
Pierre From: Luigi Ballabio [mailto:[hidden email]]
Yes, it should recalculate the same swap as of the new evaluation date. Since I'm in self-promotion mode, a similar example with an equity option is at about halfway through <https://www.youtube.com/watch?v=__PBUqjCy6E>. Luigi On Thu, Mar 5, 2015 at 5:19 PM, Grison PG Pierre (External DEXIA-US) <[hidden email]> wrote: Thanks for your quick answer. So let’s say I first define my curves with a number of business days
and a calendar. Then I define and create a new instance of a swap. Then I move the evaluation date (I don’t change the swap) and recalculate sensitivities. Should it work ? I think it works as long as the schedules defined in the swap don’t move, and that
is what Ql does, doesn’t it? Pierre
From: Luigi Ballabio [mailto:[hidden email]]
It depends on how you build the curves. If you passed them an explicit reference date, it won't work. If you passed them a number of business days and a calendar, they will adjust
to the new evaluation date. More details at <http://implementingquantlib.blogspot.it/2013/09/chapter-3-part-1-of-n-term-structures.html>. Luigi On Thu, Mar 5, 2015 at 4:58 PM, Grison PG Pierre (External DEXIA-US) <[hidden email]> wrote: Hello all, If I want to compute a forward sensitivitiy of a swap, is it ok to just move the evaluation date with:
Settings::instance().evaluationDate() = evaluationDate;
Or is that wrong? If the yield curves used to price the swap are built before I move the evaluation date, will it work? Thanks, Pierre
--
--
------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by Grison PG Pierre (External DEXIA-US)
What do you expect for the rate curves at the forward date? On Mar 5, 2015 5:20 PM, "Grison PG Pierre (External DEXIA-US)" <[hidden email]> wrote:
------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |