布林线BOLL优化模型构建.pptVIP

  • 27
  • 0
  • 约 36页
  • 2017-01-15 发布于广东
  • 举报
布林线BOLL优化模型构建

三、实证分析 预测期 ma=mean(Close(i-j:i)); std1=std(Close(i-j:i),1)*2; up=ma+std1; dn=ma-std1; ma15=mean(Close((i-(j+5)):i)); ma30=mean(Close((i-(j+20)):i)); 函数求解最优的J值 [p,q]=min(maxbackmm); fprintf(最优的值为%i\n, q+3); fprintf(最小最大回撤为%i\n,p); 投资策略 buy=(Close(I)up)(ma15ma30);%开多 sellshort=(Close(I)dn)(ma15ma30);%开空 sell=(Close(I)min(0.618*ma,lc5d(I)))||(Close(I)1.2*highestshoupanjia(I-currentbar));%平多 buytocover=(Close(I)max(0.618*ma,h5cd(I)))||(Close(I)0.8*lowestshoupanjia(I-currentbar));%平空 模型再次优化 交易次数太少,或者购买条件苛刻使得买入或者卖出时机很难实现,简化模型。回归经典。 代码实现 buy=(Close(I)up)||(ma15ma30);%开多 sellshort=(Close(I)dn)||(ma

文档评论(0)

1亿VIP精品文档

相关文档