1. 学ぶ
  2. /
  3. コース
  4. /
  5. Introduction to Regression with statsmodels in Python

Connected

演習

Modeling consecutive returns

Let's quantify the relationship between returns in 2019 and 2018 by running a linear regression and making predictions. By looking at companies with extremely high or extremely low returns in 2018, we can see if their performance was similar in 2019.

sp500_yearly_returns is available and ols() is loaded.

指示1 / 2

undefined XP
    1
    2
  • Run a linear regression on return_2019 versus return_2018 using sp500_yearly_returns and fit the model. Assign to mdl_returns.
  • Print the parameters of the model.