Question: Please I need help to know what to include in the cells 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(

Please I need help to know what to include in the cells
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 2 (30 points, 2 public tests, 1 hidden test) Calculate the full-sample, annualized mean excess returns for UPRO ( R-RF ) and the market ( Mkt- RF ). Store the annualized mean excess returns for UPRO as a2a . Store the annualized mean excess returns for the market as a2b. In [9]: In [ ]: grader.check("92")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
