Skip to main content

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
1 answer
342 views

Gillespie (stochastic simulation) algorithm

I want to apply the Gillespie algorithm to a set of reactions. First, I run the source code presented here, and then run my model: ...
A novice's user avatar
  • 167
2 votes
1 answer
80 views

Log scale of y-axis is still very small [closed]

I am trying to use LogPlot of Mathematica to rewrite only y-axis (not x-axis) of the plot as log scale. But the y-axis is still very small. By the following code <...
Mehdi's user avatar
  • 31
1 vote
0 answers
55 views

How can I set up and simulate an Ornstein–Uhlenbeck process that depends on the proportional deviations from the steady state?

I'm trying to set up a stochastic differential equation and run numerical simulations for the following process: $$\frac{dV_t}{V_t}=\left[M+\gamma\left(M-\left(\frac{V_t}{V_{t-1}}-1\right)\right)\...
Mark Chambers's user avatar
0 votes
0 answers
36 views

Why does the ItoProcess command give me the error, "is not a random process recognized by the system"?

I have a 5-dimensional diffusion process I want to simulate $\omega,\theta,y,v,z)$. It somewhat degenerate in that all terms don't involve Brownian motion, but that shouldn't be a problem in the ...
complex's user avatar
  • 141
1 vote
0 answers
52 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
97 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
203 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
123 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
47 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
  • 479
0 votes
1 answer
75 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
  • 231
2 votes
1 answer
100 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
41 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
156 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
104 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
  • 407
0 votes
1 answer
150 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
  • 407
0 votes
0 answers
55 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
67 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
  • 407
7 votes
1 answer
501 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
  • 407
12 votes
1 answer
602 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
3 votes
1 answer
325 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
  • 583
2 votes
0 answers
104 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
  • 583
0 votes
0 answers
165 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
50 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
125 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
198 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,520
1 vote
0 answers
287 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
118 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
70 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
177 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
79 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
192 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
234 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
109 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
181 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
313 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
276 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
65 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
2 votes
1 answer
605 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,404
2 votes
1 answer
432 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
171 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
264 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
382 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
132 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,416
4 votes
1 answer
160 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
200 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,416
0 votes
1 answer
278 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
440 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
89 views

Mean of ItoProcess

I've defined the following ItoProcess ...
mvc's user avatar
  • 159
2 votes
0 answers
62 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