I am very new to the world of finance (a statistician) and I would like to run time series regressions for 3 and 5-factor Fama-French model in R but before I do that, I am very puzzled about obtaining the actual data:

  1. If I use quantmod, from my understanding I get the following variables on let's say some top performers in NDXT, let's say GOOG, CSCO, KLAC, ADSK, AKAM: so for each day, I'd get: High ,Low, Close, Volume, Adjusted (and I'm still having a hard time grasping what those concepts mean in terms of a bigger picture of finance)
  2. From these variables, or whatever variables I can possibly get through quantmod (given they only provide the publicly available data from Google Finance, Yahoo, Fred, and Oanda), how do I calculate SMB and HML for NDXT? From Fama and French website,

SMB = 1/3 (Small Value + Small Neutral + Small Growth) - 1/3 (Big Value + Big Neutral + Big Growth).

HML = 1/2 (Small Value + Big Value) - 1/2 (Small Growth + Big Growth).

Then, using the data I can obtain via quantmod, how do I calculate:

  • Small Value, Small Neutral, Small Growth
  • Big Value, Big Neutral, Big Growth
  • the average return on the two growth portfolios
  • the average return on the two growth portfolios

and to begin with, how do I find the two growth portfolios? Or it is already calculated somewhere on Fama and French website for NDXT and I'm just not looking at the right data files?

I think my confusion got even further after I read this response How to get real-time data for Fama-French model? on Stack Exchange:

Basically, what they do is divide the world up a grid of 5x5 portfolios: size on one axis, value on the other. If you have access to market cap and B/E you could follow their procedure that they outline. Hence, these factors are themselves average returns, so their calculation is dependent on the stocks you choose to input.


1 Answer 1


I can see that you are mentioning quantmod so you are probably using R, but in python it's quite straightforward to download the FF values through pandas.

Please see this for a sample implementation and you can find further info about the data downloaded here

Hope that helps.

  • $\begingroup$ OMG!I am not a Python user but knowing R,I can figure out most of the things,and this is so, so unbelievably helpful,saved me so much time and confusion, I sincerely appreciate it!! $\endgroup$
    – Jen
    Jun 9, 2017 at 23:50
  • $\begingroup$ can I ask you another question:from the Fama-French side,I see they have those factors devided by industries using different SIC codes,so if I'm interested in NDXT, which industry SMB's and HML's should I use?Is there a rule of thumb in finance for that? $\endgroup$
    – Jen
    Jun 9, 2017 at 23:52
  • $\begingroup$ glad I was helpful, sorry I am not aware of a rule about this $\endgroup$
    – sen_saven
    Jun 10, 2017 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.