# Contents * the following line creates the automatic table of contents {:toc} ## Idea ## When we study a [[time series]], the central question is often this: Is there a pattern, a tendency, or is what we see purely coincidental? There are a multitude of statistical techniques to tackle this question, one of them is trying to fit a [[stochastic differential equation]] (SDE) to the given time series, this is what this page is about. ## Details ## If there is reason to assume that a process is described by a certain class of SDE with nontrivial diffusion, described by a finite set of parameters, we can try to perform a maximum likelihood estimation of the parameters to fit a given time series. This is possible, because according to the Girsanov theorem, in this case the probability laws of the processes that are solutions to the given [[SDE]] are continuous with respect to each other. Therefore every process has a probability density with respect to every other process, according to the Radon-Nikodym theorem. We can even calculate this density, see the examples section. * [Girsanov theorem](http://en.wikipedia.org/wiki/Girsanov), Wikipedia. * [Radon-Nikodym theorem](http://en.wikipedia.org/wiki/Radon-Nikodym), Wikipedia. ## Examples ## For a simple example we look at the family of one dimensional [[SDE]] parametrized by one real parameter $\alpha$: $$ dX_{t, \alpha} = \alpha \; f(X_t) dt + \; dW_t $$ The maximum likelihood estimate $\hat\alpha(T)$ for a process on the interval $[0, T]$ is the value that maximizes the likelihood ratio: $$ L(\alpha, T) = \exp{ (\frac{1}{2} \alpha^2 \int_0^T f^2(X_t) dt - \alpha \int_0^T f(X_t) dX_t) } $$ According to the Girsanov theorem, this is the Radon-Nikodym density of the solution $X_{t, \alpha}$ of the SDE with respect to the Wiener process. To find the maximum, we solve the equation $$ \frac{\partial L}{\partial \alpha} = 0 $$ and find $$ \hat \alpha(T) = \frac{ \int_0^T f(X_t) dX_t}{\int_0^T f^2(X_t) dt} $$ This estimator is a random variable depending on the sample path. It is possible to prove under mild conditions, that $\lim_{T \to \infty} \hat \alpha(T) = \alpha$ with probability one, that is: The estimator is unbiased. For a quick sanity check, we can set $f(X_t) = 1$ and rediscover linear regression: $$ \hat \alpha(T) = \frac{1}{T} \int_0^T dX_t $$ The formula of the estimator assumes that we know a sample path of the process in continuous time, the next question is therefore: What do we do when we have only a time series, that is a discrete finite set of values? To be continued... ## References ## * Stefano M. Iacus, _Simulation and inference for stochastic differential equations. With R examples_. ([ZMATH](http://www.zentralblatt-math.org/zmath/en/advanced/?q=an:pre05223075&format=complete)). * Jaya P. N. Bishwal: _Parameter estimation in stochastic differential equations._ (Lecture Notes in Mathematics 1923. Berlin: Springer, [ZMATH](http://www.zentralblatt-math.org/zbmath/search/?q=an%3A1134.62058)) category:statistical methods