famafrench.FamaFrench.getkfPortfolioReturns

FamaFrench.getkfPortfolioReturns(self, freq, dt_start, dt_end, dim, retType)[source]

Query portfolio returns from Ken French’s online library at a given frequency and for a given sample period.

Parameters
  • freq (str) –

    Observation frequency of the portfolios. Possible choices are:

    • D : daily

    • W : weekly

    • M : monthly

    • Q : quarterly (3-months)

    • A : annual

  • 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.

  • dim (list, int) – Dimensions for sorting on each element in the list self.sortCharacsId.

  • retType (str) –

    Weighting-scheme for portfolios. Possible choices are:

    • vw : value-weights

    • ew : equal-weights

Returns

kfportRetTable – Cleaned dataset queried from Ken French’s online library containing portfolio returns observed at frequency freq over sample period from dt_start to dt_end for a given portfolio sorting strategy.

Return type

pandas.DataFrame