CQF Exam3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

CQF Exam Three

Machine Learning

June 2022 Cohort

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.

Assignment Project Exam Help


• Choose one ticker of your interest from: equity, ETF, crypto token, or commodity. Do not choose: FX
tickers (GBPUSD), equities with market cap over 100 bln. USD.
• Predict trend only, for a short-term return (example: daily, 6 hours). Limit prediction to binomial

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.

(a) k (z1 , x) will be close to 1 and k (z2 , x) will be close to 0.


(b) k (z1 , x) will be close to 0 and k (z2 , x) will be close to 1.

3. Mathematically specify three types of Loss Function for decision trees.

B. Models Assignment Project Exam Help


4. Follow the 7-steps to model building for your selected ticker,
(a) produce a model to predict positive moves (up trend) using Support Vector Machines.
https://powcoder.com
(b) tune hyperparameters for the estimator and present the best model.
(c) investigate the prediction quality using area under ROC curve, confusion matrix and classification report.

Add WeChat powcoder


Note: Choice of kernels and number of hyperparameters to be optimized for the best model are design choices.
Use of experiment tracking tools like MLFlow is allowed [refer to Advanced Machine Learning Workshop - II
for sample implementation].

∗∗∗

You might also like