RSRS 择时初探

目录

RSRS(Resistance Support Relative Strength) 通过 OLS 对一段时间内的最高价/最低价序列做回归,斜率反映支撑/阻力的相对强弱。

信号构造

import numpy as np

def rsrs(high, low, n=18):
    x = np.log(low[-n:])          # 低点
    y = np.log(high[-n:])         # 高点
    beta, _ = np.polyfit(x, y, 1) # 斜率
    return beta

当斜率分位点突破阈值时看多。注意加上波动率过滤,避免在高波动区频繁交易。

回测小结

  • 样本内年化显著提升
  • 样本外需谨慎,注意过拟合

后续会结合 chaos_strategy 的 RSRS 模块做更完整的对比。