Skip to content

yyh357/alpha_examples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alpha_examples

本项目是将polars_ta, expr_codegen, AlphaInspect等几个项目利用起来的开箱即用示例

  1. polars_ta: 基于polars表达式的指标库
  2. expr_codegen: 将WorldQuant Alpha101风格的表达式转换成polars风格代码的工具
  3. AlphaInspect: 仿alphalens的单因子分析工具

使用方法

git clone --depth=1 https://github.com/wukan1986/alpha_examples.git

然后使用PyCharmVSCode打开即可。

每个文件夹中的requirements.txt都需要安装

pip install -r requirements.txt

每个文件夹下的README.md都请认真先看一看

注意:如果github无法访问,用户可以在gitee中新建仓库,然后导入github仓库即可

data、codes、codegen 三目录

data生成测试用数据,它依赖于codes目录,而codes目录由codegen中的脚本生成

research 单因子分析示例

可以将它做为研发单因子的模板,只要改一行因子表达式即可

  1. demo_features.py: 演示准备数和特征
  2. demo_html.py: 演示生成网页报表
  3. demo_notebook.py: 可直接运行。也可在VSCode中通过Shift+Enter运行

gp_base/gp_run 遗传编程

自动大批量生成表达式。可将生成的表达式直接复制到research/demo_notebook.py中进行进一步分析

transformer 第三方表达转换

演示了Alpha101Alpha191转换成polars_ta风格表达式

About

alpha投研示例

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.8%
  • Jupyter Notebook 2.2%