CQF Exam3
CQF Exam3
CQF Exam3
Machine Learning
Instructions: The submitted report must present work and outputs clearly separated by Question. Submit ONLY
ONE zip file named LASTNAME.zip that includes pdf file, code, html, data and any other supporting or working
files. Python notebook with auxiliary output (data, plots) is not an analytical report: such submission will
receive a deduction.
Please do not discuss this assignment in groups or messengers. Address all portal and upload queries to
[email protected] and clarifying only questions to [email protected].
Introduction: Short-term asset return is a challenging quantity to predict. Efficient markets produce near-
Normal daily returns with no significant correlation between rt , rt−1 . This exam is a limited exercise in
supervised learning: use a set of features from Table 1 without an expectation of predictive powers.
https://powcoder.com
classification: dependent variable is best labelled [0, 1]. Avoid using [-1, 1] as class labels.
Devise your own approach on how to categorise extremely small near-zero returns (drop from training
sample, group with positive/negative). The threshold will strongly depend on your ticker.
Example: small positive returns below 0.25% can be labelled as negative.
Add WeChat powcoder
Table 1: Features List
Feature Formula Description
O-C, H-L Open - Close, High - Low intraday price range
Sign sign [rt = ln PPt−1 t
] sign of return or momentum
Past Returns rt−1 , rt−2 , . . . lagged returns
Momentum Pt − Pt−k price change over k period
Pn−1
Moving Average SM Ai = n1 i=0 Pt−i simple moving average
Exponential MA EM Ai = EM At−1 + α[Pt − EM At−1 ] recursive, α = 2/(Nobs + 1)
Number of features to include is a design choice. There is no one recommended set of features for all assets.
Length of dataset is another design choice. If predicting short-term return sign (for daily move), then training
and testing over up to 5-year period should be sufficient. Making sense of instructions below is part of the task:
the tutor will not assist in designing your computational implementation.
1
A. Maths
1. Consider MSE(β̂) wrt to the true value β in context of regression methods,
h i 2
E (β̂ − β)2 = V ar[β̂] + E[β̂] − β
Answer below with Yes/No and one sentence of explanation referring to maths.
(a) can there exist an estimator with the smaller MSE than minimal least squares?
(b) for a prediction, does the MSE measure an irreducible error or model error?
||x −x ||2
2. Gaussian RBF kernel is given as k (xi , xj ) = exp − i 2σ j . Suppose we have three points, z1 , z2 and x;
where z1 is geometrically very close to x, and z2 is geometrically far away from x. What is the value of k (z1 , x)
and k (z2 , x)? Choose the correct answer below and explain it with reasoning.
∗∗∗