Skip to main content

panel_fmac

Fama-MacBeth estimator for panel data.

The Fama-MacBeth estimator, a two-step procedure renowned for its application in finance to estimate the risk premiums and evaluate the capital asset pricing model. By first estimating cross-sectional regressions for each time period and then averaging the regression coefficients over time, this method provides insights into the relationship between the dependent variable (y_column) and explanatory variables (x_columns) across different entities (such as individuals, companies, or countries).

Example​

from openbb import obb


Parameters​

NameTypeDescriptionDefaultOptional
dataList[Data]Input dataset.False
y_columnstrTarget column.False
x_columnsList[str]List of columns to use as exogenous variables.False

Returns​

OBBject
results : Dict
OBBject with the fit model returned