Coverage for rivapy / instruments / __init__.py: 100%
30 statements
« prev ^ index » next coverage.py v7.12.0, created at 2025-11-27 14:36 +0000
« prev ^ index » next coverage.py v7.12.0, created at 2025-11-27 14:36 +0000
1from rivapy.instruments.factory import _factory
2from rivapy.instruments.specifications import *
3from rivapy.instruments.components import Issuer
4from rivapy.instruments.bond_specifications import DeterministicCashflowBondSpecification
5from rivapy.instruments.cds_specification import CDSSpecification
6from rivapy.instruments.ppa_specification import PPASpecification, GreenPPASpecification
8from rivapy.instruments.bond_specifications import (
9 ZeroBondSpecification,
10 FixedRateBondSpecification,
11 # PlainVanillaCouponBondSpecification,
12 FloatingRateBondSpecification,
13 # FixedToFloatingRateNoteSpecification,
14)
15from rivapy.instruments.components import CashFlow
16from rivapy.instruments.energy_futures_specifications import EnergyFutureSpecifications
17from rivapy.instruments.deposit_specifications import DepositSpecification
18from rivapy.instruments.fra_specifications import ForwardRateAgreementSpecification
19from rivapy.instruments.ir_swap_specification import (
20 IrSwapLegSpecification,
21 IrFixedLegSpecification,
22 IrFloatLegSpecification,
23 IrOISLegSpecification,
24 InterestRateSwapSpecification,
25 InterestRateBasisSwapSpecification,
26)
29def _add_to_factory(cls):
30 factory_entries = _factory()
31 factory_entries[cls.__name__] = cls
34_add_to_factory(Issuer)
35_add_to_factory(PPASpecification)
36_add_to_factory(GreenPPASpecification)
37_add_to_factory(ZeroBondSpecification)
38_add_to_factory(FixedRateBondSpecification)
39# _add_to_factory(PlainVanillaCouponBondSpecification)
40_add_to_factory(FloatingRateBondSpecification)
41_add_to_factory(EnergyFutureSpecifications)
42_add_to_factory(DepositSpecification)
43_add_to_factory(ForwardRateAgreementSpecification)
44_add_to_factory(IrSwapLegSpecification)
45_add_to_factory(IrFixedLegSpecification)
46_add_to_factory(IrFloatLegSpecification)
47_add_to_factory(IrOISLegSpecification)
48_add_to_factory(InterestRateSwapSpecification)
49_add_to_factory(InterestRateBasisSwapSpecification)
50# _add_to_factory(CashFlow)