lec2-13经典教材《金融时间序列分析》Ruey S. Tsay 英文第三版高清教材以及最新2013年完整版高清讲义
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
φ0 1−φ1
1
U.S. quarterly real GNP growth rate: 1947.II to 1991.I
gnp
−0.02 −0.01
0.00
0.01
0.02
0.03
0.04
1950
1960
1970 Time
1980
1990
Figure 1: U.S. quarterly growth rate of real GNP: 1947-1991
This model also has two parameters (µ and φ1). It explicitly uses the mean of the series. It is less commonly used in the literature, but is the model representation used in R. 5. Variance: Var(rt) =
4
(g) Behavior of multi-step ahead forecasts. In general, for the -step ahead forecast at n, we have ˆ n ( ) = φ 1 xn , x the forecast error en( ) = an+ + φ1an+ −1 + · · · + φ1−1an+1, and the variance of forecast error Var[en( )] = (1 + φ2 1 + · · · + φ1 In particular, as → ∞, x ˆ n ( ) → 0, i.e., r ˆn( ) → µ.
Lecture Notes of Bus 41202 (Spring 2013) Analysis of Financial Time Series Ruey S. Tsay Simple AR models: (Regression with lagged variables.) Motivating example: The growth rate of U.S. quarterly real GNP from 1947 to 1991. Recall that the model discussed before is ˆ a = 0.01. rt = 0.005 + 0.35rt−1 + 0.18rt−2 − 0.14rt−3 + at, σ This is called an AR(3) model because the growth rate rt depends on the growth rates of the past three quarters. How do we specify this model from the data? Is it adequate for the data? What are the implications of the model? These are the questions we shall address in this lecture. Another example: U.S. monthly unemployment rate. AR(1) model: 1. Form: rt = φ0 + φ1rt−1 + at, where φ0 and φ1 are real numbers, which are referred to as “parameters” (to be estimated from the data in an application). For example, rt = 0.005 + 0.2rt−1 + at 2. Stationarity: necessary and sufficient condition |φ1| < 1. Why? 3. Mean: E (rt) =
2( −1) 2 )σ a .
This is called the mean-reversion of the AR(1) process. The variance of forecast error approaches Var[en( )] = 1 2 σ = Var(rt). a 1 − φ2 1
20
x[1:175]
Figure 2: Various plots of U.S. quarterly growth rate of real GNP: 1947-1991
2
UNRATE
Last 7.7
[1948−01−01/2013−02−01]
Baidu Nhomakorabea10
8
6
4
Jan 1948
Jan 1960
Jan 1970
2 Var[en(1)] = Var(an+1) = σa .
(d) 2-step ahead forecast: ˆn(2) = φ1x ˆn(1) = φ2 x 1 xn . (e) 2-step ahead forecast error: ˆn(2) = an+2 + φ1an+1 en(2) = xn+2 − x (f) Variance of 2-step ahead forecast error:
2 σa . 1−φ2 1
k 6. Autocorrelations: ρ1 = φ1, ρ2 = φ2 1 , etc. In general, ρk = φ1
and ACF ρk decays exponentially as k increases, 7. Forecast (minimum squared error): Suppose the forecast origin is n. For simplicity, we shall use the model representation in (1)
0.01 0.03
−0.02
x[3:176]
0 50 100 Index 150
−0.02
−0.02
0.01 0.03
x
0.00
0.02
0.04
x[1:174]
Series
x
0.01 0.03
−0.02
−0.02
0.00
0.02
0.04
0.0 0.4 0.8
0
x[2:176]
ACF
5
10 Lag
15
is k =
ln(0.5) ln(|φ1 |) .
For example, if φ1 = 0.5, the k = 1. If φ1 = 0.9, then
k ≈ 6.58. AR(2) model: 1. Form: rt = φ0 + φ1rt−1 + φ2rt−2 + at, or (1 − φ1B − φ2B 2)rt = φ0 + at. 2. Stationarity condition: (factor of polynomial) 3. Characteristic equation: (1 − φ1x − φ2x2) = 0 4. Mean: E (rt) =
Jan 1980
Jan 1990
Jan 2000
Jan 2010
Figure 3: U.S. monthly unemployment rate (total civilian, 16 and older) from January 1948 to February 2013
4. Alternative representation: Let E (rt) = µ be the mean of rt so that µ = φ0/(1 − φ1). Equivalently, φ0 = µ(1 − φ1). Plugging in the model, we have (rt − µ) = φ1(rt−1 − µ) + at. (1)
φ1 1−φ2 ,
ρ = φ1ρ −1 + φ2ρ −1,
6
≥ 2.
7. Stochastic business cycle: if φ2 1 + 4φ2 < 0, then rt shows characteristics of business cycles with average length 2π √ k= , cos−1[φ1/(2 −φ2)] where the cosine inverse is stated in radian. If we denote the √ solutions of the polynomial as a ± bi, where i = −1, then we have φ1 = 2a and φ2 = −(a2 + b2) so that 2π √ . cos−1(a/ a2 + b2) √ In R or S-Plus, one can obtain a2 + b2 using the command k= Mod. 8. Forecasts: Similar to AR(1) models Simulation in R: Use the command arima.sim 1. y1=arima.sim(model=list(ar=c(1.3,-.4)),1000) 2. y2=arima.sim(model=list(ar=c(.8,-.7)),1000) Check the ACF and PACF of the above two simulated series. Discussion: (Reference only) An AR(2) model can be written as an AR(1) model if one expands the dimension. Specifically, we have rt − µ = φ1(rt−1 − µ) + φ2(rt−2 − µ) + at rt−1 − µ = rt−1 − µ,
φ0 1−φ1 −φ2
5. Mean-adjusted format: Using φ0 = µ − φ1µ − φ2µ, we can write the AR(2) model as (rt − µ) = φ1(rt−1 − µ) + φ2(rt−2 − µ) + at. This form is often used in the finance literature to highlight the mean-reverting property of a stationary AR(2) model. 6. ACF: ρ0 = 1, ρ1 =
5
that the magnitude of the forecast becomes half of that of the forecast origin. For an AR(1) model, this mean 1 x n (k ) = x n . 2
1 Thus, φk 1 xn = 2 xn . Consequently, the half-life of the AR(1) model
2 Var[en(2)] = (1 + φ2 1 )σ a
which is greater than or equal to Var[en(1)], implying that uncertainty in forecasts increases as the number of steps increases.
In practice, it means that for the long-term forecasts serial dependence is not important. The forecast is just the sample mean and the uncertainty is simply the uncertainty about the series. 8. A compact form: (1 − φ1B )rt = φ0 + at. Half-life: A common way to quantify the speed of mean reversion is the half-life, which is defined as the number of periods needed so
3
and write xt = rt − µ. The model then becomes xt = φ1xt−1 + at. Note that forecast of rt is simply the forecast of xt plus µ. (a) 1-step ahead forecast at time n: x ˆn(1) = φ1xn (b) 1-step ahead forecast error: ˆn(1) = an+1 en(1) = xn+1 − x Thus, an+1 is the un-predictable part of xn+1. It is the shock at time n + 1! (c) Variance of 1-step ahead forecast error:
1
U.S. quarterly real GNP growth rate: 1947.II to 1991.I
gnp
−0.02 −0.01
0.00
0.01
0.02
0.03
0.04
1950
1960
1970 Time
1980
1990
Figure 1: U.S. quarterly growth rate of real GNP: 1947-1991
This model also has two parameters (µ and φ1). It explicitly uses the mean of the series. It is less commonly used in the literature, but is the model representation used in R. 5. Variance: Var(rt) =
4
(g) Behavior of multi-step ahead forecasts. In general, for the -step ahead forecast at n, we have ˆ n ( ) = φ 1 xn , x the forecast error en( ) = an+ + φ1an+ −1 + · · · + φ1−1an+1, and the variance of forecast error Var[en( )] = (1 + φ2 1 + · · · + φ1 In particular, as → ∞, x ˆ n ( ) → 0, i.e., r ˆn( ) → µ.
Lecture Notes of Bus 41202 (Spring 2013) Analysis of Financial Time Series Ruey S. Tsay Simple AR models: (Regression with lagged variables.) Motivating example: The growth rate of U.S. quarterly real GNP from 1947 to 1991. Recall that the model discussed before is ˆ a = 0.01. rt = 0.005 + 0.35rt−1 + 0.18rt−2 − 0.14rt−3 + at, σ This is called an AR(3) model because the growth rate rt depends on the growth rates of the past three quarters. How do we specify this model from the data? Is it adequate for the data? What are the implications of the model? These are the questions we shall address in this lecture. Another example: U.S. monthly unemployment rate. AR(1) model: 1. Form: rt = φ0 + φ1rt−1 + at, where φ0 and φ1 are real numbers, which are referred to as “parameters” (to be estimated from the data in an application). For example, rt = 0.005 + 0.2rt−1 + at 2. Stationarity: necessary and sufficient condition |φ1| < 1. Why? 3. Mean: E (rt) =
2( −1) 2 )σ a .
This is called the mean-reversion of the AR(1) process. The variance of forecast error approaches Var[en( )] = 1 2 σ = Var(rt). a 1 − φ2 1
20
x[1:175]
Figure 2: Various plots of U.S. quarterly growth rate of real GNP: 1947-1991
2
UNRATE
Last 7.7
[1948−01−01/2013−02−01]
Baidu Nhomakorabea10
8
6
4
Jan 1948
Jan 1960
Jan 1970
2 Var[en(1)] = Var(an+1) = σa .
(d) 2-step ahead forecast: ˆn(2) = φ1x ˆn(1) = φ2 x 1 xn . (e) 2-step ahead forecast error: ˆn(2) = an+2 + φ1an+1 en(2) = xn+2 − x (f) Variance of 2-step ahead forecast error:
2 σa . 1−φ2 1
k 6. Autocorrelations: ρ1 = φ1, ρ2 = φ2 1 , etc. In general, ρk = φ1
and ACF ρk decays exponentially as k increases, 7. Forecast (minimum squared error): Suppose the forecast origin is n. For simplicity, we shall use the model representation in (1)
0.01 0.03
−0.02
x[3:176]
0 50 100 Index 150
−0.02
−0.02
0.01 0.03
x
0.00
0.02
0.04
x[1:174]
Series
x
0.01 0.03
−0.02
−0.02
0.00
0.02
0.04
0.0 0.4 0.8
0
x[2:176]
ACF
5
10 Lag
15
is k =
ln(0.5) ln(|φ1 |) .
For example, if φ1 = 0.5, the k = 1. If φ1 = 0.9, then
k ≈ 6.58. AR(2) model: 1. Form: rt = φ0 + φ1rt−1 + φ2rt−2 + at, or (1 − φ1B − φ2B 2)rt = φ0 + at. 2. Stationarity condition: (factor of polynomial) 3. Characteristic equation: (1 − φ1x − φ2x2) = 0 4. Mean: E (rt) =
Jan 1980
Jan 1990
Jan 2000
Jan 2010
Figure 3: U.S. monthly unemployment rate (total civilian, 16 and older) from January 1948 to February 2013
4. Alternative representation: Let E (rt) = µ be the mean of rt so that µ = φ0/(1 − φ1). Equivalently, φ0 = µ(1 − φ1). Plugging in the model, we have (rt − µ) = φ1(rt−1 − µ) + at. (1)
φ1 1−φ2 ,
ρ = φ1ρ −1 + φ2ρ −1,
6
≥ 2.
7. Stochastic business cycle: if φ2 1 + 4φ2 < 0, then rt shows characteristics of business cycles with average length 2π √ k= , cos−1[φ1/(2 −φ2)] where the cosine inverse is stated in radian. If we denote the √ solutions of the polynomial as a ± bi, where i = −1, then we have φ1 = 2a and φ2 = −(a2 + b2) so that 2π √ . cos−1(a/ a2 + b2) √ In R or S-Plus, one can obtain a2 + b2 using the command k= Mod. 8. Forecasts: Similar to AR(1) models Simulation in R: Use the command arima.sim 1. y1=arima.sim(model=list(ar=c(1.3,-.4)),1000) 2. y2=arima.sim(model=list(ar=c(.8,-.7)),1000) Check the ACF and PACF of the above two simulated series. Discussion: (Reference only) An AR(2) model can be written as an AR(1) model if one expands the dimension. Specifically, we have rt − µ = φ1(rt−1 − µ) + φ2(rt−2 − µ) + at rt−1 − µ = rt−1 − µ,
φ0 1−φ1 −φ2
5. Mean-adjusted format: Using φ0 = µ − φ1µ − φ2µ, we can write the AR(2) model as (rt − µ) = φ1(rt−1 − µ) + φ2(rt−2 − µ) + at. This form is often used in the finance literature to highlight the mean-reverting property of a stationary AR(2) model. 6. ACF: ρ0 = 1, ρ1 =
5
that the magnitude of the forecast becomes half of that of the forecast origin. For an AR(1) model, this mean 1 x n (k ) = x n . 2
1 Thus, φk 1 xn = 2 xn . Consequently, the half-life of the AR(1) model
2 Var[en(2)] = (1 + φ2 1 )σ a
which is greater than or equal to Var[en(1)], implying that uncertainty in forecasts increases as the number of steps increases.
In practice, it means that for the long-term forecasts serial dependence is not important. The forecast is just the sample mean and the uncertainty is simply the uncertainty about the series. 8. A compact form: (1 − φ1B )rt = φ0 + at. Half-life: A common way to quantify the speed of mean reversion is the half-life, which is defined as the number of periods needed so
3
and write xt = rt − µ. The model then becomes xt = φ1xt−1 + at. Note that forecast of rt is simply the forecast of xt plus µ. (a) 1-step ahead forecast at time n: x ˆn(1) = φ1xn (b) 1-step ahead forecast error: ˆn(1) = an+1 en(1) = xn+1 − x Thus, an+1 is the un-predictable part of xn+1. It is the shock at time n + 1! (c) Variance of 1-step ahead forecast error: