Skip to content

Commit

Permalink
Update runtests.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieugomez committed Mar 31, 2020
1 parent a748340 commit fd6c753
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using InfinitesimalGenerators, Test, Statistics, LinearAlgebra, Expokit
xbar = 0.0
κ = 0.1
σ = 0.02
X = InfinitesimalGenerators.OrnsteinUhlenbeck(; xbar = xbar, κ = κ, σ = σ, length = 1000)
X = OrnsteinUhlenbeck(; xbar = xbar, κ = κ, σ = σ, length = 1000)


## Feynman-Kac
Expand Down Expand Up @@ -81,7 +81,7 @@ l, η, r = cgf(m; eigenvector = :both)(ζ)


# Test that the modified process μ + σ^2 ∂ ln(r) has a stationary distribution given by $r^2ψ$
X = InfinitesimalGenerators.OrnsteinUhlenbeck(;κ =κ, σ = σ, length = 1000)
X = OrnsteinUhlenbeck(;κ =κ, σ = σ, length = 1000)
m = AdditiveFunctionalDiffusion(X, μm .+ X.x .- 0.02, σm .* ones(length(X.x)))
ψ = stationary_distribution(X)
ζ = tail_index(m)
Expand All @@ -101,7 +101,7 @@ l, η, r = cgf(m; eigenvector = :both)(ζ)
# Test CIR
gbar = 0.03
σ = 0.01
X = InfinitesimalGenerators.CoxIngersollRoss(xbar = gbar, κ = κ, σ = σ)
X = CoxIngersollRoss(xbar = gbar, κ = κ, σ = σ)
m = AdditiveFunctionalDiffusion(X, X.x, zeros(length(X.x)))
η_analytic = gbar * κ^2 / σ^2 * (1 - sqrt(1 - 2 * σ^2 / κ^2))
@test cgf(m)(1.0)[2] η_analytic rtol = 1e-2
Expand Down

2 comments on commit fd6c753

@matthieugomez
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/11877

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.3 -m "<description of version>" fd6c75322504529825ab075b0300e6d323a258a7
git push origin v0.3.3

Please sign in to comment.