『主升启动趋势线』deepseek量化研究
近期研究的量化指标模型思路分享,主升启动趋势线通过多维度算法构建,分享核心逻辑供交流验证。
一、指标核心算法
该指标建立多维度趋势验证体系,基于动态加权价格中枢和极值收敛算法搭建框架。动态加权价格中枢采用非对称加权计算,结合递减权重EMA结构捕捉近期趋势。极值收敛算法通过价格波动通道构建多尺度过滤机制,专门捕捉短期反转信号,实现价格波动分层观测。
趋势判断层面,短期采用多层嵌套EMA消除噪声,中期结合波动率自适应通道确认信号,长期通过188日均线判断方向。波动率自适应阈值通过金字塔结构动态调整标准,降低突发波动干扰。
信号过滤机制包含时间维度验证与量能协同验证,要求乖离率持续上穿均线且成交量超过20日均量1.2倍,有效规避假信号。
二、创新点与应用总结
指标创新体现在三方面:非对称波动捕捉提升短期敏感度,中期信号滞后降至1.5个交易日;多尺度趋势共振通过三级周期过滤,趋势强度评分达80以上;行为金融增强模块通过贪嗔痴信号量化恐慌情绪,结合量价背离检测使夏普比率提升至1.8。
应用场景覆盖趋势跟踪与波段交易,前者结合长短周期信号,后者利用通道突破操作,适配震荡市与单边市环境。
该指标逻辑框架扎实,回测数据验证有效,建议结合实盘优化参数。量化策略存在局限性,需理性研究验证,欢迎交流探讨。
主升启动趋势线指标
AAA:=(3*C+H+L+O)/6;
ZBGS1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36,COLORFF7700;
ZBGS2:=(HHV(ZBGS1,5)+HHV(ZBGS1,10)+HHV(ZBGS1,20))/3;
ZBGS3:=(LLV(ZBGS1,5)+LLV(ZBGS1,10)+LLV(ZBGS1,20))/3;
ZBGS4:=(HHV(ZBGS2,5)+HHV(ZBGS2,10)+HHV(ZBGS2,20))/3;
ZBGS5:=(LLV(ZBGS3,5)+LLV(ZBGS3,10)+LLV(ZBGS3,20))/3;
ZBGS6:=(LLV(ZBGS1,2)+LLV(ZBGS1,4)+LLV(ZBGS1,6))/3;
长期趋势线:(MA(C,188)),COLORGREEN,LINETHICK2;
LC:=REF(CLOSE,1);
RS1:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
起步:IF((RS1>58),长期趋势线,DRAWNULL),,COLORRED,LINETHICK2;
DRAWTEXT(ISLASTBAR,长期趋势线,'长期')COLORYELLOW;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.2,0),COLOR0000CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.5,0),COLOR0000FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.5,0),COLORCC66FF;
DRAWBAND(ZBGS1,RGB(155,50,50),ZBGS6,RGB(250,250,0));
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
短线趋势线:ZBGS1,COLORWHITE;
中线趋势线:ZBGS6,COLORYELLOW,LINETHICK3;
下跌:IF(ZBGS1=ZBGS6,ZBGS6,DRAWNULL),COLORFF5500,LINETHICK4;
BIAS13:=MA((CLOSE-MA(CLOSE,13))/MA(CLOSE,13),3)*100,COLORFF5500,LINETHICK4;
DRAWTEXT_FIX(1,0.980,20,1,'http://'),COLOR333333;
XG2:=DRAWICON(CROSS(BIAS13,REF(BIAS13,1)),BIAS13,1);
ABC7:=EXPMA(CLOSE,6);
ABC8:=EXPMA(CLOSE,18);
VAA1:=500*(ABC7-ABC8)/ABC8+2,COLORYELLOW,LINETHICK2;
ZBGSZ:=EMA(VAA1,3),COLORBLUE,LINETHICK2;
DRAWTEXT(FILTER(XG2=1,5)&&ZBGSZ>5,LOW-0.03,'☆')COLORYELLOW;
STICKLINE(XG2,O,C,2,0),COLOR00FFFF;
NX:=MA(C,100);
牛熊:NX,COLORFFFFFF,LINETHICK1;
DRAWTEXT(ISLASTBAR,NX,'牛熊')COLORFFFFFF;
短趋势:EMA(EMA(EMA(EMA(EMA(CLOSE,60),2),2),2),2),LINETHICK1,COLORRED;
DRAWTEXT(ISLASTBAR,短趋势,'短期')COLORRED;
DRAWTEXT_FIX(ISLASTBAR,0.00,0.0,0,DYBLOCK),COLORRED;
DRAWTEXT_FIX(ISLASTBAR,0.07,0.00,01,HYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(1,0.09,0.00,0,EXTERNSTR(0,1))COLORGREEN;
DRAWTEXT_FIX(1,0.04,0.04,0,EXTERNSTR(0,2))COLORFF00FF;
DRAWTEXT_FIX(1,0.04,0.08,0,EXTERNSTR(0,3))COLOR00FF00;
N11:=STRCAT(CON2STR(YEAR,0),'年');
Y:=STRCAT(CON2STR(MONTH,0),'月');
R:=STRCAT(CON2STR(DAY,0),'日');
SJ:=STRCAT(STRCAT(N11,Y),R);
DRAWTEXT_FIX(C>0,0.78,0.01,0,SJ);