sdk.lusid.models.lusid_instrument.LusidInstrument

class LusidInstrument(**data)[source]

Base class in the hierarchy for representing the full economic definition of instruments in LUSID. These definitions are used to provide instrument analytics such as PV, accrual, cash flows, and risk. This base class should not be directly instantiated; each supported InstrumentType has a corresponding inherited class. # noqa: E501

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Attributes

This is a Pydantic class. For now, click on the green [source] link in the class signature above to see descriptions/allowed values for these attributes.

instrument_type

class Config[source]

Pydantic configuration

classmethod from_dict(obj)[source]

Create an instance of LusidInstrument from a dict

Return type:

Union(Basket, Bond, CapFloor, CashPerpetual, CdsIndex, ComplexBond, ContractForDifference, CreditDefaultSwap, Equity, EquityOption, EquitySwap, ExchangeTradedOption, ExoticInstrument, FlexibleLoan, ForwardRateAgreement, FundShareClass, Future, FxForward, FxOption, FxSwap, InflationLeg, InflationLinkedBond, InflationSwap, InstrumentLeg, InterestRateSwap, InterestRateSwaption, ReferenceInstrument, Repo, SimpleCashFlowLoan, SimpleInstrument, TermDeposit, TotalReturnSwap)

classmethod from_json(json_str)[source]

Create an instance of LusidInstrument from a JSON string

Return type:

Union(Basket, Bond, CapFloor, CashPerpetual, CdsIndex, ComplexBond, ContractForDifference, CreditDefaultSwap, Equity, EquityOption, EquitySwap, ExchangeTradedOption, ExoticInstrument, FlexibleLoan, ForwardRateAgreement, FundShareClass, Future, FxForward, FxOption, FxSwap, InflationLeg, InflationLinkedBond, InflationSwap, InstrumentLeg, InterestRateSwap, InterestRateSwaption, ReferenceInstrument, Repo, SimpleCashFlowLoan, SimpleInstrument, TermDeposit, TotalReturnSwap)

classmethod get_discriminator_value(obj)[source]

Returns the discriminator value (object type) of the data

Return type:

str

classmethod instrument_type_validate_enum(value)[source]

Validates the enum

to_dict()[source]

Returns the dictionary representation of the model using alias

to_json()[source]

Returns the JSON representation of the model using alias

Return type:

str

to_str()[source]

Returns the string representation of the model using alias

Return type:

str