-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding an experimental analytic pricer for forward-start european options in Heston model #943
Adding an experimental analytic pricer for forward-start european options in Heston model #943
Conversation
…y (due to low number of paths)
I hadn't realised that even LD prices have some randomness if the seed is removed, which caused occasional failuers.
test-suite/forwardoption.cpp
Outdated
|
||
DayCounter dc = Actual360(); | ||
SavedSettings backup; | ||
Date today = Date::todaysDate(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole test suite sets a fixed evaluation date before starting, so I suggest using
Date today = Settings::instance().evaluationDate();
instead.
The idea is that having the evaluation date dependent on the actual today's date makes the tests prone to spurious errors, upon which we have to increase the tolerance to pass. Using a variable date might find some actual errors, but it's unlikely and we don't run the test suite every day anyway.
(Using the fixed date might also allow you to get the tolerance back to its original value in the previous test case.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This certainly seems sensible. The other tests in that test suite use the current day's date as well (I'd borrowed their convention) - shall I make the change across the suite while I'm doing it?
I've moved to the fixed date throughout the test file. All pass. I tightened the tolerance again, needed to add some more paths as MC error s still quite large (also changed to PSR because these provide an MC error estimate which I used to track it while developing) |
…ions in Heston model
This is an implementation of S. Kruse's paper "On the Pricing of Forward Starting
Options under Stochastic Volatility", which gives an analytical form for forward start options in the Heston model.
There are still several improvements possible (implementation of the characteristic function calculator, integration choices, some numerical stability issues at distant parameters, probably more...), but as a first step I thought it made sense to add this to the experimental section of the repo.
I've tested the prices against the MC procedure and the analytic procedure where possible and they seem reliable (eg. see image below).
(the coloured lines are prices coming from this pricer, the lilac points at resetTime=0 are vanilla prices coming from
AnalyticHestonEngine
, and the brown dots are MC prices coming fromMCForwardEuropeanHestonEngine
)