HOME

TheInfoList



OR:

In
mathematics Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
, 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 th ...
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 are used to model various phenomena such as stock pr ...
. It is named after Grigori N. Milstein who first published it in 1974.


Description

Consider the
autonomous In developmental psychology and moral, political, and bioethical philosophy, autonomy, from , ''autonomos'', from αὐτο- ''auto-'' "self" and νόμος ''nomos'', "law", hence when combined understood to mean "one who gives oneself one's ow ...
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). For ...
X_ = x_, where W_ stands for the
Wiener process In mathematics, the Wiener process is a real-valued continuous-time stochastic process named in honor of American mathematician Norbert Wiener for his investigations on the mathematical properties of the one-dimensional Brownian motion. It is 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 A Markov chain or Markov process is a stochastic model describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event. Informally, this may be thought of as, "What happe ...
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 of a function of a real variable measures the sensitivity to change of the function value (output value) with respect to a change in its argument (input value). Derivatives are a fundamental tool of calculus. F ...
of b(x) with respect to x and: \Delta W_n = W_ - W_ are
independent and identically distributed In probability theory and statistics, a collection of random variables is independent and identically distributed if each random variable has the same probability distribution as the others and all are mutually independent. This property is usua ...
normal random variables with
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a l ...
zero and
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers ...
\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 called the Euler method) is a method for the approximate numerical solution of a stochastic differential equation (SDE). It is an extension of the Euler method for ordinary differential equations ...
. 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 called the Euler method) is a method for the approximate numerical solution of a stochastic differential equation (SDE). It is an extension of the Euler method for ordinary differential equations ...
, 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 See numerical solution is presented above 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 (pro ...
code implements the Milstein method and uses it to solve the SDE describing the 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 num_sims = 1 # One Example # One Second and thousand grid points t_init, t_end = 0, 1 N = 1000 # Compute 1000 grid points dt = float(t_end - t_init) / N ## Initial Conditions y_init = 1 μ, σ = 3, 1 # dw Random process def dW(Δt): """Random sample normal distribution""" return np.random.normal(loc=0.0, scale=np.sqrt(Δt)) # vectors to fill ts = np.arange(t_init, t_end + dt, dt) ys = np.zeros(N + 1) ys = y_init # Loop for _ in range(num_sims): for i in range(1, ts.size): t = (i - 1) * dt y = ys - 1 # Milstein method dw_ = dW(dt) ys = y + μ * dt * y + σ * y * dw_ + 0.5 * σ**2 * y * (dw_**2 - dt) plt.plot(ts, ys) # Plot plt.xlabel("time (s)") plt.grid() h = plt.ylabel("y") h.set_rotation(0) plt.show()


See also

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


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