知识库 > 金融建模 > 公用函数 > 金融工程 > 策略验证 > 中间函数

PortfolioBackTesting_BuySellDefaultRatio    

简述
策略验证-缺省买卖费率和费用,判断数据BuyRatio,SellRatio BuyOtherFee ,SellOtherFee为nil则按照证券代码类型分别赋值
定义

PortfolioBackTesting_BuySellDefaultRatio(StockId:String,EndT:TDateTime,BuyRatio:Real,SellRatio:Real,BuyOtherFee:Real,SellOtherFee:Real):TableArray
参数

StockId:字符串,证券代码
EndT:日期型时间,截止日
BuyRatio:实数,开仓费率(%)
SellRatio:实数,平仓费率(%)
BuyOtherFee:实数,开仓其他费用
SellOtherFee:实数,平仓其他费用

返回:返策略验证-缺省买卖费率和费用
  • 范例:

     BuyRatio:=0.3;
     SellRatio:=NIL;
     BuyOtherFee:=NIL;
    PortfolioBackTesting_BuySellDefaultRatio('SH000300',INTTODATE(20121029),BuyRatio,SellRatio,BuyOtherFee,SellOtherFee);
    RETURN ARRAY(BuyRatio,SellRatio,BuyOtherFee);

    //结果:

相关