Provide risk forecasts by Barra China Equity Model
-
data.py
Extract data from Wind database. -
style_factor.py
Build style factors. -
factor_exposure.py
Prepare factor exposures data for regression: truncate, winsorize and normalize style factors, build industry factors.Return a dataframe with hierarchy index (datetime, code) and columns containing: industry factors, 10 style factors, daily return and weight. -
regression.py
Calculate factor returns by weighted linear regression. Predict risk by factor returns. -
utility.py
Some utility functions.