Code Monkey home page Code Monkey logo

tidibei's Introduction

Tidy-QuantTrading

泰迪杯数据挖掘比赛协作仓库。——基于机器学习方法构建多因子选股模型。

Group Members:XiaoRu Chen,Xiaoling Ling,Yihao Qiu

成果

最优的随机森林模型:累计收益60%左右,经择时策略风险控制后,最大回撤率控制在9%左右,夏普率为0.9左右。

单因子测试

确定一个单因子测试文件,定义待测因子列表,执行多次单因子runtest。

  • 保留回测报告,获取字段,保存在CSV文件。
  • 结果可视化。
  • 筛选得到最优因子。
  • 因子做共线性分析,获取最终因子。

官方提示: 单因子问题,可以手动实现一下,或者可以弱化一下,通过间接的方法去实现这个问题,并不一定要实现一个完整的回测框架才能解决单因子分析的问题

选用机器学习模型回测

  • 特征和标签构建。
  • 等权重线性模型。
  • 建立baseline models,尝试使用多种模型。SVR,RNN(LSTM),xgboost, random_forest,adaboost...
  • 交易逻辑确定。
  • 回测结果记录,分析。

关于模型的一些设想

风险控制

  • 风险模型:barra模型
  • 择时模型:三均线择时策略。

文件说明

  • data_exploration.ipynb: atrader API调用测试文件。
  • get_factor_report.py: 当单因子回测结束之后,执行文件,得到策略字段。
  • single_factor_test.py: 单因子测试文件。
  • find_factor.py: 自实现的因子绩效分析文件(已弃用)
  • run_test.bat: 脚本自动化运行python程序,实现多次执行策略。
  • 'factor_analysis': 类内因子共线性分析文件,绘制相关系数矩阵。
  • 以模型名标识模型回测文件。

LINK

tidibei's People

Contributors

chenxr1997 avatar joshuaqyh avatar lingxling avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.