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

Add Gaussian quadrature to some of the examples with monte-carlo expectations #287

Open
jlperla opened this issue Jan 5, 2024 · 0 comments

Comments

@jlperla
Copy link
Member

jlperla commented Jan 5, 2024

Probably stick with gaussian quadrature, maybe in the growth model and only with normal distributions? Just go nodes, weights = gausshermite(n)

Can also show the adaptation for a normal that isn't

function gaussian_nodes_weights(mu, sigma, n)
    gh = gausshermite(n)
    nodes = gh[1] .* (sqrt(2) * (sigma)) .+ mu
    weights = gh[2] ./ sqrt(pi)
    return nodes, weights
end

or something like that.

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

1 participant