# CAPM and factor modeling: Machine learning

Excuse my ignorance with this I am still trying to wrap my head around the interpretation of the Fama French 1992 factor paper.

I come from a computer science background but I am interested in applying myself to finance also.

My question is could some machine learning models (ANN, SVM etc.) be applied to the CAPM model/FF 3 factor model, for example;

1) Find more optimal portfolios for the FF 3 factor model (instead of just having size sorted and High Book to Market sorted portfolios would it be possible to use machine learning to find portfolios of firms with similar-firm level characteristics and ask a neural network to go out and find the "best" characteristics to sort on a portfolio.

In an academic sense could it be enough to use ML to create a new factor portfolio?

2) Could it also be possible to estimate excess returns of an asset through machine learning methods?

ActualAssetReturn = RskFreeRate + B(ExpectedMktReturn - RskFreeRate)


Are people applying NN or other ML methods to the above equation?

Is it plausable to pass through a deep neural network DNN inputs of the risk free rate, expected market return and Beta estimates (from OLS) to obtain predicted values for Asset returns? train it on an in-sample dataset and test on an out-of-sample data set...

Again excuse my ignorance I am still studying this stuff but would like to clear up one or two things I am unsure about.

1) In an academic sense could it be enough to use ML to create a new factor portfolio?

The original FF papers (92,93) said something deep because they contradicted the dominant theory of the day. When you say in an academic sense, you may not get much respect from serious academics if you data mine a factor these days. However, as a statistical exercise, yes, if you find a time t variable that explains average returns at time t+1 you have a portfolio that could potentially be a factor.

To identify a factor let me say that you can

a) run a cross sectional regression (OLS) of characteristics at time t, to returns at time t+1 for many different variables and see what works (hint, in sample many work)

b) You can use shrinkage and selection techniques that trade off some bias in the coefficients for improved predictive ability (see LAD/LASSO/etc)

You will notice the first two methods impose a linear relationship between the characteristics and the data, one potential benefit of using nonlinear learning techniques is that you can pick up relationships in which the characteristic return relationship is nonlinear, the simplest is;

c) Simply sort stocks into portfolios based on some characteristic at time t and then look at average returns of each portfolio at t+1 - a non parametric regression of average returns at time t+1 on characteristics at time t

d) SVM, ANN, etc - here it is easy to run all the regressions as above in the sense of modeling conditional expectations, but there may be a challenge of interpretation, consider a multi layer neural network, the features may combine in complex, nonlinear ways to provide a better fit to the data but it may be hard to back out the "factor" or combination of firm characteristics responsible for the predictability (assuming you have not overfit the data).

• papers.ssrn.com/sol3/papers.cfm?abstract_id=3081555 Dec 12, 2017 at 18:47
• @noob2 Thanks, let me give this a read when I have time, if you understand the paper and it affects my answer (especially d) in any crucial way it would be best for the community if you would give some details.
– jd8
Dec 14, 2017 at 0:23
• Could someone explain to me in simple terms where the nonlinearity appears when forming characteristic (e.g. factor sorted) portfolios and then regressing them (linearly) on returns of some instrument? Jun 14, 2022 at 15:41