bnddury function / Financial toolbox
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Aleksandar
le 20 Oct 2013
Réponse apportée : Image Analyst
le 20 Oct 2013
If I set the following: Yield=0.11245;CouponRate=0.175;Settle='04-Apr-12';Maturity='04-Oct-13';Period=12;Basis=0;... EndMonthRule=1;IssueDate='04-Apr-12';FirstCouponDate='04-Oct-13';LastCouponDate='04-Oct-13';... StartDate='04-Apr-12';Face=10654.48;
[ModDuration, YearDuration, PerDuration] = bnddury(Yield,CouponRate, Settle, Maturity,... Period, Basis, EndMonthRule,IssueDate,FirstCouponDate,LastCouponDate,StartDate,Face)
I get the following answer (quote): ??? Undefined function or variable "CFMQDates".
Error in ==> cfamounts at 739 CFMask = CFMQDates(Ind,:) <= Settle(Ind, ones(1,size(CFMQDates,2)));
Error in ==> bnddury at 187 [CFlowAmounts, ~, TFactors] = cfamounts(CouponRate, Settle, Maturity, varargin{:});
Error in ==> MyDurr at 28 [ModDuration, YearDuration, PerDuration] = bnddury(Yield,CouponRate, Settle, Maturity,...
(unquote)
If I set Period=0 than it is okay. What is the problem there? Can it be debugged (try and catch possibly)?
0 commentaires
Réponse acceptée
Image Analyst
le 20 Oct 2013
Well it looks like CFMQDates has not been assigned to anything before you attempt to use it. Of course it can be debugged. Set a breakpoint and then use F10 to step on/over lines/functions and F11 to step inside functions. For more debugging help, go here: http://blogs.mathworks.com/videos/2012/07/03/debugging-in-matlab/
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!