# 策略评价 / 多组合评价 ## `TS_Performance` 声明:class 基于收益率的多组合评价框架 ### `fRtData` 声明:field 组合收益率(%)数据 必须设置 可见性:`public` 类型:table ### `fName_Date` 声明:field 日期字段 "截止日" 可见性:`public` 类型:string ### `fName_BM` 声明:field 基准收益率(%)字段 必须设置 可见性:`public` 类型:string ### `fName_RTS` 声明:field 组合收益率(%)字段 可见性:`public` 类型:array ### `fDaysIn1y` 声明:field 年化系数 默认为 1,表不年化 可见性:`public` 类型:int ### `fyRf` 声明:field 年化无风险收益率(%) 可见性:`public` 类型:real ### `fRollYears` 声明:field 滚动统计年份 array(1、3、5) 可见性:`public` 类型:array ### `fqKsplitCofig` 声明:field 当前区间、跟随区间窗口设置 可见性:`public` 类型:array ### `getCumReturns(type, ifdate)` 声明:function 提取累计收益率(%) 可见性:`public` | 参数 | 类型 | 说明 | | -------- | ------- | ------------------------ | | `type` | integer | 评价层次或返回类型选择项 | | `ifdate` | boolean | 布尔值,是否添加截止日列 | 返回:table ### `getRollCagrs(type, ifdate, roll_n)` 声明:function 提取滚动复合收益率(已年化) 可见性:`public` | 参数 | 类型 | 说明 | | -------- | ------- | ------------------------ | | `type` | integer | 评价层次或返回类型选择项 | | `ifdate` | boolean | 布尔值,是否添加截止日列 | | `roll_n` | integer | 整数,滚动 N期 | 返回:table ### `get_Extreme_Types(exttype)` 声明:function 按类型提取各组合与基准的极端区间对比 可见性:`public` | 参数 | 类型 | 说明 | | --------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `exttype` | integer | 整数,取值对照如下: 取值 含义 1 最大回撤发生期 2 最长回撤持续区间 3 最大连亏幅度区间 4 最长连亏区间 0 以上全部 -1 极端区间拼接模式 | 返回:table ### `get_Extreme_BMDDdrop(bm_dd)` 声明:function 指定多空收益概览 可见性:`public` | 参数 | 类型 | 说明 | | ------- | ---- | ------------------------------------------------------------------------- | | `bm_dd` | real | 实数,为 nil时,取 FBM_DD,比如:-10,表示回撤(%)<-10的区间作为市场极端期 | 返回:table ### `get_Compared_Summary(pairs)` 声明:function 指定多空收益概览 可见性:`public` | 参数 | 类型 | 说明 | | ------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `pairs` | array | 二维数字数组,2列,表示指定组合收益率(%)字段 FName_Rt中第 n(从 1开始)个,比如: array((1,-1)),表给了一个多空组合对,即取 FName_Rt中的第一个组合(多)和最后一个组合(空)作 | 返回:table ### `get_Compared_Describe(pairs)` 声明:function 多空滚动收益统计 可见性:`public` | 参数 | 类型 | 说明 | | ------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `pairs` | array | 二维数字数组,2列,表示指定组合收益率(%)字段 FName_Rt中第 n(从 1开始)个,比如: array((1,-1)),表给了一个多空组合对,即取 FName_Rt中的第一个组合(多)和最后一个组合(空)作 为多空组 | 返回:table ### `get_PFM_ToDate(showtype)` 声明:function 当前区间收益指标详情 可见性:`public` | 参数 | 类型 | 说明 | | ---------- | ------- | ------------------------------------------------------------------------------------------------------------------- | | `showtype` | integer | 整数型,展示方式 Showtype 取值 含义 备注 1 以指标为行标,以区间与资产为列标 默认 2 以区间为行标,以指标与资产为列表 | 返回:array ### `get_ABSPFM_summayQKCompared(cy, ifdebugcheck)` 声明:function 绝对收益区间对比 可见性:`public` | 参数 | 类型 | 说明 | | -------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | `cy` | string | 字符串型,周期 | | `ifdebugcheck` | integer | 整数型,返回区间信息,调试用 ifdebugcheck 取值 含义 备注 1 返回结果中包括开始日、截止日、实际开始日与实际截止日字段 默认 2 返回中无日期相关列 | 返回:array ### `get_RelPFM_summayQKCompared(cy, ifdebugcheck)` 声明:function 相对收益区间对比 可见性:`public` | 参数 | 类型 | 说明 | | -------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | `cy` | string | 字符串型,周期 | | `ifdebugcheck` | integer | 整数型,返回区间信息,调试用 ifdebugcheck 取值 含义 备注 1 返回结果中包括开始日、截止日、实际开始日与实际截止日字段 默认 2 返回中无日期相关列 | 返回:array ### `get_report_MetricsOverview(rtptype)` 声明:function 指标概览 可见性:`public` | 参数 | 类型 | 说明 | | --------- | ---- | --------------------------------------------------------------------------------- | | `rtptype` | int | 整数型,返回指标概览信息 取值 含义 备注 0 返回扁平指标 2 返回标准指标分组字典结构 | 返回:array ### `get_report_plot()` 声明:function 图表模式 可见性:`public`