知识库 > 金融建模 > 公用函数 > 扩展函数 > .Net扩展函数 > 股票 > 综合指标 > 风险收益 > 中间函数

ResidualMatrix    

简述
回归残差
定义
ResidualMatrix(y:Table,x:Table,beta:Real,alpha:Real):Table
参数

Y:数组
X:数组
Beta:实数
Alpha:实数

返回:数组
  • 范例:

    //从20120630往前10个交易日万科A与上证指数的回归残差
    SetSysParam(pn_date(),inttodate(20120630));
    x:=nday3(10,spec(stockzf3(),'SH000001'));
    y:=nday3(10,spec(stockzf3(),'SZ000002'));
    return ResidualMatrix(y,x,0.1,0.2);

    //结果:

    参考
      
相关