Linear Regression Basics II Fin250f: Lecture 7.1 Spring 2010 Brooks, chapter ,3.7, 3.8
Outline Matrix introduction Multivariate linear model Standard errors Matlab OLS function What’s a big sample? Data mining Goodness of fit
Matrices (Appendix A5)
Matrices
Even More Matrices: Transpose
Multivariate Linear Model
Least Square Solution
Matlab Code OLS function (ols.m) Setting up CRSP data (ccrspmat.m) Example: Estimating CAPM beta rollingcapm.m Example: Simple return forecast simpleretfcast.m Example: Monday returns? monday.m
What’s a Large Sample? Asymptotic results T goes to infinity When are these results valid? Depends Complexity/stationarity of data Complexity of model
Data Snooping (see 3.7) For finite data can always find something positive Significant beta Accurate forecasts Profitable trades “In sample bias” “mclinearsnoop.m” Snooping versus Mining
Goodness of Fit and other Objectives How good is a “fit” or a forecast? Basic objective function
Various Measures
Traditional: R-squared (R^2)
R^2 Good Easy and intuitive Bad Not well defined statistically Always improves with more parameters (See adjusted R^2) Can often be high when there are time trends Not well defined objective