Giter VIP home page Giter VIP logo

alphasickle's Introduction

alphasickle

利用指数增强模型收割alpha

模型结构:

包括原始数据获取、因子生成、因子数据预处理、单因子检验、收益预测模型及风险模型等,具体流程如图:

代码框架:

1.原始数据获取.py:原始数据获取主文件;

2.raw_data_fetch.py:原始数据获取功能文件,用于从tushare数据源获取原始数据,数据以指标名作为文件名保存到一个个文件中。

3.因子生成.py:因子生成主文件;

4.factor_generate.py:因子生成功能文件,用于通过对原始数据的计算生成相应各种因子,以截面形式保存到文件。

5.因子预处理.py:因子预处理主文件;

6.factor_preprocess.py:因子预处理功能文件,用于对计算后的原始因子数据进行预处理,包括缺失值处理、中位数法去极值、标准化及相对行业和市值中性化处理。

7.单因子检验.py:单因子检验主文件;

8.single_factor_test.py:单因子检验功能文件,用于对标准化后的单因子进行回归IC法检验、分层回测法检验,对有效因子进行初步筛选。

9.指数增强模型.py:指数增强模型运行主文件;

10.index_enhance.py:指数增强模型功能文件,用于对有效单因子进行因子合成与正交,进行收益预测,并通过风险模型进行权重优化,最终生成回测结果。

模型说明:

本模型针对沪深 300 成分股,最终选取估值因子、动量因子、流动性因子、成长因子、作 为阿尔法因子,选取波动率因子、市值因子、 Beta 因子和行业因子作为风险因子,采用月2 频方式调仓,根据历史月频横截面回归计算因子收益率,并在每个月末根据最新的因子暴露 预测下个月全部指数成分股收益,并通过风险模型以最大化组合的预测收益为目标,同时控 制组合相对基准指数的行业及市值暴露,实现对组合中个股的权重优化,以沪深 300 增强 为例,每个月通过模型从 300 只成分股中选出约 60-100 只个股,以最优权重构建组合。 回测周期为 2014 年 1 月 - 2019 年 12 月。模型采用 24 个月指数加权方式预测 T+1 期因 子收益率,并进行市值中性化和行业中性化处理。经过回测,模型年化超额收益 8.3%,并 在 2014-2019 年 期间每一年都跑赢指数,详见《指数增强策略研究报告》。

alphasickle's People

Contributors

phonegapx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

alphasickle's Issues

可能出现的问题

创建的指标月开始时间与月结束时间的顺序是否出现了相反的问题?

New complementary tool

My name is Luis, I'm a big-data machine-learning developer, I'm a fan of your work, and I usually check your updates.

I was afraid that my savings would be eaten by inflation. I have created a powerful tool that based on past technical patterns (volatility, moving averages, statistics, trends, candlesticks, support and resistance, stock index indicators).
All the ones you know (RSI, MACD, STOCH, Bolinger Bands, SMA, DEMARK, Japanese candlesticks, ichimoku, fibonacci, williansR, balance of power, murrey math, etc) and more than 200 others.

The tool creates prediction models of correct trading points (buy signal and sell signal, every stock is good traded in time and direction).
For this I have used big data tools like pandas python, stock market libraries like: tablib, TAcharts ,pandas_ta... For data collection and calculation.
And powerful machine-learning libraries such as: Sklearn.RandomForest , Sklearn.GradientBoosting, XGBoost, Google TensorFlow and Google TensorFlow LSTM.

With the models trained with the selection of the best technical indicators, the tool is able to predict trading points (where to buy, where to sell) and send real-time alerts to Telegram or Mail. The points are calculated based on the learning of the correct trading points of the last 2 years (including the change to bear market after the rate hike).

I think it could be useful to you, to improve, I would like to share it with you, and if you are interested in improving and collaborating I am also willing, and if not file it in the box.

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.