0% found this document useful (0 votes)
15 views

Python Exercise Set 320170509165948

This document provides an outline for the course "Financial Econometrics and Empirical Finance II" and includes instructions for completing various assignments in Python related to simultaneous equations models, vector autoregression and cointegration, GARCH modeling with leverage effects, quantile-quantile plots, and dynamic conditional correlations. Students are asked to estimate models, perform statistical tests, plot graphs, and compute financial metrics like value at risk. Hints for completing the tasks in Python are provided.

Uploaded by

srinivas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Python Exercise Set 320170509165948

This document provides an outline for the course "Financial Econometrics and Empirical Finance II" and includes instructions for completing various assignments in Python related to simultaneous equations models, vector autoregression and cointegration, GARCH modeling with leverage effects, quantile-quantile plots, and dynamic conditional correlations. Students are asked to estimate models, perform statistical tests, plot graphs, and compute financial metrics like value at risk. Hints for completing the tasks in Python are provided.

Uploaded by

srinivas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

MSc.

Finance/CLEFIN
2016/2017 Edition

Financial Econometrics and Empirical Finance II

Daniel Toppo, Pictet Asset Management


Simultaneous Equations
Consider the following model

and its reduced form

1) Computed and tabulate summary statistics for all the series

Hints in Python:
Use the scipy library to calculate descriptive statistics
Use the statsmodels.formula.api.ols module to estimate the regression

VAR & Cointegration with Trend


1) Test whether the variables are stationary. Please consider intercept and trend terms when
performing the ADF test (1 lag). Please note that you have to use 2 lags in the HW.
Please use as an ADF critical value -3.42 (5% test size interval) or -3.98 (1% test size interval).

2) Test for cointegration (à la Granger, see Brooks, or sample homework posted on class web
site).
Please use for the cointegration test, -4 as 1% test size critical value for the model with no
intercept and -3.37 for the 5% test.

Hints in Python:
Use the statsmodels.formula.api.ols module to estimate the regression
GARCH with Leverage
1) Estimate a GARCH (1, 1) model with leverage effects (of NAGARCH type) on Spanish stock
returns using maximum likelihood estimation (MLE). Set the variance of the first observation
to be equal to the unconditional sample variance of the data.

2) Plot sample autocorrelation coefficients at lags 1 through 100 for squared (𝑅𝑡2 ) as well as
squared standardized (𝑅𝑡2 /𝜎𝑡2 ) returns and compare the two.

3) Estimate a regression of daily squared returns on the variance forecasts from the GARCH
model with leverage (use the results from Question 1). Include a constant in the regression

Hints in Python:
Use the scipy.optimize module to maximize the Log Likelihood function.
QQ Plots
1) Construct a QQ plot for Spanish stock returns divided by the unconditional standard
deviation. Please use the normal distribution as the benchmark, theoretical distribution.
2) Using the conditional variance estimated obtained from the "GARCH with Leverage" part,
standardize the Italian equity returns. Construct a QQ plot for the standardized returns using
the normal distribution as a benchmark.
Hints in Python:
Use the scipy.stats.norm.ppf function to calculate the standard normal quantiles.
Use the matplotlib.pyplot module to plot graphs.

Dynamic Conditional Correlations


1) Compute the unconditional sample covariance and correlation for the equity index return
series of Spain and Sweden.
2) Calculate the unconditional 1-month, 1% Value-at-Risk for a portfolio consisting of 50%
invested in each market. Calculate also the 1-month, 1% Value-at-Risk for each asset
individually. Use the normal distribution. Compare the portfolio VaR with the sum of
individual VaRs. What can you note? Why are they not the same?
3) Estimate a separate NAGARCH(1,1) model for each of the equity return series. Standardize
each return using the implied (filtered) NAGARCH standard deviation.
4) Use QMLE to estimate the exponential smoother version of the dynamic conditional
correlation (DCC) model for the two equity markets. Set the starting value of λ at 0.94.

Hints in Python:
Use the numpy module to calculate covariance and correlation values.
Use the scipy.optimize module to maximize the Log Likelihood function.
Use the scipy.stats.norm.ppf function to calculate the standard normal quantiles.

You might also like