范例1:
//返回OF000001在2021-05-01至2021-05-14的复权基准日为上市日的比例复权净值数据
setsysparam(pn_stock(),"OF000001");
SetSysParam(PN_Rate(),1) ;
SetSysParam(PN_RateDay(),-1);
return FundNAWByRateBegtEndt(20210501T,20210514T);
返回结果:(图中结果保留了四位小数)
范例2:
//返回多个票在一段区间内的复权净值数据
funds:= array('OF00006','OF000017','OF000020');
r:=array();
SetSysParam(PN_Rate(),1) ;
SetSysParam(PN_RateDay(),-1);
for i:=0 to length(funds)-1 do
r&=select funds[i] as "Fundid",* from spec(FundNAWByRateBegtEndt(20240601T,20240621T),funds[i]) end;
return r;