famafrench.FamaFrench.getFamaFrenchStats¶
-
FamaFrench.
getFamaFrenchStats
(self, dataType, dataFreq, dt_start, dt_end, *args)[source]¶ Detailed summary statistics tables of portfolio returns (which may include factor returns), number of firms in each portfolio, or average anomaly portfolio characteristics at a given frequency and for a given sample period.
- Parameters
dataType (str) –
Dataset type to construct. Possible choices are:
Returns
Factors
NumFirms
Characs
dataFreq (str) –
Observation frequency of the portfolios. Possible choices are:
D
: dailyW
: weeklyM
: monthlyQ
: 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.
pDim (list, int, [optional]) – Dimensions for sorting on each element in the list
idList
. For example, ifidList = ['ME', 'BM']
anddim = [5, 5]
, then the portfolio sorting strategy is characterized by a bivariate quintile sort on both size and book-to-market.pRetType (str, [optional]) –
Weighting-scheme for portfolios. Possible choices are:
vw
: value-weightsew
: equal-weights
- Returns
- Return type
Note
Currently, this method only prints out a table w/ detailed summary statistics. Future versions of the package will provide more in-depth statistical analysis and their outputs.
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 todt_start
. We then slice the resulting pandas.DataFrames starting w/dt_start
.