# Questions tagged [stochastic-calculus]

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

122 questions
Filter by
Sorted by
Tagged with
2k 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 ...
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 ...
7k 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 ...
2k views

### Plotting the solution of a vector stochastic differential equation

I have a vector stochastic differential equation, $$\mathrm dq = p\,\mathrm dt\qquad q(0)=0$$ $$\mathrm dp = (-q -p)\mathrm dt+\mathrm dW\qquad p(0)=10$$ This can be entered to give me the process ...
809 views

### Fast Simulations with Compile

this post relates to another post that I didn't follow up propely. If I wanted to simulate a system of stochastic proesses like the following, and loop over this run many many times would writing the ...
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 ...
211 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 ...
317 views

### Regime Change Stochastic Process

I would like to simulate an Ito process in which the drift and diffusion terms change after hitting a boundary for the first time. For example, a Geometric Brownian Motion X which has 0 drift and ...
854 views

### Efficient GeometricBrownianMotionProcess Monte Carlo simulation

Following the answers in this post, I'm trying to implement something similar. If the GBM stays inside the corridor [L, U] between predefined times it should return ...
1k views

286 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 ...
112 views

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

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

...
161 views

### Kolmogorov backward PDE with boundary conditions

I am trying to solve numerically Kolmogorov backward PDE with boundary conditions: ...
I have a stochastic coupled Schrödinger equation to solve. $$i\frac{\mathrm d X_k(t)}{\mathrm dt}=-\left(x_{k+1}(t)+x_{k-1}(t)\right)+V_k x_k(t)+\eta_k t x_k(t)$$ where $\left\langle\eta_k(t)\eta_j(... 0answers 305 views ### Solve ItoProcess SDE I specified a SDE for a random process$y(t)$using ItoProcess is there a mathematica function that provides the analytic solution for$y(t)$? I know ... 0answers 285 views ### Malliavin Derivative with Mathematica is it possible? Is it possible to define a Malliavin calculus with Mathematica 9? Consider a random variables on the Wiener-space$\Omega=\mathcal{C}([0,1])$of the form $$F=F(\omega)=\displaystyle\int_{0}^{T}h_{t}... 2answers 229 views ### Stochastic problem I have to organize a small sports league and I am puzzled on how to create the game plan. We are 8 persons playing table soccer with 2 vs. 2 matches. The idea is that each person plays once with ... 1answer 189 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 ... 1answer 164 views ### Stochastic process, Corelation function, Numerical solution, real data I am new in Mathematica and stochastic process too. I would like to compute (auto)correlation function from real data. So I decide try/test Mathematica script on ... 1answer 219 views ### Expectation of GeometricBrownianMotionProcess I am trying to compute$$\mathbb E\left[\max\left(\frac{S_{1/2}+S_1}{2}-K,0\right)\right]$$where K=100 and S_t is a geometric brownian motion (with S_0=100, drift r=0.05 and volatility \... 1answer 89 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_{... 1answer 482 views ### ItoProcess for coupled SDEs I am trying to create an ItoProcess from the following system of SDEs:$\begin{bmatrix} \mathrm d x\\\mathrm d y\end{bmatrix} = \begin{bmatrix} 0 & 1\\ 0 & \theta\end{bmatrix} \begin{bmatrix} ...
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\...