Questions tagged [stochastic-calculus]

Questions about stochastic calculus in Mathematica, for example how to use ItoProcess and RandomFunction.

Filter by
Sorted by
Tagged with
1
vote
0answers
30 views

Simulating Stochastic Matrix Differential Equation with Arbitrary Autocorrelation Function

I want to numerically simulate a matrix differential equation that includes a stochastic (vector) Gaussian noise $\mathbf{n}$, where the different vector components are independent, and each component ...
1
vote
2answers
58 views

Cannot solve coupled stochastic differential equations and how to find correlation of solutions?

I am trying to solve the equations $x'[t] = y[t]$, $y'[t]+(w^2+4*\gamma^2)x[t]+\gamma*y[t])=B[t]$ with the initial conditions $x[0]=0,y[0]=v_0$ This is what I have tried. ...
1
vote
1answer
67 views

Quality of parametric 3D plot on 2D plane

I need to plot the solution of an SDE which takes its values on the plane $\{z = 1\} \subseteq \mathbb R^3$. Here is the code of a minimal working example (the solution to the SDE is just the driving ...
10
votes
1answer
895 views

ItoProcess for stochastic reaction-diffusion equation

I am trying to simulate a stochastic differential equation in time and space, but I'm unsure if this can be done in Mathematica. The sde that I would like to study is: $$ dN[x,t]=N[x,t](1-N[x,t])dt+\...
4
votes
2answers
266 views
1
vote
1answer
43 views

Parametric Ito Process

Is it possible to make a parametric ItoProcess ? I'd like to write that equation : ...
1
vote
1answer
34 views

Ito Process with Piecewise

I have the following ItoProcess : ...
1
vote
0answers
21 views

Discrete variables in ParametricNDSolve [closed]

I'm trying to write a stochastic differential equation, using ParametricNDSolve and WhenEvents : ...
22
votes
3answers
2k views

Efficient way to simulate thousands of Markov chains

I am currently trying to simulate relaxation of a protein population while maintaining the stochastic properties of the system. For this, I used a Markov chain to describe the temporal evolution of ...
24
votes
2answers
1k views

How to implement Markov Chain Monte Carlo with built-in functions?

These days I'm trying to conduct a model sensitivity test which is heavily based on the Markov Chain Monte Carlo simulation approach. And I find this 'MCMC' package that can perform Markov Chain ...
0
votes
1answer
156 views

How can I remove a stochastic trend from a time series

I am having some troubles with removing a stochastic trend from a time series. I am carrying out a study on the US debt to GDP ratio. I noted that there's a smooth stochastic trend in the series. ...
3
votes
1answer
116 views

Defining stochastic differential equations and simulating a system of three SDEs

I am trying to work on stochastic differential equations and I have been trying to use Mathematica's built-in function to simulate the system of equations below. When i use the randomfunction to ...
1
vote
2answers
49 views

Passing the same random values for two stochastic processes

I have two Ito processes as shown below. I can define them separately, and simulate and plot them separately. The thing is, I do not want to apply RandomFunction to proc1 and proc2 separately. Because ...
2
votes
1answer
112 views

Stochastic ODE Integration problems using RandomFunction

I'm attempting to add noise to a set of ODE's with two state variables. $$\frac{dx}{dt} = 10 -(x-1)\left(1+\frac{exp\left(\frac{x-1}{5y}\right)}{50y}\right)$$ $$\frac{dy}{dt} = 2(1-y) -y\cdot exp\left(...
2
votes
0answers
34 views

Monitoring time step manually within RandomFunction

Consider the following stochastic differential equation ...
0
votes
0answers
19 views

Puzzling behavior of ItoProcess with Abs

Hi I am simulating a Fisher-Wright diffusion, it works ...
3
votes
1answer
122 views

Solving a stochastic dynamical system

I'm attempting to add gaussian white noise into a single equation of a 2 state variable dynamical system $$\frac{dx(t)}{dt}=1-x(t)\left(1+e^{-y(t)}\right)$$ $$\frac{dy(t)}{dt}=1-y(t)\left(1+e^{\frac{x(...
1
vote
1answer
99 views

Stability of the numerical methods for SDE

I've been figuring out with the methods for integrating of stochastic differential equations in Mathematica. I've considered the one-dimensional system: $$dx=-x dt+\sigma x dw$$ with some initial ...
3
votes
1answer
319 views

Ito Process paths over a Plot3D

I was wondering if its possible to draw the simulated paths of an Ito diffusion over the probability density function. Ito Process: ...
1
vote
0answers
49 views

How to apply TransformedProcess to a user defined ItoProcess?

Hi I would like to manipulate user defined Ito processes, say multiply my process by a deterministic function . Thanks in advance ...
1
vote
2answers
69 views

Ignoring overflows in SDE simulations

I'm trying to compute the average of the solution to an SDE by simulating some of its sample paths and then taking their Mean. The problem is my SDE is explosive ...
1
vote
1answer
87 views

Help to extend this evaluation!

I'm performing a stochastic evaluation, where i'm interested in the assymptotic behavior of the solutions, but my computer can't stand very large times. So I thought that I could evaluate a certain ...
1
vote
1answer
83 views

Build a histogram from stochastic data

I have the following code yielding my stochastic "paths": ...
15
votes
2answers
6k views

Solving a stochastic differential equation

How do I solve the following simple stochastic differential equation: $$ m x''[t] + \Gamma x'[t] + k x[t] = \sqrt[]{(2 k_{b} T/\Gamma)} \eta[t] $$ here $\eta[t]$ is Brownian motion, i.e. Wiener ...
2
votes
1answer
124 views

Simulation of the stochastic system

I have the stochastic system which consists of 4 nonlinear equations. White Gaussian noise is used in the third equation only. Nevertheless, the whole system is stochastic. Some problems arise when ...
3
votes
1answer
61 views

How to plot more paths to this SDE simulation? [duplicate]

I have the following code that simulates an Ito process in Mathematica, ...
6
votes
1answer
1k views

ItoProcess function

While looking in the help manual of Mathematica concerning the ItoProcess function I found the following: ItoProcess[{a,b,c},x,t]: represents an Ito Process y(t)=c(t,x(t)), where dx(t)=a(t,x(t))dt+b(...
5
votes
1answer
394 views

How to use some other driving process than the WienerProcess?

According to the following reference page http://reference.wolfram.com/language/ref/ItoProcess.html The driving process dproc can be any process that can be converted to a standard Ito process ...
2
votes
1answer
98 views

Stochastic Mathieu equation: Is this a numerical instability?

So I am a beginner with stochastic differential equations and came across Mathematica's capabilities for solving them. I am solving the stochastic Mathieu equation with a harmonic forcing term that ...
1
vote
1answer
110 views

Solve a System of mixed SDE and ODE

I have a system of differential equation to solve, but it's a mixed system of ODE and SDE. I'm not sure whether there is any way to solve this kind of system or not. My equations are: ...
0
votes
0answers
126 views
1
vote
0answers
55 views

How to simulate two coupled birth-death-immigration processes?

I am simulating a birth-death-immigration process for two coupled populations that interact by virtue of the birth-rate in one population being equal to the death-rate in the other population. The two ...
0
votes
0answers
152 views

Solving a differential equation with a stochastic force term with NDSolve [duplicate]

I am asking how NDSolve can be used to solve the following differential equation, What is the correct code to solve the following differential equation ...
2
votes
1answer
125 views

How to reformulate differential equation problem as OrnsteinUhlenbeckProcess

I have the following differential equation m*x''[t] + k*x'[t] - randomForce[t] == 0 which describes an oscillating particle with mass ...
1
vote
1answer
396 views

NDSolve for 2d Langevin equation

I want to simulate the movement of a damped single particle which vibrates due to Brownian motion. $m \ddot{x} + \gamma \dot{x} - \xi(t)=0$ where $\gamma$ is the friction constant and $\xi(t)$ a "...
4
votes
1answer
234 views

Parallelization of the stochastic Euler scheme

I wrote a simulation to approximate the law of a stochastic differential equation via a Monte Carlo method using the stochastic Euler scheme. Then I thought, it would be a good idea to speed up ...
1
vote
0answers
101 views

An Ito process with intermediate constraints

I have a controlled stochastic process described by $\dot{x} = X(x) + u(t) + \eta_x(t),$ where $u$ is the control, $\eta_x$ is a white noise with zero mean. The equation is called Langevin equation. ...
3
votes
4answers
746 views

Hypergeometric function with a matrix argument

I am looking for the evaluation of a Hypergeometric function with a matrix argument as for example in Koev and Edelman or as showcased in this Wikipedia article. From what I understand from ...
1
vote
1answer
134 views

ItoProcess and/or RandomFunction numerical failure for coupled SDEs

I'm trying to simulate a physical system including noise using the ItoProcess command, the system is governed by two coupled differential equations. The potential ...
1
vote
0answers
62 views

Dealing with Vector Outputs from ItoProcess, RandomProcess (Stochastic Differential Equations)

I'm modeling stochastic chemical kinetics and the ItoProcess[] function has served me well. I am trying to write an efficient code to analyze many (Paths) trajectories of several different reagents (...
2
votes
2answers
340 views

Stochastic Lotka-Volterra Predator-Prey Model

I am struggling with writing a stochastic version of Lotka-Volterra predator-prey model. This is as far as I have gotten: ...
0
votes
0answers
132 views

How to generate a fractional Brownian motion?

In Mathematica 9.0 I run the following piece of code: ...
1
vote
1answer
189 views

Continuous noise representation

I am new to stochastic processes (and actually Mathematica too) and there are many things that I still didn't fully understand yet so please forgive me if I say something wrong. What I am trying to ...
0
votes
0answers
168 views

Estimate parameters of two correlated geometric Brownian motions

I would like estimate the parameters of the following set of Geometric Brownian Motions: $d P(t) = \mu_P P(t) d t + \sigma_P P(t) d Z_P(t)$ $d X(t) = \mu_X X(t) d t + \sigma_X X(t) d Z_X(t)$ ...
2
votes
1answer
368 views

How to solve a stochastic differential equation? [closed]

This is a stochastic differential equation, $$ dx(t) = -x(t)dt + e^{(-t)} dw(t)$$ I am not able to determine the next steps to solve this equation.
1
vote
2answers
99 views

How can I add new columns to a Table after each evaluation?

I'm interested in simulating chemical reactions with perturbations. I can simulate a given reaction using NDSolve ("rxn"} with a given added noise component ("noise1"). Due to the noise, each ...
1
vote
0answers
84 views

ItoProcess with log

I would like to use ItoProcess to simulate some paths of $r(t)$, a process that follows the sde $$d\ln\left(r\left(t\right)\right)=\left(\theta-\ln\left(r(t)\right)\...
14
votes
2answers
2k views

Mathematica code for hidden Markov models (HMM)

I am looking for some simple Mathematica code to model an HMM with just a few states and an equal number of observable signals (emissions). I am hoping to generate sample paths and keep track of the ...
3
votes
1answer
904 views

Plot A Function Of A Stochastic Process

I am trying to do something very simple in Mathematica 9. I want to play around with option pricing and for that I thought it best to use the new stochastic process functionality. So, first of all I ...
4
votes
1answer
381 views

Defining stochastic differential equation & simulating a system of three SDEs

I am no expert on SDE but I've been messing around with MMA's built in functions and it makes it quite easy to do some simple simulations. I bumped into this system of equations (below) in a paper and ...