Solutions are posted after the class that covers the assignment has completed. Solutions are available both as MATLAB Live Scripts, which provide an integrated view of code, text and mathematics and generic m-file scripts. Live Scripts are only usable in recent versions of MATLAB.
MATLAB Notes¶
A complete set of notes covering the core aspects of MATLAB used in econometric analysis serves as a reference for the companion course.
Introduction¶
MATLAB Introduction Course Data
Introduction Solutions¶
Companion Course¶
MATLAB Companion Course (Complete)
Michaelmas Solutions¶
Data and Simulation¶
MATLAB Live Script (mlx) | MATLAB Script (m) |
---|---|
Data Set Construction | Data Set Construction |
Simulation | Simulation |
Expectations | Expectations |
Estimation and Inference¶
MATLAB Live Script (mlx) | MATLAB Script (m) |
---|---|
Method of Moments | Method of Moments |
Maximum Likelihood | Maximum Likelihood |
Bias and Standard Errors | Bias and Standard Errors |
Linear Regression¶
Support Files¶
- Specific-to-General
- General-to-Specific
- K-fold Cross Validation
- Simulated Data Generation
- Information Criteria Calculation
Hilary Solutions¶
Data¶
MATLAB Live Script (mlx) | MATLAB Script (m) |
---|---|
Data Set Construction | Data Set Construction |
ARMA Models¶
MATLAB Live Script (mlx) | MATLAB Script (m) |
---|---|
ARMA Model Estimation | ARMA Model Estimation |
ARMA Model Selection | ARMA Model Selection |
ARMA Diagnostics | ARMA Diagnostics |
ARMA Forecasting | ARMA Forecasting |
Unit Root Testing | Unit Root Testing |
ARCH Models¶
MATLAB Live Script (mlx) | MATLAB Script (m) |
---|---|
ARCH Model Estimation | ARCH Model Estimation |
ARCH Model Selection | ARCH Model Selection |
ARCH Model Forecasting | ARCH Model Forecasting |
Value-at-Risk¶
MATLAB Live Script (mlx) | MATLAB Script (m) |
---|---|
Value-at-Risk using Historical Simulation | Value-at-Risk using Historical Simulation |
Value-at-Risk using Filtered HS | Value-at-Risk using Filtered HS |
Value-at-Risk Evaluation | Value-at-Risk Evaluation |
Vector Autoregressions¶
Helper Function¶
Data Set Construction¶
Expectations¶
Maximum Likelihood¶
- Standardized T Log-likelihood (degree of freedom only)
- Standardized T Log-likelihood for unconstrained optimization
- Standardized T Log-likelihood with mean and variance for unconstrained optimization
- Probit Log-likelihood
- OLS Function
Data Files (Raw)¶
Data Files (mat)¶
Hilary¶
- S&P 500 (FRED)
- Core CPI (FRED)
- Term Premium (FRED)
- Default Premium (FRED)
- Government yields and GDF Deflator Data
- CAY cointegration data