Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Data Science & Machine Learning in Finance (ACCFIN5246)

Assignment 1 – Spring 2022


Question 1   Propose a real-world financial scenario that can be formulated and examined with a linear regression specification.

(1.1)  Briefly explain the setting. Create a table to define the financial outcome of interest (y) and

three explanatory variables {z1 , z2 , z3 } that drive the outcome variable.  (5%)

(1.2)  State the specification and explain why this formulation you propose is appropriate to this

setting.  (5%)

(1.3)  Provide a complete financial interpretation for each parameter.  (5%)

(1.4)  Propose an empirical set-up where the relationship from one of the three aforementioned

explanatory variables in (1.1) to the outcome is one-directional.  (10%)

Question 2   Consider the capital asset pricing model characterised by the following specification used to interrelate real excess return, on a given asset ut  - uf,t  where uf,t  is the risk-free rate, to the market real return denoted by um,t :

 

ut - uf,t

=

aw + 8w (  uM,t - uf,t    ) +  ot

(1)

`       

 

`           

 

risk premium

 

market premium

 

note that the object of interest is the time-varying feature of the coefficients  w   and w .   In particular, w   summarizes the conditional relationship, given a rolling window incorporating a consecutive but limited span of data, between the market risk premium uM,t - uf,t  and the excess return.  The diagram below provides a visual illustration to describe overlapping windows that include 12-consecutive monthly data. You are required to obtain data for the variables needed to

construct and estimate the model, in particular, the data should cover the period 3}}}-})-3}33-}), on a daily basis further described as below:



Jan    Feb    Mar    Apr    May    Jun     Jul    Aug    Sep    Oct    Nov    Dec    Jan    Feb    Mar     . . . 

 

`        ...`        ......`        .........`                    1      2      3      4                                                    

 

— You can use the US consumer price index to transform nominal data into real terms.  This

data can be acquired from several sources, including the Federal Reserve Economic Data (FRED) at (https://fred.stlouisfed.org/).

—  (ut ) real returns, associated Apple stock which can be acquired from several sources.  The  Wharton Research platform (WRDS) provides this price data at https://wrds-www.wharton . upenn.edu/.1

—  (uM,t ) real returns, associated with US equity market described by the S&P500 composite

market index.  You can use either the price or return data according to your setting (i.e. locally transform prices to returns).

—  (uf,t ) real returns, associated with US treasuries (10-years maturities) — this can be acquired from WRDS or FRED (https://fred.stlouisfed.org/).

Based on the data you acquire and the specification above, complete parts (2.1)-(2.4):

 

(2.1)  Briefly explain how you construct real excess return ut - uf,t  and real market excess returns uM,t -uf,t . Construct average returns over the indicated time span in the table below.  (10%)

 

 

Average Nominal Returns

Average Real Excess Returns

A

7t

7M,t

7f,t

7t   7f,t

7M,t   7f,t

2000/01-2014/12

 

 

 

 

 

2015/01-2019/12

 

 

 

 

 

2020/01-2021/12

 

 

 

 

 

 

Implement a code to estimate specification (1), as a rolling window.  Store all values obtained for aw , 8w , their standard errors, their associated p-values and each regression’s iw(2)-statistic.

(2.2)  Construct three diagrams:  (i) estimated w  per window over time,  (ii) estimated w  per

window over time, and regressions iw(2)  per window over time.  (10%)

(2.3)  Construct the following two indicators:

Ⅱ /w    =    

Ⅱ /w    =    

Depict Ⅱ/w and Ⅱ/w on two separate diagrams.  Comment how these indicators inform about interpretability of the estimation results.  (10%)

(2.4)  Construct a table to summarise the following five components: the number of windows you obtained, the average values for w  and w  aggregated across all windows, and aggregated values     w Ⅱ /wand     w Ⅱ /w.  (10%)

All constructed diagrams must be clearly labelled (each axis to show the variable represented and

its unit).

 


#Windows  

Nw

 

w Ⅱ /w

 

Question 3   The notion of liquidity in finance is defined by an asset price response to traded quantities.   More specifically,  a liquid asset price exhibits minor changes as a result of major traded quantities, whereas an illiquid asset price exhibits major changes to minor-moderate trade quantities.  Consider estimating the elasticity of demand for a particular publicly traded asset A denoted by ri(d)  = a0  + a1gi  + oi  where gi  = ln Pi , Pi  is the actual price, and ri(d)  = ln ○i(d)  with ○i(d)  denoting the quantity of shares demanded by investors, and that each p = 1, . . . , N represents a quantity-price pair (ri(d), gi ).  Note that the quantities demanded ri(d)  characterise willingness to purchase, given all possible prices gi , which is not directly observable in financial market datasets. The term oi  represents other factors besides price that affect demand, such as investors wealth, personal valuation, etc.   The market’s existing outstanding supply of shares equation is in the same form, and is given by ri(s)   = 80  + 81gi  + ui  where the term ui  represents the factors that affect supply, such as underlying company’s performance, sales, access to financing, union status, etc.   Assume first, that the two error terms are uncorrelated, and second that the equilibrium condition ri(d)  = ri(s)  = ri  holds indicating that observed quantities collect both demand and supply

sides characteristics, then:

(3.1)  Derive the the reduce form system in terms of gi  and ri . This indicates setting ri(d)  = ri(s)  = ri and solving the demand and supply equations for pair (ri , gi ) explicitly as functions of all other parameters included in the two equations (a0 , a1 , 80 , 81 , oi , ui ).  (10%)

(3.2) In relation to explicit expressions obtained in (3.1) for gi  and ri , what are the terms var(gi ), var(ri ) and cov(gi , ri ) — simplify as much as possible.  (10%)

(3.3)  Show that the ordinary least squares estimator resulting from the regression of ri  on gi  is

biased for both structural parameters a1  and 81 .  (15%)