# CS计算机代考程序代写 finance Excel Assignment 1

Assignment 1
Empirical Finance: Methods and Applications February 13, 2021
• Datasets for problems 4, 5, and 6 are available on insendi.
• You should submit a single pdf solution containing answers to all sub-parts of all problems (including
4-7). Typewritten solutions are preferred but handwritten and scanned solutions are acceptable.
• Marks for each problem are listed below.
• In addition, please submit code for problems 4-7 in the form of an R project. This should be a zipped folder that contains an R Project, a single R file with answers to all relevant parts of all problems, and all csv files (including those for 4-6 and any you download for problem 7). I should be able to download and run your R file directly. Please comment your code to make it as easy to interpret as possible.
• Your marks depend on clarity of exposition in solutions and code. This includes figures and regression results.
• You may discuss all problems with classmates but each student must independently write and submit their own solution. Solutions and code that have been clearly copied will cause the full assignment to receive 0 marks and may invite further disciplinary action.
Problem 1 (5 marks)
Suppose we see 5 observations of yi, Di, shown in the table below:
Consider the following linear model:
yi Di 10 81 41 00 31
yi = δ0 + δ1Di + vi.
Suppose we estimate this model on the data above via OLS. Please explicitly find δˆOLS and δˆOLS. 01
Solution: δ0 = 0.5, δ1 = 4.5.
1

Problem 2 (10 Marks)
Relative to the United Kingdom, the United States has borrower friendly laws surrounding residential mort- gage default. Many US states are Non-Recourse—that is, if borrowers stop making the mortgage payments, lenders cannot hold them responsible beyond seizing the home itself. On the other hand, the United King- dom has Full-Recourse: lenders may seize cars, investments, garnish wages, et cetera. Many believe that the relative leniency of laws in the United States is responsible for higher rates of mortgage default.
For the sake of simplicity, assume laws may take only two forms: Non-Recourse (in the United States) or Full-Recourse (in the United Kingdom). Imagine we are interested in the causal (treatment) effect of Non-Recourse laws on mortgage default.
(a) Denote mortgage default for a borrower i by Di. In potential outcomes notation, write the average treatment effect of Non-Recourse laws on default. (3 marks)
Solution: Define Di1 to be the potential outcome for borrower i in the presence of Non-Recourse laws. Define Di0 to be the potential outcome for borrower i under Full-Recourse laws. The average treatment effect is defined to be:
ATE = E[Di1 − Di0]
(b) Suppose we compare the average default rates in the United States to the average default rates in the
United Kingdom. Write this comparison in potential outcomes notation. (3 marks) Solution:
E[Di1|Borrower i in US] − [Di0|Borrower i in UK]
(c) Why does the expression in part (a) differ from that in part (b)? Please provide an explanation that is not simply mathematical, but that provides some intuition. Would you expect the answer in (b) to be higher or lower than that in (a)? Why? (4 marks)
Solution: There are many ways to describe why the expression in (a) and (b) might be different. One way is to break the above into two components:
E[Di1|Borrower i in US] − [Di0|Borrower i in UK] = E[Di1|Borrower i in US] − E[Di0|Borrower i in US] 􏰐 􏰏􏰎 􏰑
Effect of Non-Recourse in US
+ E[Di0|Borrower i in US] − [Di0|Borrower i in UK]
􏰐 􏰏􏰎 􏰑
Difference in Default in US vs. UK under Full-Recourse ̸= E[Di1 − Di0]
The first term is often referred to as the treatment effect on the treated, and captures the fact that recourse laws might impact borrowers in the US differently than the UK (perhaps because of other regulatory differences or personality types). The second term is often referred to as the selection effect, and captures the fact that borrowers in different countries might have differences in default behavior, even in the absence of any difference in bankruptcy laws.
In general, cogent arguments that (a) is higher or lower than (b) can be made. The important part is to directly tie it to the framing. One example is that borrowers in the US may be less concerned with the social stigma surrounding default than those in the UK. This might be evidence for for the existence of a selection effect:
E[Di0|Borrower i in US] − [Di0|Borrower i in UK] > 0 which would cause (b) to be higher than (a).
2

Problem 3 (10 marks)
Suppose the relationship between yi and xi is as follows:
yi = β0 + β1xi + vi,
where xi is observable, E[vi|xi] = 0 and E[xi] = 0. However, suppose we do not see yi, but instead observe
yi∗ = yi + ηi. Consider the regression:
You may assume that ηi has mean 0 and variance ση2.
y i∗ = β 0 + β 1 x i + u i ,
(a) Suppose that Cov(x , η ) = 0. Will the OLS estimator βols using y∗ instead of y be biased for β ? Show
ii1ii1 why or why not. (5 marks)
Solution:
y∗ = β0 + β1xi + vi + ηi 􏰐 􏰏􏰎 􏰑
ui
βols = cov(β0 +β1xi +vi +ηi,xi)
var(xi)
=β var(xi)+cov(xi,vi+ηi)
1 var(xi) var(xi) = β1
(b) Suppose instead that ηi = γxi +εi, where γ ̸= 0 and Xi and εi are independent. Will the OLS estimator βols using y∗ instead of y be biased for β ? Show why or why not. (5 marks)
1ii1
y∗ =β0 +β1xi +vi +γxi +εi 􏰐 􏰏􏰎 􏰑
ui
βols = cov(β0 +β1xi +γxi +εi +vi,xi)
var(xi)
=(β1 +γ)var(xi) + cov(xi,vi +εi)
var(xi) var(xi) = β1 + γ ̸= β1
3

Problem 4 (20 marks)
The dataset rollingsales manhattan.xls contains details on 2020 real estate transactions in Manhattan.1
(a) Load the data into R and perform the following basic data cleaning exercises: 2
• Relabel the column names to remove any spaces