Uploaded by danielmigui8

r studio

advertisement
11/7/21, 10:06 PM
Quiz: Assignment 3
Assignment 3
Started: Nov 7 at 8:06am
Quiz Instructions
Use the following code to download monthly excess return data on google stock.
library(cbw)
prmdf = getfinmdat(symbols = c("GOOG","^gspc"),
symnames = c("goog","sp500"),
from = "2010-01-01",
to = "2021-06-30")
Question 1
4 pts
Now estimate by Bayesian regression the following FF5 model for google stock
premium:
In your estimations, use trainsize of 24 to form the priors. Set the seed to 100 in the
function you use. Assume that the error distribution is Gaussian.
To check if prmgoog is priced by the FF5 risk factors, you need to estimate two
models. The log-marginal likelihood of the model with intercept is
; the log-marginal likelihood of the model without intercept is
.
Answer up to 4 digits after the decimal point.
https://wustl.instructure.com/courses/68122/quizzes/73125/take
1/4
11/7/21, 10:06 PM
Quiz: Assignment 3
Question 2
2 pts
Let's continue with the estimates obtained from the model without intercept.
What is the sign of the posterior mean of the loading on the smb factor?
[ Select ]
Is the expected prmgoog negatively or positively associated with smb?
[ Select ]
Question 3
2 pts
(Continued)
What is the posterior mean and posterior standard deviation of the loading on the
cma factor?
-1.0033939; 0.3361101
-0.1751238; 0.3042964
-0.1615317; 0.30822703
-0.9564715; 0.33418990
Question 4
6 pts
How would you check if a student-t error model with nu = 3.5 is better than the model
you estimated in Question 2? Write your code here.
Edit
View
Insert
Format
Tools
https://wustl.instructure.com/courses/68122/quizzes/73125/take
Table
2/4
11/7/21, 10:06 PM
12pt
Quiz: Assignment 3
Paragraph
p
0 words
Question 5
</>
6 pts
Suppose you are at month t = 75 (at month 24 + 75 from the start) and you want to
find the log predictive likelihood for time period t = 76 (at month 24 + 76 from the
start). Use the short-cut difference method to get this log-predictive likelihood for the
student-t model with nu = 3.5. Write your code here.
Edit
12pt
View
Insert
Format
Tools
Table
Paragraph
https://wustl.instructure.com/courses/68122/quizzes/73125/take
3/4
11/7/21, 10:06 PM
Quiz: Assignment 3
p
0 words
</>
Question 6
0 pts
You can paste your code of Q1-Q3 here. You might get partial credit if your code is
correct.
Edit
12pt
View
Insert
Format
Tools
Table
Paragraph
p
0 words
</>
No new data to save. Last checked at 10:06pm
https://wustl.instructure.com/courses/68122/quizzes/73125/take
Submit Quiz
4/4
Download