Comments (7)
I am not making a choice on the termination biz day convention and coupon biz day convention; these are read from bond's reference data, provided by Markit and are supposed to be as per my first post, though could very well be wrong as Markit often
changes these data on bonds.
However, I am using 1.29 and it seems that the problem goes away on 1.31 so thank you for the pointer and help!
from quantlib.
Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it.
from quantlib.
When is the first coupon date? Is it regular, short or long? Your termination convention is Following
in the code above. If you want regular first coupon then set endOfMonth to false
and DateGeneration::Forward
. If first coupon is not regular set firstDate to first coupon date and again DateGeneration::Forward
. If you want to set the last coupon date instead of first then use nextToLastDate and DateGeneration::Backward
.
Date firstCouponDate = Date(...);
Schedule bond_sched(issue_date, maturity_date,
Period(Semiannual), bond_calendar,
bond_convention,
Unadjusted,
DateGeneration::Forward,
true,
firstCouponDate);
from quantlib.
The date generation rule is backward for this bond and the termination convention is specified as Following in its reference data.
The end of month, date generation and biz day convention, if changed, would alter the coupon schedule for the bond, to pay coupons on the start of the following month so I think that won't work.
It is very confusing why using a termination convention other than unadjusted, moves the first date of the schedule to end of month, which is what messes up the accrual for the bond.
Thanks vm for your help and suggestions.
from quantlib.
I can not see the problem. Running your code with empty call schedule as callability_prices
are not given received accrued amount of 4.175 as expected by BBG. Only termination date is moved to the next month you can use ModifiedFollowing
to avoid this which in fact doesn't affect accrued amount.
from quantlib.
Which version of QuantLib are you using? If below 1.31 please update to at least 1.31 and try again as there has been change of behavior to the end of month for effective date and the termination date.
from quantlib.
Related Issues (20)
- Add MixedLogLinearMonotonicLogCubicNaturalSpline interpolation method HOT 2
- Pricing Bonds with face values other than $100 HOT 2
- Modify number of internal interopolation iterations on PiecewiseNaturalLogCubicDiscount HOT 3
- Swap floating leg basis-point sensitivity includes coupons based on cashflow date - should it be fixing date? HOT 6
- Automatic Registration of Unit Tests Using Boost Test HOT 12
- NormalDistribution: missing "sample_type" HOT 7
- Swaption never caches results when calculated with BlackSwaptionEngine HOT 7
- Segfault on multi-threaded CSharp app with QuantLib-1.31.1 (SWIG) HOT 11
- Update conda version HOT 3
- Bad interpolation ql.ZeroCurve HOT 6
- Inconsistent currency formatting HOT 4
- Exploring Fuzz-Testing for QuantLib HOT 4
- Pass coupon pricer to the SwapRateHelper constructor for timing/convexity adjustments HOT 9
- Provide a Sphinx version of QuantLib C++ Documentation HOT 7
- SobolRsg using std::uint_least32_t instead of std::uint32_t HOT 3
- Compilation failure of test-suite/optimizers.cpp HOT 1
- CMake presets always select Makefile generator for linux builds HOT 2
- Visual Studio compiler warning `The contents of <stdfloat> are available only with C++23 or later.` HOT 2
- Assessment of the difficulty in porting CPU architecture for quantlib HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quantlib.