Implementation:Avhz RustQuant ZeroCouponBond
| Knowledge Sources | |
|---|---|
| Domains | Fixed_Income, Quantitative_Finance |
| Last Updated | 2026-02-07 19:00 GMT |
Overview
Defines a zero-coupon bond data structure representing a pure discount bond that pays no periodic interest and returns the principal at maturity.
Description
The ZeroCouponBond struct represents a debt security that does not pay periodic interest (coupons). Instead, it is issued at a discount to its face value and the investor receives the full face value at maturity. The struct holds the evaluation date (pricing date), the expiration date (maturity), and an optional currency.
This struct serves as a foundational building block in the library. The CouponBond2 struct in the coupon bond module uses ZeroCouponBond instances to represent a coupon bond as a portfolio of zero-coupon bonds. The struct currently does not implement the Instrument trait directly; pricing is expected to be handled through short-rate model implementations (e.g., Vasicek, CIR, Hull-White) or through discount curves.
Usage
Use this struct when you need to represent a zero-coupon bond or when constructing a coupon bond as a portfolio of zeros. It is primarily a data container for bond identification and scheduling.
Code Reference
Source Location
- Repository: RustQuant
- File: crates/RustQuant_instruments/src/bonds/zero_coupon_bond.rs
- Lines: 1-39
Signature
pub struct ZeroCouponBond {
pub evaluation_date: Date,
pub expiration_date: Date,
pub currency: Option<Currency>,
}
Import
use RustQuant::instruments::bonds::zero_coupon_bond::ZeroCouponBond;
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| evaluation_date | Date | Yes | The date the bond is being priced |
| expiration_date | Date | Yes | The maturity date when the face value is paid |
| currency | Option<Currency> | No | The currency denomination of the bond |
Outputs
| Name | Type | Description |
|---|---|---|
| (struct fields) | -- | Data container only; no methods or trait implementations are provided in this file |
Usage Examples
use RustQuant::instruments::bonds::zero_coupon_bond::ZeroCouponBond;
use RustQuant::instruments::fx::currency::Currency;
use time::Date;
let zcb = ZeroCouponBond {
evaluation_date: today,
expiration_date: today + time::Duration::days(365),
currency: Some(USD),
};