


























Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!



























Purpose of Time Series Analysis in finance. Evaluation of empirical features of variables referring to financial instruments and (repeatedly) observed at a given time frequency (day, week, month... ). Build appropriate statistical models capable of replicating the empirical features of observed (financial) time series Use (time series) techniques to answer questions that emerge in a financial framework. Note that some data features are a consequence of uncertainty, or of the fact that some quantities of interest are not observable (volatility), or are due to heterogeneity in agents’ (investors’) behaviour. We will first deal with the analysis of Prices and Returns and then proceed with the analysis of Volatility. We will tackle the empirical analysis of Prices and Returns starting from a clear financial question: can we predict prices? A positive answer means... we can make money by implementing appropriate trading strategies! This theme is closely connected with a classical topic ex- tensively discussed in the financial literature: the Efficient Market Hypothesis (EMH). We start from the definition of Prices and of their features. Prices represent the value of financial instruments as recorded from trading in financial markets (prices of equities, prices of bonds, prices of derivatives) The value of other quantities has empirical features comparable to those of prices of financial instruments: prices of commodities (oil, gold... ), exchange rates (EUR/USD, EUR/JPY... ), value of mutual funds, equity/bond market indexes. Let’s begin from the first and most relevant tool for time series analy- sis... the plot of a series! Focus on equity prices and equity returns, as well as on non-equity prices and other values behaving as equity prices.
Which features characterize the time series of prices? We need to go back to financial theory... The evolution of prices (of financial instruments) is related to the so-called Efficient Market Hypothesis stating that prices reflect the available information or, equivalently, that it is not possible to predict prices. From a quantitative viewpoint, this corresponds to
E[Pt+h|It] = Pt where Pt is the price at time t and It is the Information set at time t. The previous expectation states that the best prediction of a future price given the available information is nothing more than the current price. Equiva- lent to say: nothing included in the information set can help to predict prices, or, prices already reflect all the information included in It There exist different definitions of market efficiency, and these are related to the information contained in It Strong efficiency: prices reflect all the public and private information
where μ is also called drift (and the model is more properly called random walk with drift), and it holds that rt = μ + εt, that is, μ is interpreted as the average return and εt is a shock (a random variable indexed by time, that is, a stochastic process) with zero mean The characterization of the model requires we define the feature of the term εt for which we have different possibilities A first case (Case 1) is given by εt being a sequence of independently and identically distributed shocks with zero mean and variance σ^2 ε Such a definition is, however, not coherent with the features of returns (as we will see) and is thus not much considered. Case 2: εt is a sequence of identically distributed shocks This is less restrictive that the first case as we remove independence, making the model coherent, for instance, with heteroskedasticity, that is, the variance of εt could change over time (a typical feature of financial returns data) Case 3: εt is a sequence of serially uncorrelated shocks, that is, E[εtεt−k] = 0 for k > 0 This further case is less restrictive and it allows for dependence in higher order moments of the series εt (including the variance) To verify if the random walk with drift is an appropriate model for the log- prices we need a properly defined test, the Augmented Dickey-Fuller test, or ADF test. The ADF test was not proposed in a finance framework but is a general test for detecting a feature of a given time series, that is, that of being characterized by a unit root or of being non-stationary (in covariance) Definition - stationarity in covariance: a stochastic process xt is sta- tionary in covariance if its mean, E[xt], its variance V[xt], and auto-covariance C(xt, xt−k) do not depend on time (the autocovariance might depend on k but cannot depend on time) For the random walk with drift, in the simple case with μ = 0, and with εt being i.i.d with zero mean and variance σ^2 , we have
pt = pt− 1 + εt = pt− 2 + εt + εt− 1 =
X^ t
i=
εi
E[pt] =
X^ t
i=
E[εi] = 0
V[pt] =
X^ t
i=
V[εi] = tσ^2
If a variable xt follows a t random walk is thus non-stationary; the random walk is a non-stationary stochastic process An alternative model, which we will discuss later in greater details, and which is stationary, is the Auto Regressive process of order 1, or AR(1), defined
as
pt = μ + ϕpt− 1 + εt with the coefficient ϕ < 1; note that if ϕ = 1 we obtain the random walk model The ADF test verifies that, in a general setting, the coefficient ϕ is equal to 1, by resorting to an auxiliary linear regression The alternative hypothesis is that ϕ < 1 corresponding to ρ < 0, the test is one-sided (reject for large negative values of the test statistic). The ADF test considers the following linear regression
pt − pt− 1 = ∆pt = μ + βt + ρpt− 1 +
X^ q
j=
δj ∆pt−j + εt
The regression includes several elements i) the dependent variable is the first difference of log-prices, that is, the log-return ii) explanatory variables include deterministic components: the intercept and a linear trend (not relevant for financial data) iii) explanatory variables include lagged price changes iv) explanatory variables include lagged level of prices The last element is the one of interest to us, in particular the coefficient ρ. Consider the following simplified case and the subsequent equalities
pt = ϕpt− 1 + εt pt − pt− 1 = ϕpt− 1 − pt− 1 + εt ∆pt = ρpt− 1 + εt
Therefore, non-stationarity, ϕ = 1, is associated with ρ = 0 We proceed by estimating the coefficients of the linear regression... but things are not so simple! In fact, the distribution of the estimators of the parameters in the ADF regression is asymptotically normal for all coefficients ρ excluded! The distribution of the estimator of ρ is non-standard (it follows the Dickey- Fuller distribution) and depends on the inclusion of deterministic components and on q. The procedure for evaluating the null hypothesis of non-stationarity, that is ρ = 0, makes use of a test for statistical significance, with a standard test statistic ˆρ/σ(ρ) whose distribution depends on the specification of the auxiliary regression To obtain the test statistic, a standard t − test statistic, we must proceed with a few steps i) set initial q: start from a q coherent with data frequency (maximum values: q = 4 for yearly data, q = 12 for quarterly and monthly data, q = 22 for daily data)
We start by looking at some elements we might compute on (stationary) finan- cial time series (of returns), before moving to the analysis of serial correlation properties and of the models capable of capturing serial correlation On a given time series xt with data available from t = 1 to t = T we might evaluate (unconditional) moments, that is The mean: μ = E[xt] The variance: σ^2 = V[xt] = E[(xt − μ)^2 ] The third and fourth order centred moments: μ 3 = E[(xt − μ)^3 ] and μ 4 = E[(xt − μ)^4 ] These are used to estimate the skewness and kurtosis indexes: Sk = μ 3 /σ^3 and K = μ 4 /σ^4 Remind that for Gaussian distributions Sk = 0 and K = 3; eK = K − 3 is also called excess kurtosis. Moments and indexes are evaluated on the basis of the corresponding sample counterparts The sample mean ˆμ = (^1) T
t=1 xt The sample variance ˆσ^2 = (^1) T
t=1(xt^ −^ μˆ) 2 The sample third order centred moment ˆμ 3 = (^) T^1
t=1(xt^ −^ μˆ) 3 The sample fourth order centred moment ˆμ 3 = (^) T^1
t=1(xt^ −^ μˆ)
4 The sample Skewness and Kurtosis, Skˆ = ˆμ 3 /ˆσ^3 and Kˆ = ˆμ 4 /ˆσ^4 Sample estimators of Skewness and Kurtosis can be used to test for asym- metry and leptokurtosis in the (unconditional) distribution of a time series. We use the asymptotic distribution of the estimators
Skˆ → N
Sk 0 ,
The null hypothesis correspond to symmetry, H 0 : Sk 0 = 0, and to the kur- tosis level of the Gaussian, H 0 : K 0 = 3, leading to the following test statistics
Skˆ q 6 T
q 24 T
Stylized fact: financial time series (of returns) are usually characterized by negative asymmetry and leptokurtosis.
i The frequency impacts on series moments: increasing the time fre- quency leads to an increase in kurtosis ii The single stock is riskier than the market index → diversification benefits iii Mean and standard deviation cannot be directly compared across frequencies → convert to a common scale by annualization
μA = hμb σA =
hσb
where b stands for the daily or monthly frequency, while h = 12 for monthly data and h = 252 for daily data
Sample Skewness and Kurtosis might also be used to build a test to verify the null hypothesis of Normality of a given time series, by means of the Jarque-Bera test. The JB test verifies the null hypothesis that a given time series follows a Gaussian distribution; the test statistic equals
Skˆ^2 + T 24
→ χ^22
The Jarque-Bera is not the most powerful test for Normality, there are many other possibilities; JB is available by default in many software and is very com- mon Stylized fact: the (unconditional) distribution of financial returns is not Normal (irrespectively of the test you will use... ). We discussed some elements related to the unconditional distribution of returns, but in order to evaluate the independence of serial correlation properties of the returns sequence, we must introduce additional theoretical tools In the analysis of time series the classical approach decomposes a time series into the contribution of a deterministic component plus a stochastic component whose observations are i.i.d., that is
yt = f (t) + εt where f (t) is a function of time and might include a constant, a linear (or non-linear) trend, and even seasonal effect In the modern approach, the innovation term might be characterized by serial correlation We refer to the modern approach and we focus on the stochastic component. We assume that deterministic components have been filtered out or are simply not present We are interested in characterizing the model that has generated the ob- served time series → the time series is a finite realization of a specific stochastic process What is a stochastic process?
samples {x 1 , x 2 ,... , xt} and {xm, xm+1,... , xm+t− 1 }, for any m and t, the joint distributions F (x 1 , x 2 ,... , xt) and F (xm, xm+1,... , xm+t− 1 ) are identical If t = 1, that is, we focus on a single point in time, strict stationarity implies that the (unconditional) mean and variance do not depend on time, while the autocovariance (and the autocorrelation) can depend on the time lag m but not on time This implies, for instance that E[xn] = μ and E[xs] = μ, that V[xn] = σ^2 and V[xs] = σ^2 and that γ(s − n) = γ(k) with k = s − n and s > n In general, strict stationarity imposes stringent conditions on the process, on the entire distribution (i.e., an all moments) so it is more common to work with less restrictive conditions. Weak stationarity: a stochastic process is weakly stationary if E[xn] = μ < ∞, V[xn] = σ^2 < ∞ and γ(s − n) = γ(k) Weak stationarity is also defined as Covariance stationarity We do not impose conditions on the distribution nor on higher order mo- ments Note that strict stationarity implies weak stationarity but the opposite is not necessarily true Remark: if the stochastic process is governed by a Gaussian innovation, strict stationarity and weak stationarity coincide (mean and variance are sufficient to characterize the joint density of a sample). Some additional details on autocovariance (ACOV, γ(k) and autocorrelation (ACF, ρ(k) functions (k is the lag) Both are even functions, that is, γ(k) = γ(−k) or, equivalently, γ(xt, xt−k) = γ(xt, xt+k); for this reason, we focus only on k ≥ 0 If k = 0, γ(0) = V[xt] and ρ(0) = 1 The autocorrelation is bounded, |ρ(k)| ≤ 1 Given the autocorrelation is a pure number, it is usually adopted for identi- fying stochastic processes. We will see how to characterize a stochastic process by means of moments, but up to now we just discussed some properties of (selected) moments on a theoretical ground However, we do not know the stochastic process (the model) that could have generated the data, the sample, which we observe In addition, remind that the sample is a single realization of a stochastic process (a given stochastic process can generate an infinite number of different realizations) By looking at a sample, we have to infer the stochastic process, but how to? By contrasting the theoretical moments of a stochastic process with their sample counterparts. We will see that, for a given stochastic process, we will be able to uniquely determine its Autocovariance and Autocorrelation functions, γk and ρk However, for empirical analyses, we will go the other way round, from an estimate (derived from an -at least- asymptotically consistent- estimator) of the two functions, we will try to uniquely determine the stochastic process that has generated the sample (the realization) we observe
Is this possible? Not in general, as several stochastic processes might have the very same autocovariance (and thus autocorrelation) function However, only one of them will be invertible A stochastic process xt is invertible if there exist a linear function f (.) such that xt = f (xt− 1 , xt− 2 , xt− 3 ,... ) + εt with εt being an i.i.d. innovation process For invertible process the ACF uniquely identify the process and the process uniquely identify the ACF. How can we estimate sample moments? Assume we have a sample of size T , {x 1 , x 2 ,... , xt,... xT } Sample mean
μˆ =
t=
xt
Sample variance
ˆσ^2 =
t=
(xt − μˆ)^2 = ˆγ 0
Sample Autocovariance and Autocorrelation
ˆγk =
t=k+
(xt − μˆ)(xt−k − μˆ), ρˆk = ˆγk γ ˆ 0
[to simplify notation the lag is placed at the subscript] Technical details We assume the stochastic process that has generated the data is stationary (or weakly stationary) We assume the stochastic process that has generated the data is ergodic: a stochastic process is ergodic if xt and xt+i for a diverging i are nearly indepen- dent; a stochastic process is ergodic (up to the second moment) if the sample mean converges in probability to E[xt] and the sample covariance converges to E[(xt − μ)(xt−k − μ)] Under these assumptions, the sample mean is unbiased and consistent: E[ˆμ] = μ and limT →∞ V[ˆμ] = 0 For the variance of the sample mean it holds
V[ˆμ] =
σ^2 T
k=
k T
ρk
Technical details Therefore, to ensure consistency limk→∞ ρk = 0; this is also the ergodicity condition for the first order moment The sample autocovariance is a biased but asymptotically consistent estima- tor as it holds
E[ˆγk] =
k T
γk − T − k T
V[ˆμ]
The Quenouille approximation implies that
ϕˆkk ∼ N
which allows, similarly to the ACF, to easily test for the significance of a single PACF coefficient. Remind that our objective is to use the information contained in the (empirical) moments, mean, variance, ACF and PACF, to identify the stochastic process that has generated the available sample Invertibility allows to move from ACOV (and thus ACF) to the stochastic process, PACF provides additional information, but we need to discuss how to identify processes This is combination of theory and practice: we need to know which theoret- ical shape/form the ACF/PACF might take according to different models and try to identify those shape/form in the empirical ACF/PACF, keeping in mind that: i) data include noise and we will thus not have an identical match between a theoretical ACF/PACF and the empirical counterpart; ii) we do not know the model, we will see linear models, but the true model might be non-linear We will now move to a class of linear stochastic processes for time series data, the ARMA model class. We start from the simplest case, a purely random stochastic process, the White Noise process xt is a White Noise process if the following conditions hold: E[xt] = 0; V[xt] = σ^2 ; ρk = 0 for all k > 0; ϕkk = 0 for all k > 0 A simple example of a White Noise: xt ∼ N (0, σ^2 ) Note that for the WN process, ACF and PACF are null apart in the case k = 0 when they are both equal to 1 The WN is usually considered as a building block for more complex models. Back to market efficiency... Recall that pt = log(Pt), that the EMH implies a unit root for pt, leading to the modelling of returns rt = pt − pt− 1 EMH implies that returns are not predictable, or, equivalently, that they are serially uncorrelated It follows that returns should be a WN process (with the possible presence of heteroskedasticity... this calls for a weak White Noise... next year in the QRM course!). Some comments on the plots for financial returns i Confidence intervals really narrow, due to the huge number of observations ii Some mild serial correlation for the first lags (usually 1 to 3) iii Prices have strong serial correlation, with ACF slowly decreasing (they are non-stationary), and with the PACF with a value close to 1 at lag 1. We need models capable of capturing potential dynamic present in a given series and characterizing the conditional mean
We consider a first model, the Moving Average or MA Assume that εt is a White Noise process with variance σ^2 , the MA model of order 1 is defined as
xt = εt + θεt− 1 Define the lag operator L such that Lkxt = xt−k; note that L^0 xt = xt; this operator might also be denoted as B for backward The MA(1) model might also be represented in the compact form
xt = (1 + θL)εt = Θ(L)εt where Θ(L) = (1 + θL) is the Moving Average polynomial. Let’s compute the moments of the MA(1) process The conditional mean
E[xt|It− 1 ] = E[εt + θεt− 1 |It− 1 ] = θεt− 1 The mean
E[xt] = E[εt + θεt− 1 ] = 0 The Variance
V[xt] = E[x^2 t ] = E[(εt + θεt− 1 )^2 ] = E[ε^2 t + θ^2 ε^2 t− 1 + 2θεtεt− 1 ] = (1 + θ^2 )σ^2 The Autocovariance
E[xtxt− 1 ] = E[(εt + θεt− 1 )(εt− 1 + θεt− 2 )] = θE[ε^2 t− 1 ] = θσ^2
E[xtxt−k] = E[(εt + θεt− 1 )(εt−k + θεt−k− 1 )] = 0, k > 1
The Autocorrelation
ρ(k) = γ(k) γ(0)
1 k = 0 θ 1+θ^2 k^ = 1 0 k > 1 The ACOV and ACF are non-null only for lags 0 and 1 What happens if we increase the model order? Consider now the general MA(q) model
xt = εt + θ 1 εt− 1 + θ 2 εt− 2 + · · · + θq εt−q The unconditional mean remains equal to zero due to linearity of expecta- tions and assumptions on εt
Conditional and unconditional moments of the AR(1) process:
E[xt|It− 1 ] = ϕxt− 1
For the unconditional mean, recall the random walk process and the station- arity definition: the AR(1) model includes as a special case the random walk, obtained when ϕ = 1; the AR(1) is stationary if |ϕ| < 1. Under stationarity we have E[xt] = E[xt− 1 ] = μ and therefore:
E[xt] = E[ϕxt− 1 + εt] = ϕE[xt− 1 ] = ϕE[xt] → E[xt](1 − ϕ) = 0 → E[xt] = 0
Autocovariance and Variance of AR(1) Given: xt = ϕxt− 1 + εt
γ(1) = E[xtxt− 1 ] = E[(ϕxt− 1 + εt)xt− 1 ]
= ϕE[x^2 t− 1 ] + E[εtxt− 1 ] = ϕγ(0)
γ(0) = E[xtxt] = E[(ϕxt− 1 + εt)xt]
= ϕE[xt− 1 xt] + E[εtxt] = ϕγ(1) + E[εt(ϕxt− 1 + εt)] = ϕγ(1) + σ^2
γ(0) =
σ^2 1 − ϕ^2
γ(2) = E[xtxt− 2 ] = E[(ϕxt− 1 + εt)xt− 2 ] = ϕE[xt− 1 xt− 2 ] + E[εtxt− 2 ] = ϕγ(1) = ϕ^2 γ(0)
γ(k) = E[xtxt−k] = E[(ϕxt− 1 + εt)xt−k] = ϕE[xt− 1 xt−k] + E[εtxt−k] = ϕγ(k − 1) = ϕkγ(0)
ρ(k) = ϕk
The Partial Autocorrelation function (PACF) will be non-null only for k = 0 and k = 1.
For the most general AR(p) model
xt = ϕ 1 xt− 1 + ϕ 2 xt− 2 + · · · + ϕpxt−p + εt The mean remains equal to zero (same reasoning as before under the sta- tionarity assumption) The autocovariance (and the variance) have analytical expressions derived from the following recursions
γ(k) =
ϕ 1 γ(k − 1) + ϕ 2 γ(k − 2) + · · · + ϕpγ(k − p) + σ^2 k = 0 ϕ 1 γ(k − 1) + ϕ 2 γ(k − 2) + · · · + ϕpγ(k − p) k > 0
note that the ACOV is symmetric thus γ(−m) = γ(m) for all possible m.
The ACF follows from a similar recursion
ρ(k) = ϕ 1 ρ(k − 1) + ϕ 2 ρ(k − 2) + · · · + ϕpρ(k − p) In general: the ACF is always (theoretically) non-null and converges toward zero for increasing k... ...converge might be exponential or pseudo-periodic;... ...the PACF is non-null up to lag p and is (theoretically) zero for k > p.
For the AR(p) model, similarly to the MA(q), we can define a compact representation
xt − ϕ 1 xt− 1 −... ϕpxt−p = Φ(L)xt = εt where Φ(L) is the AR polynomial
Φ(L) = 1 − ϕ 1 L −... ϕpLp Stationarity of the AR(p) is associated with the roots of the AR polynomial: the AR(p) process is stationary if the roots, in absolute values, are all greater than 1 The AR(p) process is invertible by construction In the simplest case, the AR(1), the stationarity condition implies that |ϕ−^1 | > 1 which corresponds to |ϕ| < 1 In the limiting case ϕ = 1 we have non-stationarity and we obtain the random walk model
a stationary AR to an MA. Moving from the two representations is based on the inversion of the AR/MA polynomials. Consider the simplest case, the AR(1)
(1 − ϕL)xt = εt
xt =
1 − ϕL
εt = Ψ(L)εt
xt = εt + ψ 1 εt− 1 + ψ 2 εt− 2 + ψ 3 εt− 3 +...
xt =
j=
ψj εt−j
The AR(1) can be cast into an MA(∞) representation; in general, the AR(p) can be represented as an MA(∞). It is possible to determine the expression of the ϕj coefficients by solving
Φ(L)Ψ(L) = 1
For the AR(1) it holds that ψj = ϕj^. For the AR(1) coefficients can be also determined by iterative substitutions. For the MA similar results hold and an MA(q) can be rewritten as an AR(∞) (under invertibility).
By combining AR(p) and MA(q) models we obtain the ARMA(p,q) model
xt = ϕ 0 + ϕ 1 xt− 1 + ϕ 2 xt− 2 + · · · + ϕpxt−p + εt + θ 1 εt− 1 + θ 2 εt− 2 + · · · + θq εt−q
The ARMA model has a compact representation
Φ(L)xt = ϕ 0 + Θ(L)εt
with both the AR and MA polynomials. The ARMA model includes as special cases both the AR and the MA models. The ARMA model is stationary if the roots of the AR polynomial are outside the unit circle (larger than 1 in modulus). The ARMA model is invertible if the roots of the MA polynomial are outside the unit circle (larger than 1 in modulus). Further assumption: Φ(L) and Θ(L) do not have roots in common. The mean of the ARMA model is identical to the mean of the AR model (the MA terms have a zero mean, unconditionally)
E[xt] = μ = ϕ 0 1 − ϕ 1 − ϕ 2 − · · · − ϕp The Variance depends on all model parameters and is algebraically complex apart when both p and q are really small. Autocovariance, Autocorrelation, and Partial Autocorrelation have a mixed behaviour, combining AR and MA
behaviours. The PACF has an infinite number of non-null elements (from a theoretical point of view), and from k > p it takes the behaviour of the MA(q) model. The Autocovariance and the Autocorrelations do have an infinite number of non-null elements (from a theoretical point of view), and from lag k > q they have the same behaviour of the AR(p) model, that is
ρ(k) =
( (^) γ(k) γ(0) k^ ≤^ p ϕ 1 ρ(k − 1) + ϕ 2 ρ(k − 2) + · · · + ϕpρ(k − p) k > p where the first p values of the ACOV depend on the parameters and on the model orders. The ARMA model is very flexible and can generate a great variety of correlation patterns with few parameters; it is thus a common choice for time series analysis, and generally preferred to more parametrized AR or MA models. However, it is difficult to recognize that a given series is generated from an ARMA model. Elements to remember:
When turning to empirical ACF and PACF, we have to focus on statistically sig- nificant ACF/PACF values with the need of acquiring experience in interpreting these plots.
In the ARMA(p,q) model, what happens when the AR(p) polynomial includes a unit root? This calls for a generalization: the so-called ARIMA(p,d,q) model, where we allow for unit roots (d) in the AR part of the model. The random walk model is an ARIMA(0,1,0) for the log-prices. Under the EMH, log-prices follow a RW, and the returns are a white noise, so no AR, no MA, no significant values in both ACF and PACF... is it really the case?
Assuming the model orders p and q are known, we discuss the estimation of the ARMA(p, q) model parameters. For the estimation of parameters the literature includes various approaches. I first mention that if q = 0, we might resort to linear regression, where the dependent variable xt is regressed on its p lags; this is a special regression model, motivating the name AR of the model. The