Modifying OrnsteinUhlenbeckBridge in DifferentialEquations.jl

Suppose X(t) is an Ornstein-Uhlenbeck (OU) process, and Y(t; t_0, T, u, v) is the respective OU bridge process such that Y(t_0) = u, Y(T) = v, and 0 \lt t \lt T.

I’ve had great use of simulating Y(t) using DiffEqNoiseProcess.OrnsteinUhlenbeckBridge(), kudos to those responsible. But now I need to simulate integrals of \int_{t_0}^T e^{\kappa (t - t_0)} Y(t)dt, and was wondering if it is feasible to create a new bridge with the additional exponential smoothing term?

Brief background: the integrals are the result of the solution to the following system:
\begin{align} dX(t) & = - \theta X(t) dt + \sigma_x dW_x(t)\end{align}\\ dZ(t) = \kappa (\mu - Z(t))dt + \xi_1 X(t) dt + \xi_2 X^2(t) dt + \sigma_z dW_z(t).

Edit: Maybe this is as simple as post-multiplying the simulated paths of Y(t) by e^{\kappa (t - t_0)}, and changing the starting and terminal values, but I am not certain that would be valid.

Just put that into the SDE solver?

Sure, but how can I tell the solver that I want to condition X(t) on a start- and end-value, so it is represented as a OU bridge, Y(t), as well as simulate the dynamics of the joint-process [Y(t), Z(t)]^\prime. I’ve looked through the docs and I’m not sure it’s supported, but I’m wondering if maybe there is a clever way.

My end-goal is to test my closed-form solution to the mean of Z(t), conditional on the OU bridge.

It’s just appending a few more SDEs onto those? I’m not entirely sure what the question is.

Wait, you want to condition based on properties of the noise? If you want to do that then you may need to use forward backward filtering, MitosisStochasticDiffEq.jl might have the right tool for this

Thanks, I’m indeed interested in using their BFFG algorithm later in my work.

I was able to take advantage of the fact that an OU bridge have the following general-linear SDE representation from Barczy & Kern (2013)

.
and solve the problem by defining a custom drift function.

Then general idea I wanted to accomplish however was

w_noise = WienerProcess(...)
oub_noise= DiffEqNoiseProcess.OrnsteinUhlenbeckBridge(...)
W = [w_noise, oub_noise]
prob = SDEProblem(drift!, diffusion!, u0, (0.0, Δt), noise = W)

where the drift function would output a vector for a diagonal noise process.

Seems like it may be possible by defining a custom NoiseProcess but I came across the reference while trying to understand the custom constructor.

Apologies for the lack of clarity in my previous posts.