Quantitative Analysis.
Trading Platform.
Python for Excel.
Author.

Printable PDF file
I.Basic math.
II.Pricing and Hedging.
III.Explicit techniques.
IV.Data Analysis.
1.Time Series.
A.Time series forecasting.
B.Updating a linear forecast.
C.Kalman filter I.
D.Kalman filter II.
E.Simultaneous equations.
2.Classical statistics.
3.Bayesian statistics.
V.Implementation tools.
VI.Basic Math II.
VII.Implementation tools II.
Bibliography.
Forum Notation Index Contents

Time series forecasting.


e are considering a problem of forecasting of a random variable $y$ based on information contained by some vector $x\in R^{M}.$ The $x$ is treated as a sample of some random variable that we also denote as $x$.

Proposition

We evaluate the quality of the forecast $\hat{y}$ by calculating the quadratic deviation of the forecast:MATH Consequently, the optimal forecast is given by the conditional expectationMATH

Proof

The forecast is some function of $x$: MATH. Therefore, we require that the function of interest $f_{0}$ would satisfyMATH for any smooth function MATH and a small real number $\varepsilon$, where the functional $V$ is defined byMATH Thus, we haveMATH By properties of conditional expectation,MATHMATH The last equation holds for any smooth $u\left( x\right) $. Therefore, MATH as claimed.

If the information $x$ is sufficiently large then it makes sense to look for MATH among linear functions: MATH. Repeating the above argument, we haveMATH with linear $f_{0}$ and $u$.

We extend the above requirement to the case of a vector valued variable $y\in R^{N}$. We require that the function MATH , MATH, for some matrix $A$, would be such that for any linear MATH, the random quantities MATH and $u\left( x\right) $ are not correlated:MATH We see that the forecasting operation MATH is similar to a linear projection of $y$ on $x$. This motivates introduction of the operationMATH that takes two vector valued random variables and produces a deterministic matrix. We would like to treat this operation as a scalar product even though it does not have a full set of properties. We will construct a projection operation MATH with the defining propertiesMATHMATH We proceed to verify that the projection MATH may be defined by the straightforward adaptation of the formula from the elementary geometryMATH on a subclass of random variables with zero mean: $Ex=0,$ $Ey=0.$ Indeed,MATHMATH andMATHMATHMATHMATH

From the two properties, verified here, all the other well known properties of orthogonal projection follow. This allows using of geometric intuition in the computation that follows.

The operation $P(y|x)$ is well defined if the matrix math is not degenerate. This is certainly so if the random variable $x$ has zero mean because then math is the covariance matrix of $x$. However, if $x$ is deterministic then math is degenerate. Therefore, we represent a random variable $x$ as a sum MATH where $\bar{x}=Ex$ and $\tilde{x}=x-Ex$. Observe that for two vector valued random variables $x$ and $y$MATH Therefore, MATH for any $x,y$. Hence, we extend the definition of MATH to random variables with non-zero mean by orthogonality:MATHMATH Here we used the fact that the MATH must satisfy MATH with $\bar{x}\neq0$. The only way this can happen is if MATH

Summary

The linear forecast of $y$ based on information $x$ is given byMATH where $\bar{x}=Ex,$ MATH, MATH.

One can verify that this is a maximal likelihood forecast if $x$ and $y$ are jointly normal. To see this it is enough to use a jointly normal distribution function to compute a conditional distribution of $y|x$. In the section ( Kalman filter II) we will take such approach.





Forum Notation Index Contents


















Copyright 2007.