Skip to content
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

RuntimeError: Boost assertion failed: px != 0 using Merton Jump Diffusion model #1467

Open
philippb90 opened this issue Aug 26, 2022 · 5 comments

Comments

@philippb90
Copy link

I'm using the python Quantlib implementation to run monte carlo simulations and implemented different processes (GeometricBrownianMotionProcess, HestonProcess, BlackProcess and Merton76Process). All processes use the same GaussianMultiPathGenerator and all processes I implemented so far work, except for the Merton76Process.

While the GaussianMultiPathGenerator can be initialized with the Merton76Process it fails when calling the next() method with the error message: RuntimeError: Boost assertion failed: px != 0. This seems to be an issue with boost::shared_ptr - C++ memory management.

For reproducing the error, the unit tests from this branch (https://github.com/interlay/collateralization-analysis/tree/feat/unit-tests) can be run using pytest unit_tests/test_simulation.py

Any idea how to solve this?

@boring-cyborg
Copy link

boring-cyborg bot commented Aug 26, 2022

Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it.

@github-actions
Copy link
Contributor

This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.

@github-actions github-actions bot added the stale label Oct 26, 2022
@lballabio lballabio removed the stale label Oct 26, 2022
@github-actions
Copy link
Contributor

This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.

@lballabio
Copy link
Owner

Apologies for the delay — there was a null pointer access that I'm fixing for next release, but that only masked the real issue; that is, that the Merton76Process class is missing the implementation of the machinery needed for path generation. In its current form, it shouldn't have inherited from StochasticProcess at all. It might actually make sense to replace it with a different class and deprecate the current one. Sorry.

@lballabio
Copy link
Owner

#1551 fixes the null pointer access; the other issue remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants