This is an integrated analysis frame with factor calculation and evaluation.
Note that you can add new factor calculation methods and construct your own factor pool, then play with the combination tools and the evaluation tools to renew your factor or to verify its effect. Every tool in this project is open to rebuild, just add your innovative idea and creativity!
This project depends on:
There are two jupyter notebooks. single_factor.ipynb
helps you to analyze a single factor, and multi_factors.ipynb
integrates tools to load a calculated factor pool and factors selection, combination and evaluation.
Our evaluation method includes:
- distribution plot
- check if distribution is close to normal
- adf test
- ic test
- Grangers causation test
- trading back test
- layered back test
-
factors pool loading:
- Calculated factors are saved as csv files located in the path
./factorloader/data
- Calculated factors are saved as csv files located in the path
-
after factor combination:
- Combination weights are located in the path
./factorcombiner/data
- Combination weights are located in the path
./stockdownload
includes downloading stocks' original trading data and its return calculation for the factors combination tool../factorloader
generates factors pool, all of the factor calculation methods are saved atfactorgens.py
and an instruction also included../factorcombiner
saves both factors selection and combination tools../evaluationtools
saves all of the evaluation methods../utils
includes practical tools and a data's preprocessing tool.
You can check the handbook.pdf located at ./Summary presentation
Further learning materials: