Skip to content

GSR Process Kernel Crash in Python #2408

@apapanico

Description

@apapanico

This came up on the mailing list last year but no one filed a ticket.

Setup:

import QuantLib as ql

print(ql.__version__)

YRs, nSTEP = 2, 4

gsSeqRNG = ql.GaussianRandomSequenceGenerator(
    ql.UniformRandomSequenceGenerator(nSTEP, ql.UniformRandomGenerator(0))
)

# expire  sigma   reversion

rPROC = ql.GsrProcess([1] * 1, [0.005] * 2, [0.03])

gsPathGN = ql.GaussianPathGenerator(rPROC, YRs, nSTEP, gsSeqRNG, False)
1.40

And then executing this causes a kernel crash

path = gsPathGN.next().value()

Interestingly, at least in a jupyter notebook, you can access the data before saving the variable.

print(gsPathGN.next().value()[0])
print(gsPathGN.next().value()[1])

yields

0.0
nan

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions