楼主: xugonglei
614 1

[统计套利] 好文分享:A Statistical Arbitrage Strategy in R [推广有奖]

  • 4关注
  • 14粉丝

副教授

36%

还不是VIP/贵宾

-

威望
0
论坛币
4638 个
通用积分
1.0000
学术水平
41 点
热心指数
38 点
信用等级
35 点
经验
27934 点
帖子
531
精华
0
在线时间
977 小时
注册时间
2010-12-14
最后登录
2019-7-15

xugonglei 发表于 2017-9-13 09:18:26 |显示全部楼层
源链接:https://github.com/Jackal08/Quan ... atistical-Arbitrage

文字浅显易懂,并附有R代码以及回测信息,需要的坛友可以自行去作者的GitHub查看。欢迎交流、讨论。


History of Statistical Arbitrage:
  • First developed and used in the mid 1980s by Nunzio Tartaglia’s quantitative group at Morgan Stanly
  • Pair Trading is a “contrarian strategy” designed to harness mean-reverting behavior of the pair ratio
  • David Shaw, founder of D.E Shaw & Co, left Morgan Stanley and started his own “Quant” trading firm in the late 1980s dealing mainly in pair trading
What is Pair Trading:

Statistical arbitrage trading or pairs trading as it is commonly known is defined as trading one financial instrument or a basket of financial instruments – in most cases to create a value neutral basket.

It is the idea that a co-integrated pair is mean reverting in nature. There is a spread between the instruments and the further it deviates from its mean, the greater the probability of a reversal.

Note however that statistical arbitrage is not a risk free strategy. Say for example that you have entered positions for a pair and then the spread picks up a trend rather than mean reverting.

The Concept:
  • Step 1: Find 2 related securities Find two securities that are in the same sector / industry, they should have similar market capitalization and average volume traded. An example of this is Anglo Gold and Harmony Gold.

  • Step 2: Calculate the spread In the code to follow I used the pair ratio to indicate the spread. It is simply the price of asset A / price asset B.

  • Step 3: Calculate the mean, standard deviation, and z-score of the pair ratio / spread.

  • Step 4: Test for co-integration In the code to follow I use the Augmented Dicky Fuller Test (ADF Test) to test for co-integration. I set up three tests, each with a different number of observations (120, 90, 60), all three tests have to reject the null hypothesis that the pair is not co-integrated.

  • Step 5: Generate trading signals Trading signals are based on the z-score, given they pass the test for co-integration. In my project I used a z-score of 1 as I noticed that other algorithms that I was competing with were using very low parameters. (I would have preferred a z-score of 2, as it better matches the literature, however it is less profitable)

  • Step 6: Process transactions based on signals

  • Step 7: Reporting





已有 1 人评分经验 学术水平 热心指数 信用等级 收起 理由
accumulation + 100 + 1 + 1 + 1 精彩帖子

总评分: 经验 + 100  学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

本帖被以下文库推荐

生活的本质不在于索取,而在于奋斗。
stata SPSS
lianqu 发表于 2017-9-13 16:13:43 |显示全部楼层
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 我要注册

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2019-8-22 06:58