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

PortfolioBackTesting_Quantity_CashAllocation    

简述

数量类套利类组合资金分配,按照最新剩余资金、最新持仓个数和资金分配方法,确定每个准备买入证券所分配的资金
定义
PortfolioBackTesting_Quantity_CashAllocation(Cash:Real;NewestNumber:Integer;NumberOfWillBuying:Integer;MaxNumer:Integer;MinNumber:Integer;MethodType:Integer;Number:Integer;CashPerUnit:Real);
参数
名称类型说明
CashReal实数,可用资金
NewestNumberInteger整数:最新持有个数
NumberOfWillBuyingInteger整数,符合买入条件的个数
MaxNumerInteger整数,最多允许持有个数
MinNumberInteger整数,最少持有个数
MethodTypeInteger整数,资金分配方法,取值为0表示固定最大持有个数法,取值为1表示最少持有个数法
NumberInteger整数,实际可买入个数
CashPerUnitReal实数,每个所分配的资金
返回实际可买入个数以及每个可分配的资金
  • 范例

    PortfolioBackTesting_Quantity_CashAllocation(10000000,5,4,10,5,0,Number,CashPerUnit);
    return array('实际可买入个数':Number,'分配资金':CashPerUnit);

    //结果:
     
相关