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

PortfolioBackTesting_BuySellDefaultRatio    

简述
策略验证-缺省买卖费率和费用,判断数据BuyRatio,SellRatio BuyOtherFee ,SellOtherFee为nil则按照证券代码类型分别赋值
定义
PortfolioBackTesting_BuySellDefaultRatio(StockId:String;EndT:TDateTime;BuyRatio:Real;SellRatio:Real;BuyOtherFee:Real;SellOtherFee:Real):TableArray
参数
名称类型说明
StockIdString字符串,证券代码
EndTTDateTime日期型时间,截止日
BuyRatioReal实数,开仓费率(%)
SellRatioReal实数,平仓费率(%)
BuyOtherFeeReal实数,开仓其他费用
SellOtherFeeReal实数,平仓其他费用
返回TableArray返策略验证-缺省买卖费率和费用
  • 范例

    BuyRatio:=0.3;
     SellRatio:=NIL;
     BuyOtherFee:=NIL;
    PortfolioBackTesting_BuySellDefaultRatio(

    'SH000300',

    inttodate(20121029),

    BuyRatio,

    SellRatio,

    BuyOtherFee,


    SellOtherFee);
    return array(BuyRatio,SellRatio,BuyOtherFee);

    //结果:
相关