-
Notifications
You must be signed in to change notification settings - Fork 2.1k
added Andersen-Piterbarg engine for the Heston model #251
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
Conversation
characteristic function
Conflicts: ql/pricingengines/vanilla/coshestonengine.cpp test-suite/hestonmodel.cpp test-suite/hestonmodel.hpp
function with control variate for the piecewise constant time dependent Heston model
| Real andersenPiterbargEpsilon = 1e-8); | ||
|
|
||
|
|
||
| // normalized characteristic function |
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.
Maybe this can be in the private section?
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.
Same goes for chF and lnChF in the other engine.
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.
Actually we have tests "against" these functions. IMO we should have the characteristic function of the Heston model and of the piecewise constant Heston model available somewhere. Another place would be the class HestonModel and the class PiecewiseTimeDependentHestonModel but we usuall don't perform complex math in the model classes therefore I've put it into the engine. Now while you bring it up I think we should add a lnChF method to the AnalyticHestonEngine as well for "symmetry" reasons. What do you think?
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.
Ok, let's leave them here.
| suite->add(QUANTLIB_TEST_CASE(&HestonModelTest::testCosHestonCumulants)); | ||
| suite->add(QUANTLIB_TEST_CASE(&HestonModelTest::testCosHestonEngine)); | ||
| suite->add(QUANTLIB_TEST_CASE(&HestonModelTest::testCharacteristicFct)); | ||
| suite->add(QUANTLIB_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.
These can go in the "faster" section, right?
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.
Sorry, I haven't fully understood your proposal. Isn't "faster" the default? Or do you want to move them to the fast/slow section.
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.
I wasn't clear. They are already in the faster section. My question was: they're fast enough for it, right?
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 seven new tests are taking less than a second. I'd leave them in the "faster" section. Do you have a criteria to decide where to put new tests, e.g. everything below 1 second goes to faster?
|
I didn't set a limit per test. I looked at the report of your parallel test runner and I cut tests starting from the longest until the whole suite took 3 or 4 minutes. (I don't remember the cuts for fast and faster.) Unless tests are obviously slow, I would add them until we see that the suite gets slower, at which point I'd reconsider. |
No description provided.