Bugs item #3116601, was opened at 2010-11-23 14:01
Message generated for change (Comment added) made by
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112740&aid=3116601&group_id=12740Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By:
https://www.google.com/accounts ()
Assigned to: Nobody/Anonymous (nobody)
Summary: Bond Yield calculation for short maturity bonds
Initial Comment:
Source file: bond.cpp
----------------------------------------------------------------------
>Comment By:
https://www.google.com/accounts ()
Date: 2010-11-23 14:03
Message:
Rate Bond::yield(const DayCounter& dc,
Compounding comp,
Frequency freq,
Real accuracy,
Size maxEvaluations) const {
Real currentNotional = notional(settlementDate());
if (currentNotional == 0.0)
return 0.0;
return BondFunctions::yield(*this, cleanPrice(), dc, comp, freq,
settlementDate(),
accuracy, maxEvaluations);
}
In the above function:
Real currentNotional = notional(settlementDate());
should be
Real currentNotional = notional(settlementDate(settlement));
else it will always return yield=0 if settlement < maturity date. this is
observed for short maturity bonds.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112740&aid=3116601&group_id=12740------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev