Skip to content

Instantly share code, notes, and snippets.

@DataCrusade1999
Created August 25, 2020 14:12
Show Gist options
  • Save DataCrusade1999/221edaebe9e8599d40c787ea984ef23e to your computer and use it in GitHub Desktop.
Save DataCrusade1999/221edaebe9e8599d40c787ea984ef23e to your computer and use it in GitHub Desktop.
AAPL_returns=daily_log_returns.iloc[:,0]
GS_returns=daily_log_returns.iloc[:,3]
return_data=pd.concat([AAPL_returns,GS_returns],axis=1)[1:]
X = sm.add_constant(return_data['AAPL'])
model = sm.OLS(return_data['GS'],X).fit()
print(model.summary())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment