天软金融分析.NET函数大全 > 金融函数 > 金融工程 > 策略验证 > 数量类中间函数

PortfolioBackTesting_Quantity_GetClose    

简述
证券指定日价格,与系统参数证券、周期相关
定义
PortfolioBackTesting_Quantity_GetClose(Endt:TDateTime;Stype:int;ISJS:bool):Real
参数
名称类型说明
EndtTDateTime日期型时间,截止日
Stypeint整数,证券类别
ISJSbool布尔型,是否取结算价
返回Real证券在指定日的价格
  • 范例


    setsysparam(pn_stock(),'IF01');
    setsysparam(pn_cycle(),cy_day());
    Endt:=inttodate(20230104);
    Stype:=stocktype(DefaultStockID());
    closePrice:=PortfolioBackTesting_Quantity_GetClose(Endt,Stype,0);
    settleprice:=PortfolioBackTesting_Quantity_GetClose(Endt,Stype,1);
    return array(
          '收盘价':closePrice,
          '结算价':settleprice
          );
    //结果:array("收盘价":3898.0,"结算价":3895.0);
相关