ANN: Bridge - A statistical toolbox for diffusion processes

Build Status

Bridge - Inital release v0.4.1

This is the inital (pre-)release of Bridge.jl, a statistical toolbox for diffusion processes written in julia.

The package allows for simulation of univariate and multivariate stochastic processes in continuous time, and also from conditional diffusion processes (similar to Brownian bridges.)

Several examples illustrate how the functions in this package can be used in Bayesian inference for drift and diffusion coefficients using the Metropolis-Hastings algorithm, see F. v. d. Meulen, M. Schauer: Bayesian estimation of discretely observed multi-dimensional diffusion processes using guided proposals. Electronic Journal of Statistics 11 (1), 2017, 10.1214/17-EJS1290.


Stochastic calculus and univariate and multivariate stochastic processes/Markov processes in continuous time. 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. See the tutorial to get an idea about the usage.

It is also quite transparent how to add a new process:

# Define a diffusion process
struct 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(β, σ)

# 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
  • Bessel processes
  • Gamma processes
  • Basic stochastic calculus functionality (Ito integral, quadratic variation)
  • Euler-Scheme and implicit methods (Rungekutta)

The layout/api was originally written to be compatible with Simon Danisch’s package FixedSizeArrays.jl. It was refactored to be compatible with StaticArrays.jl by Dan Getz.

The example programs in the example/ directory have additional dependencies: ConjugatePriors and a plotting library.



PS: Bridge - Release v0.5.0

I just released a new version which now has a rudimentary documentation at Home · Bridge.jl and fixed a performance regression.