Valuing a Forward Delivery Bond with QuantLib
Summary
The document presents a QuantLib setup for valuing a fixed-rate bond today and a forward contract that delivers the bond on a later date. Its example describes an already-issued ten-year bond with semiannual coupons, then constructs a schedule, a fixed-rate bond, a discounting engine, and a bond forward. The question centers on whether the selected instrument correctly represents a bond whose delivery occurs after some coupon dates.
The post does not include an answer or show any output, so it does not resolve how accrued interest, coupons paid before delivery, or the forward’s settlement conventions affect the valuation. It also does not provide discount curves or a complete reproducible setup. The code is best read as an implementation question and illustration of the relevant QuantLib objects, rather than as a worked method with demonstrated pricing results. Correct valuation depends on the instrument conventions, dates, and term structures supplied.
Key ideas
- A bond forward represents a contract to deliver a bond on a specified future date.
- The example builds a semiannual fixed-rate bond and a corresponding forward instrument.
- The question concerns coupon cash flows occurring before the delivery date.
- No answer or pricing output is given to confirm the setup or resolve coupon treatment.
- Forward value depends on dates, settlement conventions, and the discount curves used.
Tags
Full text
# Price of a forward delivery bond - Quantlib python # Price of a forward delivery bond - Quantlib python I would like to find the bond price today which has already been issued but delivered later. Basically, the price won't include some of the coupons till the delivery date. Let's say 10 year bond issued 2 years ago. Today 1/12/2022. Issue date 1/12/2020. Maturity Date 1/12/2030. Coupon 1.5% semiannual. Forward delivery date 3/27/2025. I tried the following but not sure if my using the right instrument. ``` issueDate = 1/12/2020 today = 1/12/2022 maturityDate = 1/12/2030 fwdDeliveryDate = 3/27/2025 tenor = ql.Period(ql.Semiannual) calendar = ql.UnitedStates() bussinessConvention = ql.Following dateGeneration = ql.DateGeneration.Backward monthEnd = False schedule = ql.Schedule (issueDate, maturityDate, tenor, calendar, bussinessConvention, bussinessConvention, dateGeneration, monthEnd) dayCount = ql.Actual365Fixed() couponRate = 0.015 coupons = [couponRate] settlementDays = 2 faceValue = 10000000 fixedRateBond = ql.FixedRateBond(settlementDays, faceValue, schedule, coupons, dayCount) bondEngine = ql.DiscountingBondEngine(discountTermStructure) fixedRateBond.setPricingEngine(bondEngine) fwd = ql.FixedRateBondForward(today,fwdDeliveryDate,ql.Position.Long,0,settlementDays,dayCount,calendar,bussinessConvention,fixedRateBond,discountTermStructure,discountTermStructure) print(fixedRateBond.NPV()) print(fwd.NPV()) ```
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.