Zero Bond
This module contains examples of zero coupon bond and related contracts.
Bond
dataclass
Bases: EventsMixin
A zero coupon bond pays a single fixed payment at a future time.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ccy |
str
|
the currency of the bond. |
required |
maturity |
datetime
|
the maturity of the bond. |
required |
track |
str
|
an optional identifier for the contract. |
''
|
Examples:
>>> Bond("USD", datetime(2025, 3, 31)).print_events()
time op quantity unit track
03/31/2025 + 1.0 USD
Source code in qablet_contracts\bnd\zero.py
BondPut
dataclass
Bases: EventsMixin
A zero coupon bond put offers the holder the option to sell a zero coupon bond for a fixed strike price, on the option maturity date.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ccy |
str
|
the currency of the bond. |
required |
opt_maturity |
datetime
|
the maturity of the option. |
required |
bond_maturity |
datetime
|
the maturity of the bond. |
required |
strike |
float
|
the option strike. |
required |
track |
str
|
an optional identifier for the contract. |
''
|
Examples:
>>> BondPut("USD", datetime(2024, 9, 30), datetime(2025, 3, 31), 0.95).print_events()
time op quantity unit track
09/30/2024 > 0.00 USD
09/30/2024 + 0.95 USD
03/31/2025 + -1.00 USD
Source code in qablet_contracts\bnd\zero.py
BondCall
dataclass
Bases: EventsMixin
A zero coupon bond call offers the holder the option to buy a zero coupon bond for a fixed strike price, on the option maturity date.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ccy |
str
|
the currency of the bond. |
required |
opt_maturity |
datetime
|
the maturity of the option. |
required |
bond_maturity |
datetime
|
the maturity of the bond. |
required |
strike |
float
|
the option strike. |
required |
track |
str
|
an optional identifier for the contract. |
''
|
Examples:
>>> BondCall("USD", datetime(2024, 9, 30), datetime(2025, 3, 31), 0.95).print_events()
time op quantity unit track
09/30/2024 > 0.00 USD
09/30/2024 + -0.95 USD
03/31/2025 + 1.00 USD