Questions tagged [stochastic-calculus]

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

Filter by
Sorted by
Tagged with
3
votes
0answers
99 views

Kolmogorov backward PDE with boundary conditions

I am trying to solve numerically Kolmogorov backward PDE with boundary conditions: ...
1
vote
1answer
94 views

Find PDF of a stochastic process

I consider the following Ito process ...
0
votes
1answer
61 views

Problem with iterations of Prepend/While

I am doing some work with black-scholes and am trying to find random interest rates based on some given information. This is my original code: ...
6
votes
2answers
1k views

Boundary condition for stochastic differential equation

I have a simple stochastic differential equation (SDE) with white noise: ...
1
vote
1answer
64 views

Expectation and direct integration give different results [closed]

I have an integral I want to compute: $\qquad \int_{\mathbb R^4} e^{-(x_1+x_2+x_3+x_4)} \left( 1-x_1-x_3 \right) dx$ To me, this should be equivalent (modulo some scaling factor) to computing the ...
0
votes
0answers
40 views

Solving SDE system in Ito form

Can mathematica solve a linear SDE system in Ito form, for example $$ \begin{equation} \begin{bmatrix} dx_1 \\ dx_2 \\ dx_3 \\ dx_4 \end{bmatrix} = \begin{bmatrix} x_1 & ix_2 &...
0
votes
1answer
91 views

Simulating a poker win rate over time

Poker players start with a fixed bankroll (bankroll) and play with a win-rate winRate (say measured in dollars per hour) and ...
1
vote
0answers
36 views

Is it possible to speed up SDE simulation?

Is it possible to speed up SDE simulation in Mathematica? I am simulating a large number of Heston processes that look like the following (note this code is only a slight modification of the ...
0
votes
0answers
47 views

How to solve forward Kolmogorov birth-death equations for unspecified number of populations

I'm attempting to use a forward Kolmogorov differential equation to model a birth-death process. This is fairly trivial when there's only one population, but I'm working with an unspecified and time-...
8
votes
1answer
307 views

Optimization of the following code

Consider the function $$ h:[-1,1]\times I_{\sigma}\to I_{\sigma} $$ $$ (\omega, x)\mapsto \sqrt[3]{x + \sigma \omega} $$ where $ \sigma > \frac{2}{3\sqrt{3}}, I_{\sigma} = [x_-(\sigma), x_+(\sigma)]...
1
vote
0answers
40 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
83 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
69 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
959 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
292 views
1
vote
1answer
48 views

Parametric Ito Process

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

Ito Process with Piecewise

I have the following ItoProcess : ...
1
vote
0answers
24 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
209 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
161 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
55 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
127 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
36 views

Monitoring time step manually within RandomFunction

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

Puzzling behavior of ItoProcess with Abs

Hi I am simulating a Fisher-Wright diffusion, it works ...
3
votes
1answer
139 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
109 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
339 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
51 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
74 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
91 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
94 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
135 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
69 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
401 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
110 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
138 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
158 views
1
vote
0answers
69 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
187 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
145 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
496 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
239 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
106 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
784 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
165 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
83 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 (...