Milstein Method
   HOME

TheInfoList



OR:

In
mathematics Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, the Milstein method is a technique for the approximate
numerical solution Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of numerical methods t ...
of a
stochastic differential equation A stochastic differential equation (SDE) is a differential equation in which one or more of the terms is a stochastic process, resulting in a solution which is also a stochastic process. SDEs have many applications throughout pure mathematics an ...
. It is named after
Grigori Milstein Grigori N. Milstein (; 6 June 1937 – 22 November 2023) was a Russian mathematician who made many important contributions to Stochastic Numerics, Estimation, Control, Stability theory, Financial Mathematics. Biography G.N. Milstein rec ...
who first published it in 1974.


Description

Consider the
autonomous In developmental psychology and moral, political, and bioethical philosophy, autonomy is the capacity to make an informed, uncoerced decision. Autonomous organizations or institutions are independent or self-governing. Autonomy can also be defi ...
Itō stochastic differential equation: \mathrm X_t = a(X_t) \, \mathrm t + b(X_t) \, \mathrm W_t with
initial condition In mathematics and particularly in dynamic systems, an initial condition, in some contexts called a seed value, is a value of an evolving variable at some point in time designated as the initial time (typically denoted ''t'' = 0). Fo ...
X_ = x_, where W_ denotes the
Wiener process In mathematics, the Wiener process (or Brownian motion, due to its historical connection with Brownian motion, the physical process of the same name) is a real-valued continuous-time stochastic process discovered by Norbert Wiener. It is one o ...
, and suppose that we wish to solve this SDE on some interval of time  ,T/math>. Then the Milstein approximation to the true solution X is the
Markov chain In probability theory and statistics, a Markov chain or Markov process is a stochastic process describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event. Informally ...
Y defined as follows: * Partition the interval ,T/math> into N equal subintervals of width \Delta t>0: 0 = \tau_0 < \tau_1 < \dots < \tau_N = T\text\tau_n:=n\Delta t\text\Delta t = \frac * Set Y_0 = x_0; * Recursively define Y_n for 1 \leq n \leq N by: Y_ = Y_n + a(Y_n) \Delta t + b(Y_n) \Delta W_n + \frac b(Y_n) b'(Y_n) \left( (\Delta W_n)^2 - \Delta t \right) where b' denotes the
derivative In mathematics, the derivative is a fundamental tool that quantifies the sensitivity to change of a function's output with respect to its input. The derivative of a function of a single variable at a chosen input value, when it exists, is t ...
of b(x) with respect to x and: \Delta W_n = W_ - W_ are
independent and identically distributed Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in Pennsylvania, United States * Independentes (English: Independents), a Portuguese artist ...
normal random variables with
expected value In probability theory, the expected value (also called expectation, expectancy, expectation operator, mathematical expectation, mean, expectation value, or first Moment (mathematics), moment) is a generalization of the weighted average. Informa ...
zero and
variance In probability theory and statistics, variance is the expected value of the squared deviation from the mean of a random variable. The standard deviation (SD) is obtained as the square root of the variance. Variance is a measure of dispersion ...
\Delta t. Then Y_n will approximate X_ for 0 \leq n \leq N, and increasing N will yield a better approximation. Note that when b'(Y_n) = 0 (i.e. the diffusion term does not depend on X_) this method is equivalent to the
Euler–Maruyama method In Itô calculus, the Euler–Maruyama method (also simply called the Euler method) is a method for the approximate numerical analysis, numerical solution of a stochastic differential equation (SDE). It is an extension of the Euler method for ord ...
. The Milstein scheme has both weak and strong order of convergence \Delta t which is superior to the
Euler–Maruyama method In Itô calculus, the Euler–Maruyama method (also simply called the Euler method) is a method for the approximate numerical analysis, numerical solution of a stochastic differential equation (SDE). It is an extension of the Euler method for ord ...
, which in turn has the same weak order of convergence \Delta t but inferior strong order of convergence \sqrt.


Intuitive derivation

For this derivation, we will only look at
geometric Brownian motion A geometric Brownian motion (GBM) (also known as exponential Brownian motion) is a continuous-time stochastic process in which the logarithm of the randomly varying quantity follows a Brownian motion (also called a Wiener process) with drift. It ...
(GBM), the stochastic differential equation of which is given by: \mathrm X_t = \mu X \mathrm t + \sigma X d W_t with real constants \mu and \sigma. Using Itō's lemma we get: \mathrm\ln X_t= \left(\mu - \frac \sigma^2\right)\mathrmt+\sigma\mathrmW_t Thus, the solution to the GBM SDE is: \begin X_&=X_t\exp\left\ \\ &\approx X_t\left(1+\mu\Delta t-\frac \sigma^2\Delta t+\sigma\Delta W_t+\frac\sigma^2(\Delta W_t)^2\right) \\ &= X_t + a(X_t)\Delta t+b(X_t)\Delta W_t+\fracb(X_t)b'(X_t)((\Delta W_t)^2-\Delta t) \end where a(x) = \mu x, ~b(x) = \sigma x The numerical solution is presented in the graphic for three different trajectories.Umberto Picchini, SDE Toolbox: simulation and estimation of stochastic differential equations with Matlab. http://sdetoolbox.sourceforge.net/


Computer implementation

The following
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (prog ...
code implements the Milstein method and uses it to solve the SDE describing geometric Brownian motion defined by \begin dY_t= \mu Y \, t + \sigma Y \, W_t \\ Y_0=Y_\text \end # -*- coding: utf-8 -*- # Milstein Method import numpy as np import matplotlib.pyplot as plt class Model: """Stochastic model constants.""" mu = 3 sigma = 1 def dW(dt): """Random sample normal distribution.""" return np.random.normal(loc=0.0, scale=np.sqrt(dt)) def run_simulation(): """ Return the result of one full simulation.""" # One second and thousand grid points T_INIT = 0 T_END = 1 N = 1000 # Compute 1000 grid points DT = float(T_END - T_INIT) / N TS = np.arange(T_INIT, T_END + DT, DT) Y_INIT = 1 # Vectors to fill ys = np.zeros(N + 1) ys = Y_INIT for i in range(1, TS.size): t = (i - 1) * DT y = ys - 1 dw = dW(DT) # Sum up terms as in the Milstein method ys = y + \ Model.mu * y * DT + \ Model.sigma * y * dw + \ (Model.sigma**2 / 2) * y * (dw**2 - DT) return TS, ys def plot_simulations(num_sims: int): """Plot several simulations in one image.""" for _ in range(num_sims): plt.plot(*run_simulation()) plt.xlabel("time (s)") plt.ylabel("y") plt.grid() plt.show() if __name__

"__main__": NUM_SIMS = 2 plot_simulations(NUM_SIMS)


See also

*
Euler–Maruyama method In Itô calculus, the Euler–Maruyama method (also simply called the Euler method) is a method for the approximate numerical analysis, numerical solution of a stochastic differential equation (SDE). It is an extension of the Euler method for ord ...


References


Further reading

* {{cite book , author=Kloeden, P.E., & Platen, E. , title=Numerical Solution of Stochastic Differential Equations , publisher=Springer, Berlin , year=1999 , isbn=3-540-54062-8 Numerical differential equations Stochastic differential equations