天软金融分析.NET函数大全 > 金融函数 > 金融工程 > 投资组合 > 相关系数与BetaAlpha

CorrelMatrix    

简述
股票列表之间的相关系数。与当前时间有关,当前时间为区间截止日。
定义
CorrelMatrix (Stocks:Array;StartDate:TDateTime):TableArray
参数
名称类型说明
StocksArray一维字符串数组,股票列表
StartDateTDateTime日期型时间,开始计算日期
返回TableArray股票列表之间的相关系数
  • 范例

    //组合个股相关矩阵


    setsysparam(pn_date(),20201231T);
      stocks:=array("SH600718","SZ000920");
      return CorrelMatrix(stocks,inttodate(20120926));

    //结果:
相关