famafrench.FamaFrench.getPortfolioReturns

FamaFrench.getPortfolioReturns(self, factorsBool, dt_start, dt_end, *args)[source]

Construct dataset w/ portfolio returns (which may include factor returns) at a given frequency and for a given sample period.

Parameters
  • factorsBool (bool) – Flag for choosing whether to construct Fama-French-style factor returns or not.

  • dt_start (datetime.date) – Starting date for the dataset queried or locally retrieved.

  • dt_end (datetime.date) – Ending date for the dataset queried or locally retrieved.

  • pDim (list, int, [optional]) – Dimensions for sorting on each element in the list self.sortCharacsId.

  • pRetType (str, [optional]) –

    Weighting-scheme for portfolios. Possible choices are:

    • vw : value-weights

    • ew : equal-weights

Returns

portRetTable – Dataset w/ portfolio returns observed at frequency self.freqType over sample period from dt_start to dt_end for a given portfolio sorting strategy.

Return type

pandas.DataFrame

Note

Portfolios require anomaly characteristics from the last fiscal year. To get non-missing observations starting on date dt_start, we construct portfolios using a startdate that is two/three years prior to dt_start. We then slice the resulting pandas.DataFrames starting w/ dt_start.