本项目是将polars_ta
, expr_codegen
, AlphaInspect
等几个项目利用起来的开箱即用示例
- polars_ta: 基于
polars
表达式的指标库 - expr_codegen: 将
WorldQuant Alpha101
风格的表达式转换成polars
风格代码的工具 - AlphaInspect: 仿
alphalens
的单因子分析工具
git clone --depth=1 https://github.com/wukan1986/alpha_examples.git
然后使用PyCharm
或VSCode
打开即可。
每个文件夹中的requirements.txt
都需要安装
pip install -r requirements.txt
每个文件夹下的README.md
都请认真先看一看
注意:如果github
无法访问,用户可以在gitee
中新建仓库,然后导入github
仓库即可
data
生成测试用数据,它依赖于codes
目录,而codes
目录由codegen
中的脚本生成
demo_html.py
: 演示生成网页报表demo_notebook.py
: 可直接运行。也可在VSCode
中通过Shift+Enter
运行。可以将它做为研发单因子的模板,只要改一行因子表达式即可
自动大批量生成表达式。可将生成的表达式直接复制到research/demo_notebook.py
中进行进一步分析