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
0 answers
38 views

Is there documentation for "FeynmanKacFormula" under "ItoProcess"? [closed]

Under the command ItoProcess there are "Properties related to ItoProcess" and one is "FeynmanKacFormula". Where can I find documentation on this?...
complex's user avatar
  • 141
2 votes
1 answer
84 views

Difficulties in solving a system of differential equations with a matrix differential equation

I'm trying to solve a system of differential equations that looks like this: ...
Gabriel Rodrigues's user avatar
2 votes
1 answer
142 views

Applying NDSolveValue on a differential equation

I am trying to solve stochastic Schrodinger equation (Schrodinger equation in the presence of Ornstein Uhlenbeck Process) $$i\frac{d}{dt}\begin{pmatrix}c_1(t)\\ c_2(t)\end{pmatrix}=H(t)\begin{pmatrix}...
Radmehr's user avatar
  • 51
1 vote
1 answer
76 views

Product of two Ito processes

I am in the process of learning to use Mathematica for doing stochastic calculus. I can do Ito's lemma by symbolic manipulation, substitutions, expansions and simplifications. However, I feel like ...
Baba Yara Fahiz's user avatar
0 votes
0 answers
46 views

Identifying the parameter that flips the solution

I have solved a system of ODEs numerically. As the plot shows, the solution SolJx is positive for the parameters I have chosen. However, if you decrease (more ...
NC520's user avatar
  • 407
0 votes
1 answer
48 views

Evaluating an integral of geometric Brownian motion

I am a Mathematica novice. For an operations research application, I am trying to work with the following wealth process in Mathematica, $$ d W_t = (\rho W_t + P_t) dt\ , $$ where $P_t$ is a stream ...
Anthony's user avatar
  • 155
2 votes
1 answer
78 views

How do I simulate an ItoProcess that is not supposed to become negative?

I have a process that is similar to a Cox Ingersoll Ross process. Like a CIR process this process does not become negative. However, when I define the process with ItoProcess and I simulate it with ...
kef's user avatar
  • 21
1 vote
0 answers
34 views

How can I use RandomFunction to solve an SDE in reverse time?

I am working with a problem of the Ito-stochastic differential form given by $$\mathrm{d}x=g(x,t)\,\mathrm{d}t+f(x,t)\,\mathrm{d}W,$$ where $W$ is a Wiener process. I furthermore have to satisfy the ...
JAC's user avatar
  • 21
1 vote
1 answer
84 views

Doing algebra with differential operators

I'm doing some work on stochastic processes, where I use random functions which are defined by their properties over averages, i.e $$\langle f(t) \rangle =0 \\ \langle f(t) f(t')\rangle = \alpha(x,y) ...
J Pin's user avatar
  • 11
0 votes
0 answers
98 views

Numerically solving a SDE with Markovian switching?

Consider the reference paper: https://www.sciencedirect.com/science/article/abs/pii/S0005109821004039 How would one go about numerically solving this system? I tried for the one regime case: ...
Math's user avatar
  • 455
0 votes
1 answer
146 views

Extension of: Numerically solving a system of SDE's with Levy noise?

A great answer by Alex is to be found here for my original question: Numerically solving a system of SDE's with Levy noise? Now Let us perturb this system with time delays so the system is: \begin{...
Math's user avatar
  • 455
0 votes
0 answers
54 views

Code not getting solved by NMaximize as 1/0 is encountred

I have the following code. This code requires to solve the model with two variables to optimize the function. a1 and a2 are the variables as shown in the code ...
P Initiate's user avatar
1 vote
1 answer
64 views

Why are there problems solving this SDE system?

Following this solution by Alex: Numerically solving a system of SDE's with Levy noise?, I tried Alex's solution for a different model: ...
Math's user avatar
  • 455
7 votes
1 answer
434 views

Numerically solving a system of SDE's with Levy noise?

Consider this system from the following paper titled: The long-time behaviour of a stochastic SIR epidemic model with distributed delay and multidimensional L´evy jumps https://arxiv.org/pdf/2003....
Math's user avatar
  • 455
12 votes
1 answer
487 views

Solving Stochastic Gross-Pitaevskii equation

I am trying to solve the Stochastic Gross-Pitaevskii equation from this paper https://arxiv.org/pdf/1409.0146.pdf. But I have no idea how to solve adding a noise term. I like to see the wave function ...
Argha Debnath's user avatar
0 votes
0 answers
21 views

How does MarkovProcessProperties[] calculate the “LimitTransitionMatrix” of a stochastic matrix?

How does Mathematica the function MarkovProcessProperties[] calculate the “LimitTransitionMatrix” of a stochastic matrix using Cesaro limit of a transition matrix? What is it fundamentally doing to ...
More Senne's user avatar
3 votes
1 answer
265 views

Stochastic process: Understanding Ornstein Uhlenbeck Process

Recently, I have been trying to simulate a random/stochastic variable that follows Gaussian distribution and also has an exponential correlation function $\left\langle X(t)X(s)\right\rangle= e^{-\frac{...
sined's user avatar
  • 573
2 votes
0 answers
75 views

Solving stochastic equation

I am trying to solve, numerically, a classic stochastic Liouville's equation, namely \begin{equation} \frac{dA(t)}{dt} = -B(t)A(t)+ {\cal C}(t) \end{equation} with $B(t)=\cos(\omega t)$, and ...
sined's user avatar
  • 573
0 votes
0 answers
134 views

Solving cubic-quintic stochastic differential equation (Duffing equation)

How do I solve the following cubic-quintic stochastic differential equation (Duffing equation)? $$ \ddot{x} + \epsilon\gamma\delta \dot{x}-ax+bx^3+cx^5=\epsilon\gamma\delta \cos(\omega t) +\eta[t] $$ ...
zeraoulia rafik's user avatar
1 vote
0 answers
45 views

How do you output second derivatives or output the Wiener Process used in ItoProcess?

I have a system of stochastic differential equations and I use ItoProcess to solve them. The following is a snippet in which this is done. ...
JAC's user avatar
  • 21
2 votes
0 answers
103 views

How to reproduce the Lotka-Volterra predator-prey dynamics results? [closed]

In Section 2 of this answer, the stochastic Lotka-Volterra predator-prey dynamics is demonstrated. I have difficulties to reproduce these results. At the end of the mentioned answer, a code is ...
David's user avatar
  • 51
0 votes
1 answer
126 views

Simulating/solving a Langevin equation with overdamped dynamics and plotting a phase space plot

I've been reading about the Langevin equation, specifically the case where we are dealing with overdamped dynamics. I'd like to simulate the dynamics discussed in the second link and effectively ...
user27119's user avatar
  • 2,480
1 vote
0 answers
209 views

How To Fit Heston Model To Stock Data Stochastic Volatility Model

The stochastic volatility model known as the Heston model can be expressed in Mathematica in the following way https://reference.wolfram.com/language/example/HestonModel.html Define the Ito process of ...
Daniel Berkowitz's user avatar
0 votes
1 answer
110 views

WienerProcess - estimate the expected value after `n` steps

Is there a way to adjust the estimated value of the WienerProcess after n steps? Eg. could we evaluate the value of ...
matzar's user avatar
  • 101
1 vote
1 answer
63 views

Wrong means given by `RandomFunction` for `StratonovichProcess`

Hello I was trying to compute mean of multiple Stratonovich integral (for $W$ standard Wiener process). $$ J_{(1,1)} = \int_0^1 \left(\int_0^s 1\,\circ \mathrm{d}W_t\right) \circ \mathrm{d}W_s $$ ...
Radost's user avatar
  • 211
0 votes
1 answer
139 views

Interacting Brownian particles via harmonic repulsive potential

Following this paper (DOI: 10.1103/PhysRevResearch.1.032038) I want to simulate thermally driven particles in a viscous fluid that interact via the harmonic repulsive potential in 2D, namely $V(r_{ij}...
cmoecke's user avatar
  • 21
0 votes
0 answers
75 views

I need to calculate the optimal value of a function involving integration

I am working on a capacity sharing problem which involves the function as the picture below. I want to calculate the derivative of the function with respect to the variable $a_1.$ The profit function ...
Prabhu's user avatar
  • 1
2 votes
2 answers
168 views

How to find the supremum of a brownian motion?

I imagine this is quite simple but unable to find it, if I simulate a standard brownian motion, $(B_t)_{t \geq 0}$, with ...
user82832's user avatar
0 votes
1 answer
190 views

Ito process with white noise

I would like to solve following system of SDEs, dx_i[t] = f[x_i[t]]*dt + dw_i[t] where d denotes ...
Artem Alexandrov's user avatar
0 votes
0 answers
95 views

System of stochastic differential equations

Is it possible to solve numerically system of coupled non-linear differential equations with noise? The system looks like ...
Artem Alexandrov's user avatar
2 votes
0 answers
139 views

Kloeden–Platen–Schurz algorithm for SDE

RandomFunction's Method setting includes "Kloeden–Platen–Schurz" as a possibility. ...
Radost's user avatar
  • 211
1 vote
0 answers
287 views

Fokker-Planck equation [closed]

Is there any package for simulation of Fokker-Planck equation in Mathematica? Or, in general for stochastic differential equations?
user avatar
1 vote
1 answer
198 views

Correlated random field generation

I need to generate two correlated gaussian random fields. As far as I know, this question and this other provides the means to generate a single autocorrelated process. However, I am clueless about ...
slow_learner's user avatar
1 vote
0 answers
63 views

Stochastic noise with known propability density function

How can I generate samples for random function, which functional "probability density" is known? When I say "probability density" for random function $\xi(\mathbf{q},t)$, I mean, ...
Alex Goldstein's user avatar
0 votes
0 answers
21 views

How to simulate a non-White Gaussian process? [duplicate]

I am trying to numerically solve a second order stochastic differential equation. Usually the noise is assumed to be Wiener Process which is white as far as I know. Is it possible to use a Random ...
eeqesri's user avatar
  • 111
1 vote
1 answer
431 views

How add noise to a differential equation?

I have a differential equation: $$\frac{dx}{dt}=\operatorname{sech}(x-1)$$ I want to add noise to it and try to solve it numerically, but it seems that I am programming something wrong, because there ...
dtn's user avatar
  • 2,344
2 votes
1 answer
291 views

How can I calculate the Allan Variance of a list of Data?

I have a list with over 10.000 elements of data. Now I wanna calculate the Allan Variance of this Measurement. The Allan Variance is defined as following: $$\sigma_y^2(\tau)=\frac1{2\tau^2}\langle(x_{...
Luxamba's user avatar
  • 45
1 vote
1 answer
146 views

Mean of an Ito Process

I would like to compute the mean of s[t] which is given by the first equation in these coupled stochastic ordinary differential equation ...
el Kettani Perla's user avatar
1 vote
0 answers
184 views

Coupled stochastic differential equation [closed]

I am trying to solve the following coupled system of stochastic differential equations: $\qquad \dot{x}(t)=y(t)\,\eta(t)$ $\qquad \dot{y}(t)=x(t)\,\eta(t)$ $x$ and $y$ are functions to be solved for ...
eeqesri's user avatar
  • 111
8 votes
1 answer
331 views

Can built-in functions deal with stochastic delay differential equations (SDDE)?

I know that functions like NDSolve can deal with delay differential equations and in the meanwhile, functions like ItoProcess ...
Αλέξανδρος Ζεγγ's user avatar
2 votes
1 answer
123 views

ItoProcess with matrix of equations

What is the cleanest/simplest way to use ItoProcess to solve the equation $$i \text{d}\boldsymbol{\psi} = H\cdot\boldsymbol{\psi} \text{d}t + \boldsymbol{\psi}^2\...
Tom's user avatar
  • 3,366
4 votes
1 answer
130 views

WhenEvent in Stochastic Differential Equation

Is there a way to add events with WhenEvent or similar when using ItoProcess? Minimal example of my problem would be to change ...
Radost's user avatar
  • 211
2 votes
1 answer
190 views

Why is ItoProcess failing here? (Stochastic Differential Equation) [closed]

Why is this code returning errors and failing to run? If I replace Abs[x[t]]^2 with just x[t] it works perfectly. ...
Tom's user avatar
  • 3,366
0 votes
1 answer
248 views

Random number in system of equations, solving using NDSolve & WhenEvent

I need to analyse the effect of random forcing on the system of coupled equations. For example, I have shown the equations below. $$\begin{pmatrix} x1''\\x2''\\x3''\\x4''\\x5'' \end{pmatrix} + M_{(5 \...
Hari's user avatar
  • 125
-2 votes
1 answer
335 views

How can I can plot a stochastic process? [closed]

How I can plot the following stochastic process using mathmatica
mathmatican's user avatar
1 vote
0 answers
80 views

Mean of ItoProcess

I've defined the following ItoProcess ...
mvc's user avatar
  • 159
2 votes
0 answers
60 views

TransformedProcess: a few questions about it

I have a couple of technical questions that, after searching the internet for hours, I have not been able to find an answer to. Mathematica's online instructions are not even addressing the issue at ...
Maurice's user avatar
  • 133
1 vote
1 answer
288 views

Simulating a bivariate Ito process

I would like to simulate a bivariate process where the two components, say $X_1(t) $ and $ X_2(t), $ which are related by the following stochastic differential equations: ...
Maurice's user avatar
  • 133
0 votes
0 answers
127 views

Correlated random variables

Assume we have a random variable $X(t)$ that changes as a function of time satisfying a correlation $\left\langle X(0) X(\tau) \right\rangle=e^{-\tau/\tau_c}$. Is Mathematica able to generate random ...
sined's user avatar
  • 573
1 vote
0 answers
92 views

Having trouble moving program from python to Mathematica

I'm trying to move a Covid-19 model programmed in python to Mathematica and I can't figure out how to translate this segment of the code to Mathematica. ...
Gianfranco L's user avatar