Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help with Question 1 In [3]: upro = pd.read_csv( 'UPRO.csv', index_col='Date', parse_dates=True) upro = upro.resample('1M').last()[['Adj close']].pct_change().multiply(100).dropna() upro.columns = ['R'] In [4]: ff = pd.read_csv

image text in transcribedPlease help with Question 1

In [3]: upro = pd.read_csv( 'UPRO.csv', index_col='Date', parse_dates=True) upro = upro.resample('1M').last()[['Adj close']].pct_change().multiply(100).dropna() upro.columns = ['R'] In [4]: ff = pd.read_csv 'F-F_Research_Data_Factors.csv', index_col=0, skiprows=3, nrows=12* (2020 - 1927 + 1) + 6 + 1 ) ff.index = pd.to_datetime(ff.index, format='%Y%m') + pd.offsets. MonthEnd (0) In [5]: df = upro.join(ff, how='inner') Question 1 (30 points, 2 public tests, 1 hidden test) Add a column to the data frame df that contains the monthly excess returns for UPRO. Label this excess returns column R-RF . In [5]: In [ ]: grader.check("q1")

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 10g Insider Solutions

Authors: Arun R. Kumar, John Kanagaraj, Richard Stroupe

1st Edition

0672327910, 978-0672327919

More Books

Students also viewed these Databases questions

Question

How does the concept of hegemony relate to culture?

Answered: 1 week ago