Skip to content

Commit 564d93e

Browse files
attack68mikelync
andauthored
ENH: add FloatRateNote component (#167) (#1091)
Co-authored-by: Mike Lync <[email protected]>
1 parent 96ddbc1 commit 564d93e

File tree

11 files changed

+785
-147
lines changed

11 files changed

+785
-147
lines changed

python/rateslib/instruments/components/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Bill,
33
BondFuture,
44
FixedRateBond,
5+
FloatRateNote,
56
IndexFixedRateBond,
67
)
78
from rateslib.instruments.components.cds import CDS
@@ -41,6 +42,7 @@
4142
"FXVolValue",
4243
"FXSwap",
4344
"FixedRateBond",
45+
"FloatRateNote",
4446
"IndexFixedRateBond",
4547
"BondFuture",
4648
"Bill",
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from rateslib.instruments.components.bonds.bill import Bill
22
from rateslib.instruments.components.bonds.bond_future import BondFuture
33
from rateslib.instruments.components.bonds.fixed_rate_bond import FixedRateBond
4+
from rateslib.instruments.components.bonds.float_rate_note import FloatRateNote
45
from rateslib.instruments.components.bonds.index_fixed_rate_bond import IndexFixedRateBond
56

6-
__all__ = ["FixedRateBond", "IndexFixedRateBond", "BondFuture", "Bill"]
7+
__all__ = ["FixedRateBond", "IndexFixedRateBond", "BondFuture", "Bill", "FloatRateNote"]

python/rateslib/instruments/components/bonds/fixed_rate_bond.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
CalInput,
2222
CurveOption_,
2323
Curves_,
24+
DualTypes,
2425
DualTypes_,
2526
Frequency,
2627
FXForwards_,
@@ -294,7 +295,7 @@ def rate(
294295
settlement: datetime_ = NoInput(0),
295296
forward: datetime_ = NoInput(0),
296297
metric: str_ = NoInput(0),
297-
) -> DualTypes_:
298+
) -> DualTypes:
298299
metric_ = _drb(self.kwargs.meta["metric"], metric).lower()
299300
if metric_ in ["clean_price", "dirty_price", "ytm"]:
300301
_curves = self._parse_curves(curves)

0 commit comments

Comments
 (0)