# Paired trading
> 来源:https://uqer.io/community/share/54895a8df9f06c31c3950ca0
##配对交易
策略思路
寻找走势相关且股价相近的一对股票,根据其价格变动买卖
策略实现
历史前五日的Pearson相关系数若大于给定的阈值则触发买卖操作
```py
from scipy.stats.stats import pearsonr
start = datetime(2013, 1, 1)
end = datetime(2014, 12, 1)
benchmark = 'HS300'
universe = ['000559.XSHE', '600126.XSHG']
capital_base = 1e6
corlen = 5
def initialize(account):
add_history('hist', corlen)
account.cutoff = 0.9
account.prev_prc1 = 0
account.prev_prc2 = 0
account.prev_prcb = 0
def handle_data(account, data):
stk1 = universe[0]
stk2 = universe[1]
prc1 = data[stk1]['closePrice']
prc2 = data[stk2]['closePrice']
prcb = data['HS300']['return']
px1 = account.hist[stk1]['closePrice'].values
px2 = account.hist[stk2]['closePrice'].values
pxb = account.hist['HS300']['return'].values
corval, pval = pearsonr(px1, px2)
mov1, mov2 = adj(prc1, prc2, prcb, account.prev_prc1, account.prev_prc2, account.prev_prcb)
amount =1e4 / prc2
if (mov1 > 0) and (abs(corval) > account.cutoff):
order(stk2, amount)
elif (mov1 < 0) and (abs(corval) > account.cutoff):
if (account.position.stkpos.get(stk2, 0) > amount):
order(stk2, -amount)
else:
order_to(stk2, 0)
amount =1e4 / prc1
if (mov2 > 0) and (abs(corval) > account.cutoff):
order(stk1, amount)
elif (mov2 < 0) and (abs(corval) > account.cutoff):
if (account.position.stkpos.get(stk1, 0) > amount):
order(stk1, -amount)
else:
order_to(stk1, 0)
account.prev_prc1 = prc1
account.prev_prc2 = prc2
account.prev_prcb = prcb
def dmv(curr, prev):
delta = curr / prev - 1
return delta
def adj(x, y, base, prev_x, prev_y, prev_base):
dhs = dmv(base, prev_base)
dx = dmv(x, prev_x) - dhs
dy = dmv(y, prev_y) - dhs
return (dx, dy)
```
![](https://box.kancloud.cn/2016-07-30_579cbac2db9df.jpg)
```py
min(bt.cash)
232096.85369499651
```
```py
import pandas as pd
import numpy as np
from datetime import datetime
import quartz
import quartz.backtest as qb
import quartz.performance as qp
from quartz.api import *
from scipy.stats.stats import pearsonr
start = datetime(2013, 1, 1) # 回测起始时间
end = datetime(2014, 12, 1) # 回测结束时间
benchmark = 'HS300' # 使用沪深 300 作为参考标准
capital_base = 1e6 # 起始资金
corlen = 5
def initialize(account): # 初始化虚拟账户状态
add_history('hist', corlen)
account.cutoff = 0.9
account.prev_prc1 = 0
account.prev_prc2 = 0
account.prev_prcb = 0
def handle_data(account, data): # 每个交易日的买入卖出指令
stk1 = universe[0]
stk2 = universe[1]
prc1 = data[stk1]['closePrice']
prc2 = data[stk2]['closePrice']
prcb = data['HS300']['return']
px1 = account.hist[stk1]['closePrice'].values
px2 = account.hist[stk2]['closePrice'].values
pxb = account.hist['HS300']['return'].values
corval, pval = pearsonr(px1, px2)
mov1, mov2 = adj(prc1, prc2, prcb, account.prev_prc1, account.prev_prc2, account.prev_prcb)
#amount = int( 0.08 * capital_base / prc2)
amount =1e4 / prc2
if (mov1 > 0) and (abs(corval) > account.cutoff):
order(stk2, amount)
elif (mov1 < 0) and (abs(corval) > account.cutoff):
if (account.position.stkpos.get(stk2, 0) > amount):
order(stk2, -amount)
else:
order_to(stk2, 0)
#amount = int(0.08 * capital_base / prc1)
amount =1e4 / prc1
if (mov2 > 0) and (abs(corval) > account.cutoff):
order(stk1, amount)
elif (mov2 < 0) and (abs(corval) > account.cutoff):
if (account.position.stkpos.get(stk1, 0) > amount):
order(stk1, -amount)
else:
order_to(stk1, 0)
account.prev_prc1 = prc1
account.prev_prc2 = prc2
account.prev_prcb = prcb
def dmv(curr, prev):
delta = curr / prev - 1
return delta
def adj(x, y, base, prev_x, prev_y, prev_base):
dhs = dmv(base, prev_base)
dx = dmv(x, prev_x) - dhs
dy = dmv(y, prev_y) - dhs
return (dx, dy)
pool_raw = pd.read_csv("po.pair.2012.csv")
pool = []
for i in range(len(pool_raw)):
s1, s2 = pool_raw.loc[i].tolist()
if [s2, s1] not in pool:
pool.append([s1, s2])
outfile = []
for i, universe in enumerate(pool):
print i
try:
bt = qb.backtest(start, end, benchmark, universe, capital_base, initialize = initialize, handle_data = handle_data)
perf = qp.perf_parse(bt)
outfile.append(universe + [perf["annualized_return"], perf["sharpe"]])
except:
pass
keys = ['stock1', 'stock2', 'annualized_return', 'sharpe']
outdict = {}
outfile = zip(*sorted(outfile, key=lambda x:x[2], reverse=True))
for i,k in enumerate(keys):
outdict[k] = outfile[i]
outdict = pd.DataFrame(outdict).loc[:, keys]
outdict
['000066.XSHE', '000707.XSHE']
['000066.XSHE', '600117.XSHG']
['000066.XSHE', '600126.XSHG']
['000066.XSHE', '600819.XSHG']
['000089.XSHE', '600035.XSHG']
['000089.XSHE', '600037.XSHG']
['000089.XSHE', '600595.XSHG']
['000159.XSHE', '000967.XSHE']
['000159.XSHE', '600595.XSHG']
['000417.XSHE', '000541.XSHE']
['000417.XSHE', '000685.XSHE']
['000417.XSHE', '600875.XSHG']
['000425.XSHE', '000528.XSHE']
['000507.XSHE', '600391.XSHG']
['000541.XSHE', '000987.XSHE']
['000541.XSHE', '600330.XSHG']
['000541.XSHE', '600883.XSHG']
['000554.XSHE', '000707.XSHE']
['000559.XSHE', '600026.XSHG']
['000559.XSHE', '600126.XSHG']
['000559.XSHE', '600477.XSHG']
['000559.XSHE', '600581.XSHG']
['000559.XSHE', '601666.XSHG']
['000635.XSHE', '000707.XSHE']
['000635.XSHE', '600068.XSHG']
['000635.XSHE', '600117.XSHG']
['000635.XSHE', '600188.XSHG']
['000635.XSHE', '600295.XSHG']
['000635.XSHE', '600550.XSHG']
['000635.XSHE', '600819.XSHG']
['000635.XSHE', '601168.XSHG']
['000635.XSHE', '601233.XSHG']
['000650.XSHE', '600261.XSHG']
['000683.XSHE', '000936.XSHE']
['000683.XSHE', '600595.XSHG']
['000685.XSHE', '000988.XSHE']
['000685.XSHE', '601101.XSHG']
['000698.XSHE', '000949.XSHE']
['000707.XSHE', '000911.XSHE']
['000707.XSHE', '000969.XSHE']
['000707.XSHE', '000987.XSHE']
['000707.XSHE', '600117.XSHG']
['000707.XSHE', '600295.XSHG']
['000707.XSHE', '600550.XSHG']
['000707.XSHE', '600831.XSHG']
['000707.XSHE', '601168.XSHG']
['000707.XSHE', '601233.XSHG']
['000708.XSHE', '600327.XSHG']
['000709.XSHE', '601107.XSHG']
['000709.XSHE', '601618.XSHG']
['000717.XSHE', '600282.XSHG']
['000717.XSHE', '600307.XSHG']
['000717.XSHE', '600808.XSHG']
['000761.XSHE', '600320.XSHG']
['000761.XSHE', '600548.XSHG']
['000822.XSHE', '600117.XSHG']
['000830.XSHE', '600068.XSHG']
['000830.XSHE', '600320.XSHG']
['000830.XSHE', '600550.XSHG']
['000877.XSHE', '601519.XSHG']
['000898.XSHE', '600022.XSHG']
['000898.XSHE', '600808.XSHG']
['000911.XSHE', '600550.XSHG']
['000916.XSHE', '600033.XSHG']
['000916.XSHE', '600035.XSHG']
['000916.XSHE', '600126.XSHG']
['000930.XSHE', '600026.XSHG']
['000932.XSHE', '600569.XSHG']
['000933.XSHE', '600348.XSHG']
['000933.XSHE', '600595.XSHG']
['000936.XSHE', '600477.XSHG']
['000937.XSHE', '600348.XSHG']
['000937.XSHE', '600508.XSHG']
['000937.XSHE', '600997.XSHG']
['000937.XSHE', '601001.XSHG']
['000939.XSHE', '600819.XSHG']
['000967.XSHE', '600879.XSHG']
['000969.XSHE', '600831.XSHG']
['000973.XSHE', '600460.XSHG']
['000987.XSHE', '600636.XSHG']
['000987.XSHE', '600827.XSHG']
['000987.XSHE', '601001.XSHG']
['600008.XSHG', '600035.XSHG']
['600012.XSHG', '600428.XSHG']
['600020.XSHG', '600033.XSHG']
['600020.XSHG', '600035.XSHG']
['600026.XSHG', '600068.XSHG']
['600026.XSHG', '600089.XSHG']
['600026.XSHG', '600126.XSHG']
['600026.XSHG', '600307.XSHG']
['600026.XSHG', '600331.XSHG']
['600026.XSHG', '600375.XSHG']
['600026.XSHG', '600581.XSHG']
['600026.XSHG', '600963.XSHG']
['600026.XSHG', '601666.XSHG']
['600026.XSHG', '601898.XSHG']
['600033.XSHG', '600035.XSHG']
['600035.XSHG', '600126.XSHG']
['600035.XSHG', '600269.XSHG']
['600035.XSHG', '600307.XSHG']
['600035.XSHG', '600586.XSHG']
['600037.XSHG', '600327.XSHG']
['600068.XSHG', '600126.XSHG']
['600068.XSHG', '600269.XSHG']
['600068.XSHG', '600320.XSHG']
['600068.XSHG', '600550.XSHG']
['600068.XSHG', '601001.XSHG']
['600068.XSHG', '601666.XSHG']
['600089.XSHG', '600581.XSHG']
['600100.XSHG', '600117.XSHG']
['600117.XSHG', '600295.XSHG']
['600117.XSHG', '600339.XSHG']
['600117.XSHG', '601168.XSHG']
['600117.XSHG', '601233.XSHG']
['600126.XSHG', '600282.XSHG']
['600126.XSHG', '600327.XSHG']
['600126.XSHG', '600569.XSHG']
['600126.XSHG', '600581.XSHG']
['600126.XSHG', '600808.XSHG']
['600126.XSHG', '600963.XSHG']
['600160.XSHG', '600449.XSHG']
['600160.XSHG', '601216.XSHG']
['600160.XSHG', '601311.XSHG']
['600188.XSHG', '600295.XSHG']
['600188.XSHG', '601001.XSHG']
['600231.XSHG', '600282.XSHG']
['600269.XSHG', '601618.XSHG']
['600282.XSHG', '600307.XSHG']
['600282.XSHG', '600569.XSHG']
['600282.XSHG', '600808.XSHG']
['600282.XSHG', '600963.XSHG']
['600307.XSHG', '600581.XSHG']
['600307.XSHG', '600808.XSHG']
['600307.XSHG', '600963.XSHG']
['600320.XSHG', '600548.XSHG']
['600320.XSHG', '601600.XSHG']
['600330.XSHG', '600883.XSHG']
['600330.XSHG', '601268.XSHG']
['600331.XSHG', '600581.XSHG']
['600348.XSHG', '600508.XSHG']
['600348.XSHG', '600997.XSHG']
['600348.XSHG', '601001.XSHG']
['600368.XSHG', '600527.XSHG']
['600375.XSHG', '600581.XSHG']
['600391.XSHG', '601100.XSHG']
['600449.XSHG', '601311.XSHG']
['600449.XSHG', '601519.XSHG']
['600460.XSHG', '601908.XSHG']
['600477.XSHG', '600581.XSHG']
['600508.XSHG', '600546.XSHG']
['600508.XSHG', '600997.XSHG']
['600522.XSHG', '600973.XSHG']
['600550.XSHG', '600831.XSHG']
['600569.XSHG', '600808.XSHG']
['600569.XSHG', '600963.XSHG']
['600581.XSHG', '600963.XSHG']
['600581.XSHG', '601001.XSHG']
['600581.XSHG', '601168.XSHG']
['600581.XSHG', '601666.XSHG']
['600586.XSHG', '601268.XSHG']
['600595.XSHG', '601001.XSHG']
['600595.XSHG', '601168.XSHG']
['600595.XSHG', '601666.XSHG']
['600688.XSHG', '600871.XSHG']
['600785.XSHG', '600827.XSHG']
['600808.XSHG', '600963.XSHG']
['600827.XSHG', '601001.XSHG']
['600875.XSHG', '601001.XSHG']
['600883.XSHG', '601268.XSHG']
['601001.XSHG', '601101.XSHG']
['601001.XSHG', '601168.XSHG']
['601001.XSHG', '601666.XSHG']
['601101.XSHG', '601666.XSHG']
['601168.XSHG', '601666.XSHG']
```
| | stock1 | stock2 | annualized_return | sharpe |
| --- | --- |
| 0 | 000761.XSHE | 600548.XSHG | 0.489473 | 2.411514 |
| 1 | 000708.XSHE | 600327.XSHG | 0.447337 | 2.021270 |
| 2 | 600126.XSHG | 600327.XSHG | 0.438380 | 1.946916 |
| 3 | 000554.XSHE | 000707.XSHE | 0.431123 | 1.331038 |
| 4 | 000939.XSHE | 600819.XSHG | 0.409471 | 1.919758 |
| 5 | 600026.XSHG | 600963.XSHG | 0.408791 | 1.681338 |
| 6 | 600037.XSHG | 600327.XSHG | 0.395624 | 1.691877 |
| 7 | 600808.XSHG | 600963.XSHG | 0.391988 | 1.724114 |
| 8 | 000559.XSHE | 600126.XSHG | 0.389043 | 1.413595 |
| 9 | 000761.XSHE | 600320.XSHG | 0.384325 | 1.807262 |
| 10 | 600126.XSHG | 600963.XSHG | 0.378064 | 1.662569 |
| 11 | 600126.XSHG | 600808.XSHG | 0.375825 | 1.513791 |
| 12 | 000936.XSHE | 600477.XSHG | 0.375135 | 1.707097 |
| 13 | 000930.XSHE | 600026.XSHG | 0.372924 | 1.524350 |
| 14 | 600320.XSHG | 600548.XSHG | 0.372499 | 2.083496 |
| 15 | 000507.XSHE | 600391.XSHG | 0.365637 | 1.813873 |
| 16 | 000559.XSHE | 601666.XSHG | 0.350235 | 0.925901 |
| 17 | 600012.XSHG | 600428.XSHG | 0.327834 | 1.722317 |
| 18 | 000916.XSHE | 600033.XSHG | 0.327795 | 1.406093 |
| 19 | 600035.XSHG | 600126.XSHG | 0.326167 | 1.442674 |
| 20 | 600827.XSHG | 601001.XSHG | 0.322705 | 0.957791 |
| 21 | 000717.XSHE | 600808.XSHG | 0.320737 | 1.293439 |
| 22 | 000559.XSHE | 600477.XSHG | 0.306670 | 1.218095 |
| 23 | 000685.XSHE | 000988.XSHE | 0.302593 | 1.692933 |
| 24 | 000683.XSHE | 000936.XSHE | 0.301804 | 1.550496 |
| 25 | 000559.XSHE | 600026.XSHG | 0.295510 | 1.279449 |
| 26 | 600269.XSHG | 601618.XSHG | 0.294215 | 1.486413 |
| 27 | 600026.XSHG | 600126.XSHG | 0.293884 | 1.441490 |
| 28 | 600068.XSHG | 600126.XSHG | 0.289457 | 1.261351 |
| 29 | 000159.XSHE | 600595.XSHG | 0.288982 | 0.946365 |
| 30 | 600020.XSHG | 600033.XSHG | 0.288243 | 1.489764 |
| 31 | 600126.XSHG | 600569.XSHG | 0.287607 | 1.371374 |
| 32 | 000635.XSHE | 600819.XSHG | 0.285135 | 1.364688 |
| 33 | 600068.XSHG | 600320.XSHG | 0.273513 | 1.262845 |
| 34 | 600785.XSHG | 600827.XSHG | 0.272658 | 0.842093 |
| 35 | 000089.XSHE | 600595.XSHG | 0.269903 | 1.256524 |
| 36 | 000898.XSHE | 600808.XSHG | 0.269717 | 1.074201 |
| 37 | 000717.XSHE | 600282.XSHG | 0.267478 | 1.270872 |
| 38 | 600282.XSHG | 600808.XSHG | 0.266402 | 1.181157 |
| 39 | 000916.XSHE | 600035.XSHG | 0.264325 | 1.079520 |
| 40 | 000089.XSHE | 600037.XSHG | 0.264201 | 1.467101 |
| 41 | 600026.XSHG | 600068.XSHG | 0.263959 | 1.107977 |
| 42 | 600026.XSHG | 600331.XSHG | 0.261025 | 0.977858 |
| 43 | 600020.XSHG | 600035.XSHG | 0.260176 | 1.119975 |
| 44 | 600569.XSHG | 600963.XSHG | 0.260006 | 1.154372 |
| 45 | 600307.XSHG | 600963.XSHG | 0.258488 | 1.322409 |
| 46 | 000898.XSHE | 600022.XSHG | 0.258246 | 1.100292 |
| 47 | 600282.XSHG | 600963.XSHG | 0.257496 | 1.175741 |
| 48 | 600307.XSHG | 600808.XSHG | 0.256071 | 1.062023 |
| 49 | 600126.XSHG | 600282.XSHG | 0.255657 | 1.318676 |
| 50 | 600033.XSHG | 600035.XSHG | 0.255634 | 1.055682 |
| 51 | 000709.XSHE | 601618.XSHG | 0.253129 | 1.062565 |
| 52 | 600026.XSHG | 600307.XSHG | 0.253119 | 0.985825 |
| 53 | 600026.XSHG | 600375.XSHG | 0.250793 | 1.063874 |
| 54 | 000066.XSHE | 600126.XSHG | 0.247493 | 1.469341 |
| 55 | 000830.XSHE | 600320.XSHG | 0.247001 | 1.370327 |
| 56 | 600320.XSHG | 601600.XSHG | 0.246534 | 0.966634 |
| 57 | 000717.XSHE | 600307.XSHG | 0.245805 | 1.202750 |
| 58 | 000417.XSHE | 000685.XSHE | 0.245031 | 1.189700 |
| 59 | 600330.XSHG | 600883.XSHG | 0.243437 | 1.086147 |
| ... | ... | ... | ... |
```
174 rows × 4 columns
```
```py
a = list(outfile[2])
'percentage of outperform HS300: %f' % (1.*len([x for x in a if x>0.117]) / len(a))
'percentage of outperform HS300: 0.741379'
```
- Python 量化交易教程
- 第一部分 新手入门
- 一 量化投资视频学习课程
- 二 Python 手把手教学
- 量化分析师的Python日记【第1天:谁来给我讲讲Python?】
- 量化分析师的Python日记【第2天:再接着介绍一下Python呗】
- 量化分析师的Python日记【第3天:一大波金融Library来袭之numpy篇】
- 量化分析师的Python日记【第4天:一大波金融Library来袭之scipy篇】
- 量化分析师的Python日记【第5天:数据处理的瑞士军刀pandas】
- 量化分析师的Python日记【第6天:数据处理的瑞士军刀pandas下篇
- 量化分析师的Python日记【第7天:Q Quant 之初出江湖】
- 量化分析师的Python日记【第8天 Q Quant兵器谱之函数插值】
- 量化分析师的Python日记【第9天 Q Quant兵器谱之二叉树】
- 量化分析师的Python日记【第10天 Q Quant兵器谱 -之偏微分方程1】
- 量化分析师的Python日记【第11天 Q Quant兵器谱之偏微分方程2】
- 量化分析师的Python日记【第12天:量化入门进阶之葵花宝典:因子如何产生和回测】
- 量化分析师的Python日记【第13天 Q Quant兵器谱之偏微分方程3】
- 量化分析师的Python日记【第14天:如何在优矿上做Alpha对冲模型】
- 量化分析师的Python日记【第15天:如何在优矿上搞一个wealthfront出来】
- 第二部分 股票量化相关
- 一 基本面分析
- 1.1 alpha 多因子模型
- 破解Alpha对冲策略——观《量化分析师Python日记第14天》有感
- 熔断不要怕, alpha model 为你保驾护航!
- 寻找 alpha 之: alpha 设计
- 1.2 基本面因子选股
- Porfolio(现金比率+负债现金+现金保障倍数)+市盈率
- ROE选股指标
- 成交量因子
- ROIC&cashROIC
- 【国信金工】资产周转率选股模型
- 【基本面指标】Cash Cow
- 量化因子选股——净利润/营业总收入
- 营业收入增长率+市盈率
- 1.3 财报阅读 • [米缸量化读财报] 资产负债表-投资相关资产
- 1.4 股东分析
- 技术分析入门 【2】 —— 大家抢筹码(06年至12年版)
- 技术分析入门 【2】 —— 大家抢筹码(06年至12年版)— 更新版
- 谁是中国A股最有钱的自然人
- 1.5 宏观研究
- 【干货包邮】手把手教你做宏观择时
- 宏观研究:从估值角度看当前市场
- 追寻“国家队”的足迹
- 二 套利
- 2.1 配对交易
- HS300ETF套利(上)
- 【统计套利】配对交易
- 相似公司股票搬砖
- Paired trading
- 2.2 期现套利 • 通过股指期货的期现差与 ETF 对冲套利
- 三 事件驱动
- 3.1 盈利预增
- 盈利预增事件
- 事件驱动策略示例——盈利预增
- 3.2 分析师推荐 • 分析师的金手指?
- 3.3 牛熊转换
- 历史总是相似 牛市还在延续
- 历史总是相似 牛市已经见顶?
- 3.4 熔断机制 • 股海拾贝之 [熔断错杀股]
- 3.5 暴涨暴跌 • [实盘感悟] 遇上暴跌我该怎么做?
- 3.6 兼并重组、举牌收购 • 宝万战-大戏开幕
- 四 技术分析
- 4.1 布林带
- 布林带交易策略
- 布林带回调系统-日内
- Conservative Bollinger Bands
- Even More Conservative Bollinger Bands
- Simple Bollinger Bands
- 4.2 均线系统
- 技术分析入门 —— 双均线策略
- 5日线10日线交易策略
- 用5日均线和10日均线进行判断 --- 改进版
- macross
- 4.3 MACD
- Simple MACD
- MACD quantization trade
- MACD平滑异同移动平均线方法
- 4.4 阿隆指标 • 技术指标阿隆( Aroon )全解析
- 4.5 CCI • CCI 顺势指标探索
- 4.6 RSI
- 重写 rsi
- RSI指标策略
- 4.7 DMI • DMI 指标体系的构建及简单应用
- 4.8 EMV • EMV 技术指标的构建及应用
- 4.9 KDJ • KDJ 策略
- 4.10 CMO
- CMO 策略模仿练习 1
- CMO策略模仿练习2
- [技术指标] CMO
- 4.11 FPC • FPC 指标选股
- 4.12 Chaikin Volatility
- 嘉庆离散指标测试
- 4.13 委比 • 实时计算委比
- 4.14 封单量
- 按照封单跟流通股本比例排序,剔除6月上市新股,前50
- 涨停股票封单统计
- 实时计算涨停板股票的封单资金与总流通市值的比例
- 4.15 成交量 • 决战之地, IF1507 !
- 4.16 K 线分析 • 寻找夜空中最亮的星
- 五 量化模型
- 5.1 动量模型
- Momentum策略
- 【小散学量化】-2-动量模型的简单实践
- 一个追涨的策略(修正版)
- 动量策略(momentum driven)
- 动量策略(momentum driven)——修正版
- 最经典的Momentum和Contrarian在中国市场的测试
- 最经典的Momentum和Contrarian在中国市场的测试-yanheven改进
- [策略]基于胜率的趋势交易策略
- 策略探讨(更新):价量结合+动量反转
- 反向动量策略(reverse momentum driven)
- 轻松跑赢大盘 - 主题Momentum策略
- Contrarian strategy
- 5.2 Joseph Piotroski 9 F-Score Value Investing Model · 基本面选股系统:Piotroski F-Score ranking system
- 5.3 SVR · 使用SVR预测股票开盘价 v1.0
- 5.4 决策树、随机树
- 决策树模型(固定模型)
- 基于Random Forest的决策策略
- 5.5 钟摆理论 · 钟摆理论的简单实现——完美躲过股灾和精准抄底
- 5.6 海龟模型
- simple turtle
- 侠之大者 一起赚钱
- 5.7 5217 策略 · 白龙马的新手策略
- 5.8 SMIA · 基于历史状态空间相似性匹配的行业配置 SMIA 模型—取交集
- 5.9 神经网络
- 神经网络交易的训练部分
- 通过神经网络进行交易
- 5.10 PAMR · PAMR : 基于均值反转的投资组合选择策略 - 修改版
- 5.11 Fisher Transform · Using Fisher Transform Indicator
- 5.12 分型假说, Hurst 指数 · 分形市场假说,一个听起来很美的假说
- 5.13 变点理论 · 变点策略初步
- 5.14 Z-score Model
- Zscore Model Tutorial
- 信用债风险模型初探之:Z-Score Model
- user-defined package
- 5.15 机器学习 · Machine Learning 学习笔记(一) by OTreeWEN
- 5.16 DualTrust 策略和布林强盗策略
- 5.17 卡尔曼滤波
- 5.18 LPPL anti-bubble model
- 今天大盘熔断大跌,后市如何—— based on LPPL anti-bubble model
- 破解股市泡沫之谜——对数周期幂率(LPPL)模型
- 六 大数据模型
- 6.1 市场情绪分析
- 通联情绪指标策略
- 互联网+量化投资 大数据指数手把手
- 6.2 新闻热点
- 如何使用优矿之“新闻热点”?
- 技术分析【3】—— 众星拱月,众口铄金?
- 七 排名选股系统
- 7.1 小市值投资法
- 学习笔记:可模拟(小市值+便宜 的修改版)
- 市值最小300指数
- 流通市值最小股票(新筛选器版)
- 持有市值最小的10只股票
- 10% smallest cap stock
- 7.2 羊驼策略
- 羊驼策略
- 羊驼反转策略(修改版)
- 羊驼反转策略
- 我的羊驼策略,选5只股无脑轮替
- 7.3 低价策略
- 专捡便宜货(新版quartz)
- 策略原理
- 便宜就是 alpha
- 八 轮动模型
- 8.1 大小盘轮动 · 新手上路 -- 二八ETF择时轮动策略2.0
- 8.2 季节性策略
- Halloween Cycle
- Halloween cycle 2
- 夏买电,东买煤?
- 历史的十一月板块涨幅
- 8.3 行业轮动
- 银行股轮动
- 申万二级行业在最近1年、3个月、5个交易日的涨幅统计
- 8.4 主题轮动
- 快速研究主题神器
- recommendation based on subject
- strategy7: recommendation based on theme
- 板块异动类
- 风险因子(离散类)
- 8.5 龙头轮动
- Competitive Securities
- Market Competitiveness
- 主题龙头类
- 九 组合投资
- 9.1 指数跟踪 · [策略] 指数跟踪低成本建仓策略
- 9.2 GMVP · Global Minimum Variance Portfolio (GMVP)
- 9.3 凸优化 · 如何在 Python 中利用 CVXOPT 求解二次规划问题
- 十 波动率
- 10.1 波动率选股 · 风平浪静 风起猪飞
- 10.2 波动率择时
- 基于 VIX 指数的择时策略
- 简单低波动率指数
- 10.3 Arch/Garch 模型 · 如何使用优矿进行 GARCH 模型分析
- 十一 算法交易
- 11.1 VWAP · Value-Weighted Average Price (VWAP)
- 十二 中高频交易
- 12.1 order book 分析 · 基于高频 limit order book 数据的短程价格方向预测—— via multi-class SVM
- 12.2 日内交易 · 大盘日内走势 (for 择时)
- 十三 Alternative Strategy
- 13.1 易经、传统文化 · 老黄历诊股
- 第三部分 基金、利率互换、固定收益类
- 一 分级基金
- “优矿”集思录——分级基金专题
- 基于期权定价的分级基金交易策略
- 基于期权定价的兴全合润基金交易策略
- 二 基金分析
- Alpha 基金“黑天鹅事件” -- 思考以及原因
- 三 债券
- 债券报价中的小陷阱
- 四 利率互换
- Swap Curve Construction
- 中国 Repo 7D 互换的例子
- 第四部分 衍生品相关
- 一 期权数据
- 如何获取期权市场数据快照
- 期权高频数据准备
- 二 期权系列
- [ 50ETF 期权] 1. 历史成交持仓和 PCR 数据
- 【50ETF期权】 2. 历史波动率
- 【50ETF期权】 3. 中国波指 iVIX
- 【50ETF期权】 4. Greeks 和隐含波动率微笑
- 【50ETF期权】 5. 日内即时监控 Greeks 和隐含波动率微笑
- 【50ETF期权】 5. 日内即时监控 Greeks 和隐含波动率微笑
- 三 期权分析
- 【50ETF期权】 期权择时指数 1.0
- 每日期权风险数据整理
- 期权头寸计算
- 期权探秘1
- 期权探秘2
- 期权市场一周纵览
- 基于期权PCR指数的择时策略
- 期权每日成交额PC比例计算
- 四 期货分析
- 【前方高能!】Gifts from Santa Claus——股指期货趋势交易研究