Skip to content

Univariate and multivariate stochastic processes/Markov processes in continuous time

License

Notifications You must be signed in to change notification settings

getzdan/Bridge.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bridge.jl

Stochastic calculus and univariate and multivariate stochastic processes/Markov processes in continuous time. See ./example/tutorial.jl for an introduction. This package is going to replace my package https://github.com/mschauer/SDE.jl . I am personally interested in simulating diffusion bridges and doing bayesian inference on discretely observed diffusion processes, but this package is written to be of general use and contributions are welcome. It is also quite transparent how to add a new process:

# Define a diffusion process
immutable OrnsteinUhlenbeck  <: ContinuousTimeProcess{Float64}
    β::Float64 # drift parameter (also known as inverse relaxation time)
    σ::Float64 # diffusion parameter
    function OrnsteinUhlenbeck::Float64, σ::Float64)
        isnan(β) || β > 0. || error("Parameter λ must be positive.")
        isnan(σ) || σ > 0. || error("Parameter σ must be positive.")
        new(β, σ)
    end
end

# define drift and diffusion coefficient of OrnsteinUhlenbeck
import Bridge: b, σ, a, transitionprob
Bridge.b(t,x, P::OrnsteinUhlenbeck) = -P.β*x
Bridge.σ(t, x, P::OrnsteinUhlenbeck) = P.σ
Bridge.a(t, x, P::OrnsteinUhlenbeck) = P.σ^2

# simulate OrnsteinUhlenbeck using Euler scheme
W = sample(0:0.01:10, Wiener{Float64}()) 
X = euler(0.1, W, OrnsteinUhlenbeck(20., 1.))
  • Define and simulate diffusion processes in one or more dimension
  • Continuous and discrete likelihood using Girsanovs theorem and transition densities
  • Monte Carlo sample diffusion bridges, diffusion processes conditioned to hit a point v at a prescribed time T
  • Brownian motion in one and more dimensions
  • Ornstein-Uhlenbeck processes
  • Geometric Brownian motion
  • Fractional Brownian motion
  • Basic stochastic calculus functionality (Ito integral, quadratic variation)

The layout/api is written to be compatible with SimonDanisch's package [FixedSizeArrays.jl](https://github.com/SimonDanisch/FixedSizeArrays.jl

About

Univariate and multivariate stochastic processes/Markov processes in continuous time

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Julia 92.7%
  • R 7.3%