Questions tagged [stochastic-calculus]

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

Filter by
Sorted by
Tagged with
-2
votes
1answer
82 views

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

How I can plot the following stochastic process using mathmatica
1
vote
0answers
44 views

Mean of ItoProcess

I've defined the following ItoProcess ...
2
votes
0answers
34 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 ...
1
vote
1answer
39 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: ...
0
votes
0answers
28 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 ...
1
vote
0answers
52 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. ...
1
vote
1answer
50 views

3D Plotting for the solution of stochastic differential equation

I have the following solution of the SDE: $$U(x,t)=-6+12 * \tanh \left[x+\left(B(t)-\frac{t^{2}}{2}\right)+\int_{0}^{t} e^{s^{2}} d s\right]^{2}$$ Where $B(t)$ is white noise. In the following code ...
4
votes
1answer
692 views

Use of Ito's lemma in ItoProcess

In the documentation for the ItoProcess it says: Converting an ItoProcess to standard form automatically makes use of Ito's ...
2
votes
2answers
94 views

Driving a stochastic spiral by a velocity Brownian motion

I want to obtain the position x[t], solution of dx/dt=v and v the Orstein-Ulhenbeck process and use this x[t] in the cartesian coordinate definition of a stochastic spiral x_1(t)=tcos(t+x(t)) , x_2(t)...
14
votes
1answer
168 views

Ito Process sourced by Gaussian Process?

Question Is it possible to extend the function ItoProcess so that it takes correlated noise? I.e would like to be able to write ...
0
votes
0answers
29 views

Explosion of solution with NDSolve

I'm trying to solve a delayed ODE involving white noise with the help of NDSolve. This provides a reasonable solution for times between 0 and 20000. After that the solution seems to explode. A curious ...
5
votes
1answer
81 views

ItoProcess for 3 coupled SDEs sourced by 5 Wiener processes

Context I am trying to solve a stochastic equation corresponding to Vector resonant relaxation (the way orbital planes of stars diffuse near the galactic center, see below). Setup Within the ...
3
votes
0answers
121 views

Kolmogorov backward PDE with boundary conditions

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

Find PDF of a stochastic process

I consider the following Ito process ...
0
votes
1answer
62 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
68 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
50 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
96 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
39 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
49 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
316 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
49 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
117 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
75 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
998 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
324 views
1
vote
1answer
61 views

Parametric Ito Process

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

Ito Process with Piecewise

I have the following ItoProcess : ...
1
vote
0answers
31 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 ...
25
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
293 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
217 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
64 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
157 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
38 views

Monitoring time step manually within RandomFunction

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

Puzzling behavior of ItoProcess with Abs

Hi I am simulating a Fisher-Wright diffusion, it works ...
3
votes
1answer
151 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
124 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
364 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
60 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
79 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
97 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
100 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
140 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 I ...
3
votes
1answer
85 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
415 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 ...