bndtotalreturn is function in matlab Financial Toolbox . Two Input Arguments for bndtotalreturn is about leap year . One is 'basis',another 'DiscountBasis' .What is the difference between the 'basis' and 'DiscountBasis'? it's confusing
I make a leap year test .
1、 basis=0 DiscountBasis=3 get the correct result
2、basis=3 DiscountBasis=0 get wrong result
It seems that 'DiscountBasis' doesn't matter because it doesn't work! But the basis played a decisive role!
Is it right?
Price = 106.9302;
CouponRate = 0.08;
Settle = '15-Jan-2020';
Maturity = '1-Jan-2023';
ReinvestRate = 0.06;
Face = 100;
Basis = 3; %计算方式 actual/365
IssueDate = '1-Jan-2020';
Period = 1;
HorizonPrice = 106.9302;
HorizonDate = '1-Mar-2020';
CompoundingFrequency = 1; %复利频率 1代表年度复利
DiscountBasis = 0; %折现因子计算方式 actual/365
[BondEquiv,EffectiveRate] = bndtotalreturn(Price,CouponRate,Settle,Maturity,ReinvestRate,...
'Face',Face,'IssueDate',IssueDate,'Period',Period,'HorizonPrice',HorizonPrice,'HorizonDate',...
HorizonDate,'CompoundingFrequency',CompoundingFrequency,'DiscountBasis',DiscountBasis,'Basis',Basis)
function in Financial Toolbox . Two Input Arguments