Siêu thị PDFTải ngay đi em, trời tối mất

Thư viện tri thức trực tuyến

Kho tài liệu với 50,000+ tài liệu học thuật

© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Modeling Financial Time Series with S-PLUS
PREMIUM
Số trang
1017
Kích thước
10.9 MB
Định dạng
PDF
Lượt xem
1180

Modeling Financial Time Series with S-PLUS

Nội dung xem thử

Mô tả chi tiết

This is page i

Printer: Opaque this

Modelling Financial Time Series with S-PLUS,

Second Edition

Eric Zivot and Jiahui Wang

April 13, 2005

ii

This is page iii

Printer: Opaque this

Contents

Preface v

1 S and S-PLUS 1

1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 S Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.2.1 Assignment . . . . . . . . . . . . . . . . . . . . . . . 2

1.2.2 Class . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.2.3 Method . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.3 Modeling Functions in S+FinMetrics ............ 8

1.3.1 Formula Specification . . . . . . . . . . . . . . . . . 8

1.3.2 Method . . . . . . . . . . . . . . . . . . . . . . . . . 11

1.4 S-PLUS Resources . . . . . . . . . . . . . . . . . . . . . . . . 12

1.4.1 Books . . . . . . . . . . . . . . . . . . . . . . . . . . 12

1.4.2 Internet . . . . . . . . . . . . . . . . . . . . . . . . . 13

1.5 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2 Time Series Specification, Manipulation, and

Visualization in S-PLUS 15

2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2.2 The Specification of “timeSeries” Objects in S-PLUS . . . 15

2.2.1 Basic Manipulations . . . . . . . . . . . . . . . . . . 18

2.2.2 S-PLUS “timeDate” Objects . . . . . . . . . . . . . . 19

2.2.3 Creating Common “timeDate” Sequences . . . . . . 24

2.2.4 Miscellaneous Time and Date Functions . . . . . . . 28

iv Contents

2.2.5 Creating “timeSeries” Objects . . . . . . . . . . . 28

2.2.6 Aggregating and Disaggregating Time Series . . . . 31

2.2.7 Merging Time Series . . . . . . . . . . . . . . . . . . 38

2.2.8 Dealing with Missing Values Using the

S+FinMetrics Function interpNA . . . . . . . . . . 39

2.3 Time Series Manipulation in S-PLUS . . . . . . . . . . . . . 40

2.3.1 Creating Lags and Differences . . . . . . . . . . . . . 40

2.3.2 Return Definitions . . . . . . . . . . . . . . . . . . . 43

2.3.3 Computing Asset Returns Using the

S+FinMetrics Function getReturns . . . . . . . . . 46

2.4 Visualizing Time Series in S-PLUS . . . . . . . . . . . . . . 48

2.4.1 Plotting “timeSeries” Using the S-PLUS

Generic plot Function . . . . . . . . . . . . . . . . . 48

2.4.2 Plotting “timeSeries” Using the S+FinMetrics

Trellis Plotting Functions . . . . . . . . . . . . . . . 51

2.5 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

3 Time Series Concepts 57

3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

3.2 Univariate Time Series . . . . . . . . . . . . . . . . . . . . . 58

3.2.1 Stationary and Ergodic Time Series . . . . . . . . . 58

3.2.2 Linear Processes and ARMA Models . . . . . . . . . 64

3.2.3 Autoregressive Models . . . . . . . . . . . . . . . . . 66

3.2.4 Moving Average Models . . . . . . . . . . . . . . . . 71

3.2.5 ARMA(p,q) Models . . . . . . . . . . . . . . . . . . 74

3.2.6 Estimation of ARMA Models and Forecasting . . . . 76

3.2.7 Martingales and Martingale Difference Sequences . . 83

3.2.8 Long-run Variance . . . . . . . . . . . . . . . . . . . 85

3.2.9 Variance Ratios . . . . . . . . . . . . . . . . . . . . . 88

3.3 Univariate Nonstationary Time Series . . . . . . . . . . . . 93

3.4 Long Memory Time Series . . . . . . . . . . . . . . . . . . . 97

3.5 Multivariate Time Series . . . . . . . . . . . . . . . . . . . . 101

3.5.1 Stationary and Ergodic Multivariate Time Series . . 101

3.5.2 Multivariate Wold Representation . . . . . . . . . . 106

3.5.3 Long Run Variance . . . . . . . . . . . . . . . . . . . 107

3.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

4 Unit Root Tests 111

4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

4.2 Testing for Nonstationarity and Stationarity . . . . . . . . . 112

4.3 Autoregressive Unit Root Tests . . . . . . . . . . . . . . . . 114

4.3.1 Simulating the DF and Normalized Bias

Distributions . . . . . . . . . . . . . . . . . . . . . . 116

4.3.2 Trend Cases . . . . . . . . . . . . . . . . . . . . . . . 118

4.3.3 Dickey-Fuller Unit Root Tests . . . . . . . . . . . . . 120

Contents v

4.3.4 Phillips-Perron Unit Root Tests . . . . . . . . . . . . 127

4.4 Stationarity Tests . . . . . . . . . . . . . . . . . . . . . . . . 129

4.4.1 Simulating the KPSS Distributions . . . . . . . . . . 130

4.4.2 Testing for Stationarity Using the S+FinMetrics

Function stationaryTest . . . . . . . . . . . . . . . 131

4.5 Some Problems with Unit Root Tests . . . . . . . . . . . . . 132

4.6 Efficient Unit Root Tests . . . . . . . . . . . . . . . . . . . 132

4.6.1 Point Optimal Tests . . . . . . . . . . . . . . . . . . 133

4.6.2 DF-GLS Tests . . . . . . . . . . . . . . . . . . . . . 134

4.6.3 Modified Efficient PP Tests . . . . . . . . . . . . . . 134

4.6.4 Estimating λ2 . . . . . . . . . . . . . . . . . . . . . . 135

4.6.5 Choosing Lag Lengths to Achieve Good Size and Power135

4.7 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

5 Modeling Extreme Values 141

5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

5.2 Modeling Maxima and Worst Cases . . . . . . . . . . . . . . 142

5.2.1 The Fisher-Tippet Theorem and the Generalized

Extreme Value Distribution . . . . . . . . . . . . . . 143

5.2.2 Estimation of the GEV Distribution . . . . . . . . . 147

5.2.3 Return Level . . . . . . . . . . . . . . . . . . . . . . 153

5.3 Modeling Extremes Over High Thresholds . . . . . . . . . . 157

5.3.1 The Limiting Distribution of Extremes Over

High Thresholds and the Generalized Pareto

Distribution . . . . . . . . . . . . . . . . . . . . . . . 159

5.3.2 Estimating the GPD by Maximum Likelihood . . . . 164

5.3.3 Estimating the Tails of the Loss Distribution . . . . 165

5.3.4 Risk Measures . . . . . . . . . . . . . . . . . . . . . 171

5.4 Hill’s Non-parametric Estimator of Tail Index . . . . . . . . 174

5.4.1 Hill Tail and Quantile Estimation . . . . . . . . . . . 175

5.5 Summary of Extreme Value Modeling Functions . . . . . . 178

5.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

6 Time Series Regression Modeling 181

6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 181

6.2 Time Series Regression Model . . . . . . . . . . . . . . . . . 182

6.2.1 Least Squares Estimation . . . . . . . . . . . . . . . 183

6.2.2 Goodness of Fit . . . . . . . . . . . . . . . . . . . . . 183

6.2.3 Hypothesis Testing . . . . . . . . . . . . . . . . . . . 184

6.2.4 Residual Diagnostics . . . . . . . . . . . . . . . . . . 185

6.3 Time Series Regression Using the S+FinMetrics

Function OLS . . . . . . . . . . . . . . . . . . . . . . . . . . 185

6.4 Dynamic Regression . . . . . . . . . . . . . . . . . . . . . . 201

6.4.1 Distributed Lags and Polynomial Distributed Lags . 205

6.4.2 Polynomial Distributed Lag Models . . . . . . . . . 207

vi Contents

6.5 Heteroskedasticity and Autocorrelation Consistent

Covariance Matrix Estimation . . . . . . . . . . . . . . . . . 208

6.5.1 The Eicker-White Heteroskedasticity Consistent

(HC) Covariance Matrix Estimate . . . . . . . . . . 209

6.5.2 Testing for Heteroskedasticity . . . . . . . . . . . . . 211

6.5.3 The Newey-West Heteroskedasticity and

Autocorrelation Consistent (HAC) Covariance

Matrix Estimate . . . . . . . . . . . . . . . . . . . . 214

6.6 Recursive Least Squares Estimation . . . . . . . . . . . . . 217

6.6.1 CUSUM and CUSUMSQ Tests for Parameter

Stability . . . . . . . . . . . . . . . . . . . . . . . . . 218

6.6.2 Computing Recursive Least Squares Estimates

Using the S+FinMetrics Function RLS . . . . . . . . 219

6.7 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

7 Univariate GARCH Modeling 223

7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

7.2 The Basic ARCH Model . . . . . . . . . . . . . . . . . . . . 224

7.2.1 Testing for ARCH Effects . . . . . . . . . . . . . . . 228

7.3 The GARCH Model and Its Properties . . . . . . . . . . . . 229

7.3.1 ARMA Representation of GARCH Model . . . . . . 230

7.3.2 GARCH Model and Stylized Facts . . . . . . . . . . 230

7.4 GARCH Modeling Using S+FinMetrics . . . . . . . . . . . 232

7.4.1 GARCH Model Estimation . . . . . . . . . . . . . . 232

7.4.2 GARCH Model Diagnostics . . . . . . . . . . . . . . 235

7.5 GARCH Model Extensions . . . . . . . . . . . . . . . . . . 240

7.5.1 Asymmetric Leverage Effects and News Impact . . . 241

7.5.2 Two Components Model . . . . . . . . . . . . . . . . 247

7.5.3 GARCH-in-the-Mean Model . . . . . . . . . . . . . . 250

7.5.4 ARMA Terms and Exogenous Variables in

Conditional Mean Equation . . . . . . . . . . . . . . 252

7.5.5 Exogenous Explanatory Variables in the

Conditional Variance Equation . . . . . . . . . . . . 255

7.5.6 Non-Gaussian Error Distributions . . . . . . . . . . 256

7.6 GARCH Model Selection and Comparison . . . . . . . . . . 259

7.6.1 Constrained GARCH Estimation . . . . . . . . . . . 261

7.7 GARCH Model Prediction . . . . . . . . . . . . . . . . . . . 261

7.8 GARCH Model Simulation . . . . . . . . . . . . . . . . . . 264

7.9 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . 266

7.10 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

8 Long Memory Time Series Modeling 271

8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 271

8.2 Long Memory Time Series . . . . . . . . . . . . . . . . . . . 272

8.3 Statistical Tests for Long Memory . . . . . . . . . . . . . . 276

Contents vii

8.3.1 R/S Statistic . . . . . . . . . . . . . . . . . . . . . . 276

8.3.2 GPH Test . . . . . . . . . . . . . . . . . . . . . . . . 278

8.4 Estimation of Long Memory Parameter . . . . . . . . . . . 280

8.4.1 R/S Analysis . . . . . . . . . . . . . . . . . . . . . . 280

8.4.2 Periodogram Method . . . . . . . . . . . . . . . . . . 282

8.4.3 Whittle’s Method . . . . . . . . . . . . . . . . . . . . 283

8.5 Estimation of FARIMA and SEMIFAR Models . . . . . . . 284

8.5.1 Fractional ARIMA Models . . . . . . . . . . . . . . 285

8.5.2 SEMIFAR Model . . . . . . . . . . . . . . . . . . . . 292

8.6 Long Memory GARCH Models . . . . . . . . . . . . . . . . 296

8.6.1 FIGARCH and FIEGARCH Models . . . . . . . . . 296

8.6.2 Estimation of Long Memory GARCH Models . . . . 297

8.6.3 Custom Estimation of Long Memory GARCH

Models . . . . . . . . . . . . . . . . . . . . . . . . . 301

8.7 Prediction from Long Memory Models . . . . . . . . . . . . 304

8.7.1 Prediction from FARIMA/SEMIFAR Models . . . . 304

8.7.2 Prediction from FIGARCH/FIEGARCH Models . . 308

8.8 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309

9 Rolling Analysis of Time Series 313

9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 313

9.2 Rolling Descriptive Statistics . . . . . . . . . . . . . . . . . 314

9.2.1 Univariate Statistics . . . . . . . . . . . . . . . . . . 314

9.2.2 Bivariate Statistics . . . . . . . . . . . . . . . . . . . 321

9.2.3 Exponentially Weighted Moving Averages . . . . . . 323

9.2.4 Moving Average Methods for Irregularly Spaced

High Frequency Data . . . . . . . . . . . . . . . . . 327

9.2.5 Rolling Analysis of Miscellaneous Functions . . . . . 334

9.3 Technical Analysis Indicators . . . . . . . . . . . . . . . . . 337

9.3.1 Price Indicators . . . . . . . . . . . . . . . . . . . . . 338

9.3.2 Momentum Indicators and Oscillators . . . . . . . . 338

9.3.3 Volatility Indicators . . . . . . . . . . . . . . . . . . 340

9.3.4 Volume Indicators . . . . . . . . . . . . . . . . . . . 341

9.4 Rolling Regression . . . . . . . . . . . . . . . . . . . . . . . 342

9.4.1 Estimating Rolling Regressions Using the

S+FinMetrics Function rollOLS . . . . . . . . . . . 343

9.4.2 Rolling Predictions and Backtesting . . . . . . . . . 349

9.5 Rolling Analysis of General Models Using the S+FinMetrics

Function roll . . . . . . . . . . . . . . . . . . . . . . . . . . 358

9.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360

10 Systems of Regression Equations 361

10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 361

10.2 Systems of Regression Equations . . . . . . . . . . . . . . . 362

10.3 Linear Seemingly Unrelated Regressions . . . . . . . . . . . 364

viii Contents

10.3.1 Estimation . . . . . . . . . . . . . . . . . . . . . . . 364

10.3.2 Analysis of SUR Models with the S+FinMetrics

Function SUR . . . . . . . . . . . . . . . . . . . . . . 367

10.4 Nonlinear Seemingly Unrelated Regression Models . . . . . 374

10.4.1 Analysis of Nonlinear SUR Models with the

S+FinMetrics Function NLSUR . . . . . . . . . . . . 375

10.5 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382

11 Vector Autoregressive Models for Multivariate

Time Series 383

11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 383

11.2 The Stationary Vector Autoregression Model . . . . . . . . 384

11.2.1 Estimation . . . . . . . . . . . . . . . . . . . . . . . 386

11.2.2 Inference on Coefficients . . . . . . . . . . . . . . . . 388

11.2.3 Lag Length Selection . . . . . . . . . . . . . . . . . . 388

11.2.4 Estimating VAR Models Using the S+FinMetrics

Function VAR . . . . . . . . . . . . . . . . . . . . . . 388

11.3 Forecasting . . . . . . . . . . . . . . . . . . . . . . . . . . . 396

11.3.1 Traditional Forecasting Algorithm . . . . . . . . . . 396

11.3.2 Simulation-Based Forecasting . . . . . . . . . . . . . 400

11.4 Structural Analysis . . . . . . . . . . . . . . . . . . . . . . . 404

11.4.1 Granger Causality . . . . . . . . . . . . . . . . . . . 405

11.4.2 Impulse Response Functions . . . . . . . . . . . . . . 407

11.4.3 Forecast Error Variance Decompositions . . . . . . . 412

11.5 An Extended Example . . . . . . . . . . . . . . . . . . . . . 414

11.6 Bayesian Vector Autoregression . . . . . . . . . . . . . . . . 422

11.6.1 An Example of a Bayesian VAR Model . . . . . . . 422

11.6.2 Conditional Forecasts . . . . . . . . . . . . . . . . . 425

11.7 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426

12 Cointegration 429

12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 429

12.2 Spurious Regression and Cointegration . . . . . . . . . . . . 430

12.2.1 Spurious Regression . . . . . . . . . . . . . . . . . . 430

12.2.2 Cointegration . . . . . . . . . . . . . . . . . . . . . . 433

12.2.3 Cointegration and Common Trends . . . . . . . . . . 435

12.2.4 Simulating Cointegrated Systems . . . . . . . . . . . 435

12.2.5 Cointegration and Error Correction Models . . . . . 439

12.3 Residual-Based Tests for Cointegration . . . . . . . . . . . . 442

12.3.1 Testing for Cointegration When the Cointegrating

Vector Is Pre-specified . . . . . . . . . . . . . . . . . 442

12.3.2 Testing for Cointegration When the Cointegrating

Vector Is Estimated . . . . . . . . . . . . . . . . . . 445

12.4 Regression-Based Estimates of Cointegrating Vectors and

Error Correction Models . . . . . . . . . . . . . . . . . . . . 448

Contents ix

12.4.1 Least Square Estimator . . . . . . . . . . . . . . . . 448

12.4.2 Stock and Watson’s Efficient Lead/Lag Estimator . 449

12.4.3 Estimating Error Correction Models by Least

Squares . . . . . . . . . . . . . . . . . . . . . . . . . 452

12.5 VAR Models and Cointegration . . . . . . . . . . . . . . . . 453

12.5.1 The Cointegrated VAR . . . . . . . . . . . . . . . . 454

12.5.2 Johansen’s Methodology for Modeling

Cointegration . . . . . . . . . . . . . . . . . . . . . . 456

12.5.3 Specification of Deterministic Terms . . . . . . . . . 457

12.5.4 Likelihood Ratio Tests for the Number of

Cointegrating Vectors . . . . . . . . . . . . . . . . . 459

12.5.5 Testing Hypothesis on Cointegrating Vectors

Using the S+FinMetrics Function coint . . . . . . 461

12.5.6 Maximum Likelihood Estimation of the

Cointegrated VECM . . . . . . . . . . . . . . . . . . 465

12.5.7 Maximum Likelihood Estimation of the

Cointegrated VECM Using the S+FinMetrics

Function VECM . . . . . . . . . . . . . . . . . . . . . 466

12.5.8 Forecasting from the VECM . . . . . . . . . . . . . 472

12.6 Appendix: Maximum Likelihood Estimation of a

Cointegrated VECM . . . . . . . . . . . . . . . . . . . . . . 474

12.7 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476

13 Multivariate GARCH Modeling 479

13.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 479

13.2 Exponentially Weighted Covariance Estimate . . . . . . . . 480

13.3 Diagonal VEC Model . . . . . . . . . . . . . . . . . . . . . . 484

13.4 Multivariate GARCH Modeling in S+FinMetrics . . . . . . 485

13.4.1 Multivariate GARCH Model Estimation . . . . . . . 485

13.4.2 Multivariate GARCH Model Diagnostics . . . . . . . 488

13.5 Multivariate GARCH Model Extensions . . . . . . . . . . . 494

13.5.1 Matrix-Diagonal Models . . . . . . . . . . . . . . . . 494

13.5.2 BEKK Models . . . . . . . . . . . . . . . . . . . . . 496

13.5.3 Univariate GARCH-based Models . . . . . . . . . . 497

13.5.4 ARMA Terms and Exogenous Variables . . . . . . . 502

13.5.5 Multivariate Conditional t-Distribution . . . . . . . 506

13.6 Multivariate GARCH Prediction . . . . . . . . . . . . . . . 507

13.7 Custom Estimation of GARCH Models . . . . . . . . . . . . 510

13.7.1 GARCH Model Objects . . . . . . . . . . . . . . . . 510

13.7.2 Revision of GARCH Model Estimation . . . . . . . . 512

13.8 Multivariate GARCH Model Simulation . . . . . . . . . . . 513

13.9 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515

14 State Space Models 517

14.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 517

x Contents

14.2 State Space Representation . . . . . . . . . . . . . . . . . . 518

14.2.1 Initial Conditions . . . . . . . . . . . . . . . . . . . . 519

14.2.2 State Space Representation in

S+FinMetrics/SsfPack . . . . . . . . . . . . . . . . 519

14.2.3 Missing Values . . . . . . . . . . . . . . . . . . . . . 525

14.2.4 S+FinMetrics/SsfPack Functions for Specifying

the State Space Form for Some Common Time

Series Models . . . . . . . . . . . . . . . . . . . . . . 526

14.2.5 Simulating Observations from the State

Space Model . . . . . . . . . . . . . . . . . . . . . . 538

14.3 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . 541

14.3.1 Kalman Filter . . . . . . . . . . . . . . . . . . . . . . 541

14.3.2 Kalman Smoother . . . . . . . . . . . . . . . . . . . 541

14.3.3 Smoothed State and Response Estimates . . . . . . 542

14.3.4 Smoothed Disturbance Estimates . . . . . . . . . . . 542

14.3.5 Forecasting . . . . . . . . . . . . . . . . . . . . . . . 542

14.3.6 S+FinMetrics/SsfPack Implementation of State

Space Modeling Algorithms . . . . . . . . . . . . . . 543

14.4 Estimation of State Space Models . . . . . . . . . . . . . . . 550

14.4.1 Prediction Error Decomposition of

Log-Likelihood . . . . . . . . . . . . . . . . . . . . . 550

14.4.2 Fitting State Space Models Using the

S+FinMetrics/SsfPack Function SsfFit . . . . . . 552

14.4.3 Quasi-Maximum Likelihood Estimation . . . . . . . 559

14.5 Simulation Smoothing . . . . . . . . . . . . . . . . . . . . . 563

14.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564

15 Factor Models for Asset Returns 567

15.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 567

15.2 Factor Model Specification . . . . . . . . . . . . . . . . . . . 568

15.3 Macroeconomic Factor Models for Returns . . . . . . . . . . 569

15.3.1 Sharpe’s Single Index Model . . . . . . . . . . . . . 570

15.3.2 The General Multifactor Model . . . . . . . . . . . . 575

15.4 Fundamental Factor Model . . . . . . . . . . . . . . . . . . 578

15.4.1 BARRA-type Single Factor Model . . . . . . . . . . 579

15.4.2 BARRA-type Industry Factor Model . . . . . . . . . 580

15.5 Statistical Factor Models for Returns . . . . . . . . . . . . . 588

15.5.1 Factor Analysis . . . . . . . . . . . . . . . . . . . . . 588

15.5.2 Principal Components . . . . . . . . . . . . . . . . . 595

15.5.3 Asymptotic Principal Components . . . . . . . . . . 604

15.5.4 Determining the Number of Factors . . . . . . . . . 608

15.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612

16 Term Structure of Interest Rates 615

16.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 615

Contents xi

16.2 Discount, Spot and Forward Rates . . . . . . . . . . . . . . 616

16.2.1 Definitions and Rate Conversion . . . . . . . . . . . 616

16.2.2 Rate Conversion in S+FinMetrics . . . . . . . . . . 617

16.3 Quadratic and Cubic Spline Interpolation . . . . . . . . . . 618

16.4 Smoothing Spline Interpolation . . . . . . . . . . . . . . . . 622

16.5 Nelson-Siegel Function . . . . . . . . . . . . . . . . . . . . . 626

16.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . 630

16.7 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631

17 Robust Change Detection 633

17.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 633

17.2 REGARIMA Models . . . . . . . . . . . . . . . . . . . . . . 634

17.3 Robust Fitting of REGARIMA Models . . . . . . . . . . . . 635

17.4 Prediction Using REGARIMA Models . . . . . . . . . . . . 640

17.5 Controlling Robust Fitting of REGARIMA Models . . . . . 641

17.5.1 Adding Seasonal Effects . . . . . . . . . . . . . . . . 641

17.5.2 Controlling Outlier Detection . . . . . . . . . . . . . 643

17.5.3 Iterating the Procedure . . . . . . . . . . . . . . . . 645

17.6 Algorithms of Filtered τ-Estimation . . . . . . . . . . . . . 647

17.6.1 Classical Maximum Likelihood Estimates . . . . . . 648

17.6.2 Filtered τ -Estimates . . . . . . . . . . . . . . . . . . 649

17.7 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649

18 Nonlinear Time Series Models 651

18.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 651

18.2 BDS Test for Nonlinearity . . . . . . . . . . . . . . . . . . . 652

18.2.1 BDS Test Statistic . . . . . . . . . . . . . . . . . . . 653

18.2.2 Size of BDS Test . . . . . . . . . . . . . . . . . . . . 653

18.2.3 BDS Test As a Nonlinearity Test and a Mis-specification

Test . . . . . . . . . . . . . . . . . . . . . . . . . . . 655

18.3 Threshold Autoregressive Models . . . . . . . . . . . . . . . 660

18.3.1 TAR and SETAR Models . . . . . . . . . . . . . . . 661

18.3.2 Tsay’s Approach . . . . . . . . . . . . . . . . . . . . 662

18.3.3 Hansen’s Approach . . . . . . . . . . . . . . . . . . . 669

18.4 Smooth Transition Autoregressive Models . . . . . . . . . . 676

18.4.1 Logistic and Exponential STAR Models . . . . . . . 676

18.4.2 Test for STAR Nonlinearity . . . . . . . . . . . . . . 678

18.4.3 Estimation of STAR Models . . . . . . . . . . . . . . 681

18.5 Markov Switching State Space Models . . . . . . . . . . . . 685

18.5.1 Discrete State Markov Process . . . . . . . . . . . . 686

18.5.2 Markov Switching AR Process . . . . . . . . . . . . 688

18.5.3 Markov Switching State Space Models . . . . . . . . 689

18.6 An Extended Example: Markov Switching Coincident Index 699

18.6.1 State Space Representation of Markov Switching Co￾incident Index Model . . . . . . . . . . . . . . . . . . 700

xii Contents

18.6.2 Approximate MLE of Markov Switching Coincident

Index . . . . . . . . . . . . . . . . . . . . . . . . . . 703

18.7 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707

19 Copulas 711

19.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 711

19.2 Motivating Example . . . . . . . . . . . . . . . . . . . . . . 712

19.3 Definitions and Basic Properties of Copulas . . . . . . . . . 720

19.3.1 Properties of Distributions . . . . . . . . . . . . . . 720

19.3.2 Copulas and Sklar’s Theorem . . . . . . . . . . . . . 722

19.3.3 Dependence Measures and Copulas . . . . . . . . . . 724

19.4 Parametric Copula Classes and Families . . . . . . . . . . . 727

19.4.1 Normal Copula . . . . . . . . . . . . . . . . . . . . . 727

19.4.2 Normal Mixture Copula . . . . . . . . . . . . . . . . 728

19.4.3 Extreme Value Copula Class . . . . . . . . . . . . . 728

19.4.4 Archimedean Copulas . . . . . . . . . . . . . . . . . 730

19.4.5 Archimax Copulas . . . . . . . . . . . . . . . . . . . 733

19.4.6 Representation of Copulas in S+FinMetrics . . . . . 733

19.4.7 Creating Arbitrary Bivariate Distributions . . . . . . 741

19.4.8 Simulating from Arbitrary Bivariate Distributions . 743

19.5 Fitting Copulas to Data . . . . . . . . . . . . . . . . . . . . 745

19.5.1 Empirical Copula . . . . . . . . . . . . . . . . . . . . 745

19.5.2 Maximum Likelihood Estimation . . . . . . . . . . . 748

19.5.3 Fitting Copulas Using the S+FinMetrics/EVANESCE

function fit.copula . . . . . . . . . . . . . . . . . . 749

19.6 Risk Management Using Copulas . . . . . . . . . . . . . . . 752

19.6.1 Computing Portfolio Risk Measures Using Copulas . 752

19.7 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754

20 Continuous-Time Models for Financial Time Series 757

20.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 757

20.2 SDEs — Background . . . . . . . . . . . . . . . . . . . . . . 758

20.3 Approximating solutions to SDEs . . . . . . . . . . . . . . . 759

20.4 S+FinMetrics functions for solving SDEs . . . . . . . . . . 763

20.4.1 Problem-specific simulators . . . . . . . . . . . . . . 763

20.4.2 General simulators . . . . . . . . . . . . . . . . . . . 769

20.5 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780

21 Generalized Method of Moments 783

21.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 783

21.2 Single Equation Linear GMM . . . . . . . . . . . . . . . . . 784

21.2.1 Definition of the GMM Estimator . . . . . . . . . . 785

21.3 Estimation of S . . . . . . . . . . . . . . . . . . . . . . . . . 791

21.3.1 Serially Uncorrelated Moments . . . . . . . . . . . . 791

21.3.2 Serially Correlated Moments . . . . . . . . . . . . . 792

Contents xiii

21.3.3 Estimating S Using the S+FinMetrics Function var.hac794

21.4 GMM Estimation Using the S+FinMetrics Function GMM . 795

21.5 Hypothesis Testing for Linear Models . . . . . . . . . . . . 806

21.5.1 Testing Restrictions on Coefficients . . . . . . . . . . 806

21.5.2 Testing Subsets of Orthogonality Conditions . . . . 809

21.5.3 Testing Instrument Relevance . . . . . . . . . . . . . 811

21.6 Nonlinear GMM . . . . . . . . . . . . . . . . . . . . . . . . 814

21.6.1 Asymptotic Properties . . . . . . . . . . . . . . . . . 815

21.6.2 Hypothesis Tests for Nonlinear Models . . . . . . . . 816

21.7 Examples of Nonlinear Models . . . . . . . . . . . . . . . . 817

21.7.1 Student-t Distribution . . . . . . . . . . . . . . . . . 817

21.7.2 MA(1) Model . . . . . . . . . . . . . . . . . . . . . . 819

21.7.3 Euler Equation Asset Pricing Model . . . . . . . . . 825

21.7.4 Stochastic Volatility Model . . . . . . . . . . . . . . 830

21.7.5 Interest Rate Diffusion Model . . . . . . . . . . . . . 835

21.8 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840

22 Semi-Nonparametric Conditional Density Models 845

22.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 845

22.2 Overview of SNP Methodology . . . . . . . . . . . . . . . . 846

22.3 Estimating SNP Models in S+FinMetrics . . . . . . . . . . 849

22.3.1 Example Data . . . . . . . . . . . . . . . . . . . . . 851

22.3.2 Markovian Time Series and the Gaussian Vector Au￾toregression Model . . . . . . . . . . . . . . . . . . . 853

22.3.3 Hermite Expansion and the Semiparametric VAR . . 858

22.3.4 Conditional Heterogeneity . . . . . . . . . . . . . . . 866

22.3.5 ARCH/GARCH Leading Term . . . . . . . . . . . . 871

22.4 SNP Model Selection . . . . . . . . . . . . . . . . . . . . . . 877

22.4.1 Random Restarts . . . . . . . . . . . . . . . . . . . . 879

22.4.2 The expand Function . . . . . . . . . . . . . . . . . 884

22.4.3 The SNP.auto Function . . . . . . . . . . . . . . . . 887

22.5 SNP Model Diagnostics . . . . . . . . . . . . . . . . . . . . 889

22.5.1 Residual Analysis . . . . . . . . . . . . . . . . . . . . 889

22.5.2 Simulation . . . . . . . . . . . . . . . . . . . . . . . 893

22.6 Prediction from an SNP Model . . . . . . . . . . . . . . . . 895

22.7 Data Transformations . . . . . . . . . . . . . . . . . . . . . 896

22.7.1 Centering and Scaling Transformation . . . . . . . . 897

22.7.2 Transformations to deal with Heavy Tailed Data . . 899

22.7.3 Transformation to Deal with Small SNP Density Values901

22.8 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 902

22.8.1 SNP Models for Daily Returns on Microsoft Stock . 902

22.8.2 SNP Models for Daily Returns on S&P 500 Index . 907

22.8.3 SNP Models for Weekly 3-Month U.S. T-Bill Rates . 913

22.9 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917

xiv Contents

23 Efficient Method of Moments 921

23.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 921

23.2 An Overview of the EMM Methodology . . . . . . . . . . . 923

23.2.1 Continuous Time Stochastic Volatility Model for In￾terest Rates . . . . . . . . . . . . . . . . . . . . . . . 923

23.2.2 Minimum Chi-Squared Estimators . . . . . . . . . . 926

23.2.3 Efficiency Considerations . . . . . . . . . . . . . . . 928

23.2.4 A General Purpose Auxiliary Model . . . . . . . . . 933

23.2.5 The Projection Step . . . . . . . . . . . . . . . . . . 933

23.2.6 The Estimation Step . . . . . . . . . . . . . . . . . . 934

23.3 EMM Estimation in S+FinMetrics . . . . . . . . . . . . . . 936

23.3.1 Simulator Functions . . . . . . . . . . . . . . . . . . 938

23.3.2 SNP Auxiliary Model Estimation . . . . . . . . . . . 941

23.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 941

23.4.1 MA(1) Model . . . . . . . . . . . . . . . . . . . . . . 942

23.4.2 Discrete Time Stochastic Volatility Models . . . . . 952

23.4.3 Interest Rate Diffusion Models . . . . . . . . . . . . 964

23.5 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 983

Index 989

Tải ngay đi em, còn do dự, trời tối mất!