Introduction
Lectures
Assignments
Projects
Tutorials
Data
Important: If you struggle with any part of this assignments, raise an issue in the repo.
Read Chapter 29 of this notes for an accessible intro to OOP in Python.
Consider the following state space model.
and the following parameters (\(\mu, \sigma_{\eta}, \sigma_{\epsilon}, \phi_1, \phi_2, \sigma_{\eta \epsilon}\))
a) Find a state space representation for \(z_t = \Delta y_t\) with a stationary state vector \(x_t\). Use the notation here. Use \(d\) for the intercept in the observation equation (This term is missing in the representation in the link, you can think of \(z\) being de-meaned: \(z_t = \bar{z}_t - d\))
b) Write a python function which takes values for the model parameters as input and returns the matrices of the state space representation as output.
c) Construct the covariance matrix of the marginal distribution of \(X\) for T=2 (the following image is from the lecture notes, see there for more details)
d) Construct the mean vector and covariance matrix of the marginal distribution of \(Z\) for T=2 (the following image is from the lecture notes, see there for more details)
e) Write a function which takes model parameter values and a sample size T as inputs and returns the mean vector and covariance matrix of the marginal distribution of \(Z\). (See HW4)
f) Draw a sample from the distribution of \(Z\) for T=100 and compute the log-likelihood of \(Z\). (See HW3)
Submit as a jupyter notebook in the folder HW10 in your repository at https://github.com/PhDEcon108.
previous
Homework 9
next
Midterm project