Introduction to Multi-Variate Regression in Python
We went through linear regression at the notebook here; and polynomial regression here.
Introduction to Multi-Variate Regression in Python
We went through linear regression at the notebook here; and polynomial regression here.
Now let’s up our game. Not everything is dependent on just one factor. We often want to check how a variable could be related to (or predicted by) multiple other variables.
Multi-variate regression just means you regress one variable against a whole range of other variables.
A good example in finance is the Arbitrage Pricing Theory (APT).
CAPM basically assumes that the stock return is only dependent on one factor, and so the regression there was a single variate linear regression.
The APT goes a step further, and assumes that the stock return can come from multiple factors.
Our objective is to find the values of the coefficients for each of these factors.
It’s actually pretty simple and almost identical to what we do for linear regression, so I shall not go into the details.
You can find the detailed code here, with comments within explaining the steps of doing multi-variate regression using the statsmodels library.
While this looks easy, we cannot always assume all factors can just be thrown in the mix. To prevent overfitting, we do need to check which of the factors matter the most, and need to be aware of issues such as collinearity. We will cover these concepts in a subsequent post.
playgrd.com || facebook.com/playgrdstar || instagram.com/playgrdstar/

