lusid-sdk 2.1.847__py3-none-any.whl → 2.1.848__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lusid/configuration.py +1 -1
- lusid/models/bond.py +8 -2
- lusid/models/cap_floor.py +8 -2
- lusid/models/cds_index.py +8 -2
- lusid/models/complex_bond.py +8 -2
- lusid/models/contract_for_difference.py +8 -2
- lusid/models/credit_default_swap.py +8 -2
- lusid/models/equity_option.py +8 -2
- lusid/models/equity_swap.py +8 -2
- lusid/models/exchange_traded_option.py +8 -2
- lusid/models/fixed_leg.py +8 -2
- lusid/models/flexible_deposit.py +8 -2
- lusid/models/flexible_loan.py +9 -3
- lusid/models/floating_leg.py +8 -2
- lusid/models/forward_rate_agreement.py +8 -2
- lusid/models/fund_share_class.py +8 -2
- lusid/models/funding_leg.py +8 -2
- lusid/models/future.py +8 -2
- lusid/models/fx_forward.py +8 -2
- lusid/models/fx_option.py +8 -2
- lusid/models/fx_swap.py +8 -2
- lusid/models/inflation_leg.py +8 -2
- lusid/models/inflation_linked_bond.py +8 -2
- lusid/models/inflation_swap.py +8 -2
- lusid/models/interest_rate_swap.py +8 -2
- lusid/models/interest_rate_swaption.py +8 -2
- lusid/models/loan_facility.py +9 -3
- lusid/models/repo.py +8 -2
- lusid/models/simple_cash_flow_loan.py +9 -3
- lusid/models/term_deposit.py +8 -2
- lusid/models/total_return_swap.py +8 -2
- {lusid_sdk-2.1.847.dist-info → lusid_sdk-2.1.848.dist-info}/METADATA +1 -1
- {lusid_sdk-2.1.847.dist-info → lusid_sdk-2.1.848.dist-info}/RECORD +34 -34
- {lusid_sdk-2.1.847.dist-info → lusid_sdk-2.1.848.dist-info}/WHEEL +0 -0
lusid/models/fund_share_class.py
CHANGED
@@ -22,6 +22,7 @@ from typing import Any, Dict, List, Optional
|
|
22
22
|
from pydantic.v1 import StrictStr, Field, Field, StrictStr, conlist, constr, validator
|
23
23
|
from lusid.models.lusid_instrument import LusidInstrument
|
24
24
|
from lusid.models.simple_rounding_convention import SimpleRoundingConvention
|
25
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
25
26
|
from lusid.models.trading_conventions import TradingConventions
|
26
27
|
|
27
28
|
class FundShareClass(LusidInstrument):
|
@@ -35,9 +36,10 @@ class FundShareClass(LusidInstrument):
|
|
35
36
|
dom_ccy: StrictStr = Field(...,alias="domCcy", description="The domestic currency of the instrument.")
|
36
37
|
rounding_conventions: Optional[conlist(SimpleRoundingConvention)] = Field(None, alias="roundingConventions", description="Rounding Convention used for the FundShareClass quotes")
|
37
38
|
trading_conventions: Optional[TradingConventions] = Field(None, alias="tradingConventions")
|
39
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
38
40
|
instrument_type: StrictStr = Field(...,alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
|
39
41
|
additional_properties: Dict[str, Any] = {}
|
40
|
-
__properties = ["instrumentType", "shortCode", "fundShareClassType", "distributionPaymentType", "hedging", "domCcy", "roundingConventions", "tradingConventions"]
|
42
|
+
__properties = ["instrumentType", "shortCode", "fundShareClassType", "distributionPaymentType", "hedging", "domCcy", "roundingConventions", "tradingConventions", "timeZoneConventions"]
|
41
43
|
|
42
44
|
@validator('instrument_type')
|
43
45
|
def instrument_type_validate_enum(cls, value):
|
@@ -141,6 +143,9 @@ class FundShareClass(LusidInstrument):
|
|
141
143
|
# override the default output from pydantic by calling `to_dict()` of trading_conventions
|
142
144
|
if self.trading_conventions:
|
143
145
|
_dict['tradingConventions'] = self.trading_conventions.to_dict()
|
146
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
147
|
+
if self.time_zone_conventions:
|
148
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
144
149
|
# puts key-value pairs in additional_properties in the top level
|
145
150
|
if self.additional_properties is not None:
|
146
151
|
for _key, _value in self.additional_properties.items():
|
@@ -170,7 +175,8 @@ class FundShareClass(LusidInstrument):
|
|
170
175
|
"hedging": obj.get("hedging"),
|
171
176
|
"dom_ccy": obj.get("domCcy"),
|
172
177
|
"rounding_conventions": [SimpleRoundingConvention.from_dict(_item) for _item in obj.get("roundingConventions")] if obj.get("roundingConventions") is not None else None,
|
173
|
-
"trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None
|
178
|
+
"trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None,
|
179
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
174
180
|
})
|
175
181
|
# store additional fields in additional_properties
|
176
182
|
for _key in obj.keys():
|
lusid/models/funding_leg.py
CHANGED
@@ -22,6 +22,7 @@ from typing import Any, Dict, Optional, Union
|
|
22
22
|
from pydantic.v1 import StrictStr, Field, Field, StrictFloat, StrictInt, StrictStr, validator
|
23
23
|
from lusid.models.instrument_leg import InstrumentLeg
|
24
24
|
from lusid.models.leg_definition import LegDefinition
|
25
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
25
26
|
|
26
27
|
class FundingLeg(InstrumentLeg):
|
27
28
|
"""
|
@@ -31,9 +32,10 @@ class FundingLeg(InstrumentLeg):
|
|
31
32
|
maturity_date: datetime = Field(..., alias="maturityDate", description="The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates beyond their last payment date.")
|
32
33
|
leg_definition: LegDefinition = Field(..., alias="legDefinition")
|
33
34
|
notional: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The initial notional of the Funding Leg instrument. When \"RequiresFundingLegHistory\" property key is present in transaction key, during a GetValuation endpoint call (for instance), this field would overriden by the Funding Leg history's notional and this notional field would not be used in the pricing and accrual calculations. As such, we recommend setting this to 0 or not setting it at all. Please see the following Notebook example and Knowledge Base article: Notebook: https://github.com/finbourne/sample-notebooks/blob/master/examples/use-cases/instruments/Funding%20Leg%20Swap.ipynb Knowledge Base article: https://support.lusid.com/knowledgebase/article/KA-01764/")
|
35
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
34
36
|
instrument_type: StrictStr = Field(...,alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
|
35
37
|
additional_properties: Dict[str, Any] = {}
|
36
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "legDefinition", "notional"]
|
38
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "legDefinition", "notional", "timeZoneConventions"]
|
37
39
|
|
38
40
|
@validator('instrument_type')
|
39
41
|
def instrument_type_validate_enum(cls, value):
|
@@ -130,6 +132,9 @@ class FundingLeg(InstrumentLeg):
|
|
130
132
|
# override the default output from pydantic by calling `to_dict()` of leg_definition
|
131
133
|
if self.leg_definition:
|
132
134
|
_dict['legDefinition'] = self.leg_definition.to_dict()
|
135
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
136
|
+
if self.time_zone_conventions:
|
137
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
133
138
|
# puts key-value pairs in additional_properties in the top level
|
134
139
|
if self.additional_properties is not None:
|
135
140
|
for _key, _value in self.additional_properties.items():
|
@@ -156,7 +161,8 @@ class FundingLeg(InstrumentLeg):
|
|
156
161
|
"start_date": obj.get("startDate"),
|
157
162
|
"maturity_date": obj.get("maturityDate"),
|
158
163
|
"leg_definition": LegDefinition.from_dict(obj.get("legDefinition")) if obj.get("legDefinition") is not None else None,
|
159
|
-
"notional": obj.get("notional")
|
164
|
+
"notional": obj.get("notional"),
|
165
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
160
166
|
})
|
161
167
|
# store additional fields in additional_properties
|
162
168
|
for _key in obj.keys():
|
lusid/models/future.py
CHANGED
@@ -23,6 +23,7 @@ from pydantic.v1 import StrictStr, Field, Field, StrictFloat, StrictInt, StrictS
|
|
23
23
|
from lusid.models.futures_contract_details import FuturesContractDetails
|
24
24
|
from lusid.models.lusid_instrument import LusidInstrument
|
25
25
|
from lusid.models.mark_to_market_conventions import MarkToMarketConventions
|
26
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
26
27
|
from lusid.models.trading_conventions import TradingConventions
|
27
28
|
|
28
29
|
class Future(LusidInstrument):
|
@@ -39,9 +40,10 @@ class Future(LusidInstrument):
|
|
39
40
|
underlying: Optional[LusidInstrument] = None
|
40
41
|
calculation_type: Optional[StrictStr] = Field(None,alias="calculationType", description="Calculation type for some Future instruments which have non-standard methodology. Optional, if not set defaults as follows: - If ExchangeCode is \"ASX\" and ContractCode is \"IR\" or \"BB\" set to ASX_BankBills - If ExchangeCode is \"ASX\" and ContractCode is \"YT\" set to ASX_3Year - If ExchangeCode is \"ASX\" and ContractCode is \"VT\" set to ASX_5Year - If ExchangeCode is \"ASX\" and ContractCode is \"XT\" set to ASX_10Year - If ExchangeCode is \"ASX\" and ContractCode is \"LT\" set to ASX_20Year - otherwise set to Standard Specific calculation types for bond and interest rate futures are: - [Standard] The default calculation type, which does not fit into any of the categories below. - [ASX_BankBills] Used for AUD and NZD futures “IR” and “BB” on ASX. 90D Bank Bills. - [ASX_3Year] Used for “YT” on ASX. 3YR semi-annual bond (6 coupons) @ 6%. - [ASX_5Year] Used for “VT” on ASX. 5yr semi-annual bond (10 coupons) @ 2%. - [ASX_10Year] Used for “XT” on ASX. 10yr semi-annual bond (20 coupons) @ 6%. - [ASX_20Year] Used for “LT” on ASX. 20yr semi-annual bond (40 coupons) @ 4%. - [B3_DI1] Used for “DI1” on B3. Average of 1D interbank deposit rates. - For futures with this calculation type, quote values are expected to be specified as a percentage. For example, a quoted rate of 13.205% should be specified as a quote of 13.205 with a face value of 100. Supported string (enumeration) values are: [Standard, ASX_BankBills, ASX_3Year, ASX_5Year, ASX_10Year, ASX_20Year, B3_DI1].")
|
41
42
|
trading_conventions: Optional[TradingConventions] = Field(None, alias="tradingConventions")
|
43
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
42
44
|
instrument_type: StrictStr = Field(...,alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
|
43
45
|
additional_properties: Dict[str, Any] = {}
|
44
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "identifiers", "contractDetails", "contracts", "markToMarketConventions", "refSpotPrice", "underlying", "calculationType", "tradingConventions"]
|
46
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "identifiers", "contractDetails", "contracts", "markToMarketConventions", "refSpotPrice", "underlying", "calculationType", "tradingConventions", "timeZoneConventions"]
|
45
47
|
|
46
48
|
@validator('instrument_type')
|
47
49
|
def instrument_type_validate_enum(cls, value):
|
@@ -147,6 +149,9 @@ class Future(LusidInstrument):
|
|
147
149
|
# override the default output from pydantic by calling `to_dict()` of trading_conventions
|
148
150
|
if self.trading_conventions:
|
149
151
|
_dict['tradingConventions'] = self.trading_conventions.to_dict()
|
152
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
153
|
+
if self.time_zone_conventions:
|
154
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
150
155
|
# puts key-value pairs in additional_properties in the top level
|
151
156
|
if self.additional_properties is not None:
|
152
157
|
for _key, _value in self.additional_properties.items():
|
@@ -179,7 +184,8 @@ class Future(LusidInstrument):
|
|
179
184
|
"ref_spot_price": obj.get("refSpotPrice"),
|
180
185
|
"underlying": LusidInstrument.from_dict(obj.get("underlying")) if obj.get("underlying") is not None else None,
|
181
186
|
"calculation_type": obj.get("calculationType"),
|
182
|
-
"trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None
|
187
|
+
"trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None,
|
188
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
183
189
|
})
|
184
190
|
# store additional fields in additional_properties
|
185
191
|
for _key in obj.keys():
|
lusid/models/fx_forward.py
CHANGED
@@ -21,6 +21,7 @@ from datetime import datetime
|
|
21
21
|
from typing import Any, Dict, Optional, Union
|
22
22
|
from pydantic.v1 import StrictStr, Field, Field, StrictBool, StrictFloat, StrictInt, StrictStr, validator
|
23
23
|
from lusid.models.lusid_instrument import LusidInstrument
|
24
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
24
25
|
|
25
26
|
class FxForward(LusidInstrument):
|
26
27
|
"""
|
@@ -37,9 +38,10 @@ class FxForward(LusidInstrument):
|
|
37
38
|
fixing_date: Optional[datetime] = Field(None, alias="fixingDate", description="The fixing date.")
|
38
39
|
settlement_ccy: Optional[StrictStr] = Field(None,alias="settlementCcy", description="The settlement currency. If provided, present value will be calculated in settlement currency, otherwise the domestic currency. Applies only to non-deliverable FX Forwards.")
|
39
40
|
booked_as_spot: Optional[StrictBool] = Field(None, alias="bookedAsSpot", description="Boolean flag for FX Forward transactions booked with Spot settlement. This will default to False if not provided. For information purposes only, this does not impact LUSID valuation, analytics, cashflows or events, but may be used by third party vendors.")
|
41
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
40
42
|
instrument_type: StrictStr = Field(...,alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
|
41
43
|
additional_properties: Dict[str, Any] = {}
|
42
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "domAmount", "domCcy", "fgnAmount", "fgnCcy", "refSpotRate", "isNdf", "fixingDate", "settlementCcy", "bookedAsSpot"]
|
44
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "domAmount", "domCcy", "fgnAmount", "fgnCcy", "refSpotRate", "isNdf", "fixingDate", "settlementCcy", "bookedAsSpot", "timeZoneConventions"]
|
43
45
|
|
44
46
|
@validator('instrument_type')
|
45
47
|
def instrument_type_validate_enum(cls, value):
|
@@ -133,6 +135,9 @@ class FxForward(LusidInstrument):
|
|
133
135
|
"additional_properties"
|
134
136
|
},
|
135
137
|
exclude_none=True)
|
138
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
139
|
+
if self.time_zone_conventions:
|
140
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
136
141
|
# puts key-value pairs in additional_properties in the top level
|
137
142
|
if self.additional_properties is not None:
|
138
143
|
for _key, _value in self.additional_properties.items():
|
@@ -166,7 +171,8 @@ class FxForward(LusidInstrument):
|
|
166
171
|
"is_ndf": obj.get("isNdf"),
|
167
172
|
"fixing_date": obj.get("fixingDate"),
|
168
173
|
"settlement_ccy": obj.get("settlementCcy"),
|
169
|
-
"booked_as_spot": obj.get("bookedAsSpot")
|
174
|
+
"booked_as_spot": obj.get("bookedAsSpot"),
|
175
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
170
176
|
})
|
171
177
|
# store additional fields in additional_properties
|
172
178
|
for _key in obj.keys():
|
lusid/models/fx_option.py
CHANGED
@@ -23,6 +23,7 @@ from pydantic.v1 import StrictStr, Field, Field, StrictBool, StrictFloat, Strict
|
|
23
23
|
from lusid.models.barrier import Barrier
|
24
24
|
from lusid.models.lusid_instrument import LusidInstrument
|
25
25
|
from lusid.models.premium import Premium
|
26
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
26
27
|
from lusid.models.touch import Touch
|
27
28
|
|
28
29
|
class FxOption(LusidInstrument):
|
@@ -45,9 +46,10 @@ class FxOption(LusidInstrument):
|
|
45
46
|
payout_style: Optional[StrictStr] = Field(None,alias="payoutStyle", description="PayoutStyle for touch options. For options without touch optionality, payoutStyle should not be set. For options with touch optionality (where the touches data has been set), payoutStyle must be defined and cannot be None. Supported string (enumeration) values are: [Deferred, Immediate].")
|
46
47
|
premium: Optional[Premium] = None
|
47
48
|
touches: Optional[conlist(Touch)] = Field(None, description="For a touch option the list should not be empty. Up to two touches are supported. An option cannot be at the same time barrier- and touch-option. One (or both) of the lists must be empty.")
|
49
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
48
50
|
instrument_type: StrictStr = Field(...,alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
|
49
51
|
additional_properties: Dict[str, Any] = {}
|
50
|
-
__properties = ["instrumentType", "startDate", "domCcy", "domAmount", "fgnCcy", "fgnAmount", "strike", "barriers", "exerciseType", "isCallNotPut", "isDeliveryNotCash", "isPayoffDigital", "optionMaturityDate", "optionSettlementDate", "payoutStyle", "premium", "touches"]
|
52
|
+
__properties = ["instrumentType", "startDate", "domCcy", "domAmount", "fgnCcy", "fgnAmount", "strike", "barriers", "exerciseType", "isCallNotPut", "isDeliveryNotCash", "isPayoffDigital", "optionMaturityDate", "optionSettlementDate", "payoutStyle", "premium", "touches", "timeZoneConventions"]
|
51
53
|
|
52
54
|
@validator('instrument_type')
|
53
55
|
def instrument_type_validate_enum(cls, value):
|
@@ -158,6 +160,9 @@ class FxOption(LusidInstrument):
|
|
158
160
|
if _item:
|
159
161
|
_items.append(_item.to_dict())
|
160
162
|
_dict['touches'] = _items
|
163
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
164
|
+
if self.time_zone_conventions:
|
165
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
161
166
|
# puts key-value pairs in additional_properties in the top level
|
162
167
|
if self.additional_properties is not None:
|
163
168
|
for _key, _value in self.additional_properties.items():
|
@@ -226,7 +231,8 @@ class FxOption(LusidInstrument):
|
|
226
231
|
"option_settlement_date": obj.get("optionSettlementDate"),
|
227
232
|
"payout_style": obj.get("payoutStyle"),
|
228
233
|
"premium": Premium.from_dict(obj.get("premium")) if obj.get("premium") is not None else None,
|
229
|
-
"touches": [Touch.from_dict(_item) for _item in obj.get("touches")] if obj.get("touches") is not None else None
|
234
|
+
"touches": [Touch.from_dict(_item) for _item in obj.get("touches")] if obj.get("touches") is not None else None,
|
235
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
230
236
|
})
|
231
237
|
# store additional fields in additional_properties
|
232
238
|
for _key in obj.keys():
|
lusid/models/fx_swap.py
CHANGED
@@ -22,6 +22,7 @@ from typing import Any, Dict, Optional
|
|
22
22
|
from pydantic.v1 import StrictStr, Field, Field, StrictStr, validator
|
23
23
|
from lusid.models.fx_forward import FxForward
|
24
24
|
from lusid.models.lusid_instrument import LusidInstrument
|
25
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
25
26
|
|
26
27
|
class FxSwap(LusidInstrument):
|
27
28
|
"""
|
@@ -30,9 +31,10 @@ class FxSwap(LusidInstrument):
|
|
30
31
|
near_fx_forward: FxForward = Field(..., alias="nearFxForward")
|
31
32
|
far_fx_forward: FxForward = Field(..., alias="farFxForward")
|
32
33
|
notional_symmetry: Optional[StrictStr] = Field(None,alias="notionalSymmetry", description="The NotionalSymmetry allows for even and uneven FxSwaps to be supported. An even FxSwap is one where the near and far fx forwards have the same notional value on at least one of the legs. An uneven FxSwap is one where near and far fx forwards don't have the same notional on both the domestic and foreign legs. By default NotionalSymmetry will be set as even. Supported string (enumeration) values are: [Even, Uneven].")
|
34
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
33
35
|
instrument_type: StrictStr = Field(...,alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
|
34
36
|
additional_properties: Dict[str, Any] = {}
|
35
|
-
__properties = ["instrumentType", "nearFxForward", "farFxForward", "notionalSymmetry"]
|
37
|
+
__properties = ["instrumentType", "nearFxForward", "farFxForward", "notionalSymmetry", "timeZoneConventions"]
|
36
38
|
|
37
39
|
@validator('instrument_type')
|
38
40
|
def instrument_type_validate_enum(cls, value):
|
@@ -132,6 +134,9 @@ class FxSwap(LusidInstrument):
|
|
132
134
|
# override the default output from pydantic by calling `to_dict()` of far_fx_forward
|
133
135
|
if self.far_fx_forward:
|
134
136
|
_dict['farFxForward'] = self.far_fx_forward.to_dict()
|
137
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
138
|
+
if self.time_zone_conventions:
|
139
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
135
140
|
# puts key-value pairs in additional_properties in the top level
|
136
141
|
if self.additional_properties is not None:
|
137
142
|
for _key, _value in self.additional_properties.items():
|
@@ -157,7 +162,8 @@ class FxSwap(LusidInstrument):
|
|
157
162
|
"instrument_type": obj.get("instrumentType"),
|
158
163
|
"near_fx_forward": FxForward.from_dict(obj.get("nearFxForward")) if obj.get("nearFxForward") is not None else None,
|
159
164
|
"far_fx_forward": FxForward.from_dict(obj.get("farFxForward")) if obj.get("farFxForward") is not None else None,
|
160
|
-
"notional_symmetry": obj.get("notionalSymmetry")
|
165
|
+
"notional_symmetry": obj.get("notionalSymmetry"),
|
166
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
161
167
|
})
|
162
168
|
# store additional fields in additional_properties
|
163
169
|
for _key in obj.keys():
|
lusid/models/inflation_leg.py
CHANGED
@@ -23,6 +23,7 @@ from pydantic.v1 import StrictStr, Field, Field, StrictFloat, StrictInt, StrictS
|
|
23
23
|
from lusid.models.flow_conventions import FlowConventions
|
24
24
|
from lusid.models.inflation_index_conventions import InflationIndexConventions
|
25
25
|
from lusid.models.lusid_instrument import LusidInstrument
|
26
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
26
27
|
|
27
28
|
class InflationLeg(LusidInstrument):
|
28
29
|
"""
|
@@ -38,9 +39,10 @@ class InflationLeg(LusidInstrument):
|
|
38
39
|
inflation_index_conventions: InflationIndexConventions = Field(..., alias="inflationIndexConventions")
|
39
40
|
notional: Union[StrictFloat, StrictInt] = Field(..., description="The notional")
|
40
41
|
pay_receive: Optional[StrictStr] = Field(None,alias="payReceive", description="PayReceive flag for the inflation leg. This field is optional and defaults to Pay. Supported string (enumeration) values are: [Pay, Receive].")
|
42
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
41
43
|
instrument_type: StrictStr = Field(...,alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
|
42
44
|
additional_properties: Dict[str, Any] = {}
|
43
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "flowConventions", "baseCPI", "calculationType", "capRate", "floorRate", "inflationIndexConventions", "notional", "payReceive"]
|
45
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "flowConventions", "baseCPI", "calculationType", "capRate", "floorRate", "inflationIndexConventions", "notional", "payReceive", "timeZoneConventions"]
|
44
46
|
|
45
47
|
@validator('instrument_type')
|
46
48
|
def instrument_type_validate_enum(cls, value):
|
@@ -140,6 +142,9 @@ class InflationLeg(LusidInstrument):
|
|
140
142
|
# override the default output from pydantic by calling `to_dict()` of inflation_index_conventions
|
141
143
|
if self.inflation_index_conventions:
|
142
144
|
_dict['inflationIndexConventions'] = self.inflation_index_conventions.to_dict()
|
145
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
146
|
+
if self.time_zone_conventions:
|
147
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
143
148
|
# puts key-value pairs in additional_properties in the top level
|
144
149
|
if self.additional_properties is not None:
|
145
150
|
for _key, _value in self.additional_properties.items():
|
@@ -187,7 +192,8 @@ class InflationLeg(LusidInstrument):
|
|
187
192
|
"floor_rate": obj.get("floorRate"),
|
188
193
|
"inflation_index_conventions": InflationIndexConventions.from_dict(obj.get("inflationIndexConventions")) if obj.get("inflationIndexConventions") is not None else None,
|
189
194
|
"notional": obj.get("notional"),
|
190
|
-
"pay_receive": obj.get("payReceive")
|
195
|
+
"pay_receive": obj.get("payReceive"),
|
196
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
191
197
|
})
|
192
198
|
# store additional fields in additional_properties
|
193
199
|
for _key in obj.keys():
|
@@ -24,6 +24,7 @@ from lusid.models.flow_conventions import FlowConventions
|
|
24
24
|
from lusid.models.inflation_index_conventions import InflationIndexConventions
|
25
25
|
from lusid.models.lusid_instrument import LusidInstrument
|
26
26
|
from lusid.models.rounding_convention import RoundingConvention
|
27
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
27
28
|
from lusid.models.trading_conventions import TradingConventions
|
28
29
|
|
29
30
|
class InflationLinkedBond(LusidInstrument):
|
@@ -47,9 +48,10 @@ class InflationLinkedBond(LusidInstrument):
|
|
47
48
|
rounding_conventions: Optional[conlist(RoundingConvention)] = Field(None, alias="roundingConventions", description="Rounding conventions for analytics, if any.")
|
48
49
|
trading_conventions: Optional[TradingConventions] = Field(None, alias="tradingConventions")
|
49
50
|
original_issue_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="originalIssuePrice", description="The price the bond was issued at. This is to be entered as a percentage of par, for example a value of 98.5 would represent 98.5%.")
|
51
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
50
52
|
instrument_type: StrictStr = Field(...,alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
|
51
53
|
additional_properties: Dict[str, Any] = {}
|
52
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "flowConventions", "inflationIndexConventions", "couponRate", "identifiers", "baseCPI", "baseCPIDate", "calculationType", "exDividendDays", "indexPrecision", "principal", "principalProtection", "stubType", "roundingConventions", "tradingConventions", "originalIssuePrice"]
|
54
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "flowConventions", "inflationIndexConventions", "couponRate", "identifiers", "baseCPI", "baseCPIDate", "calculationType", "exDividendDays", "indexPrecision", "principal", "principalProtection", "stubType", "roundingConventions", "tradingConventions", "originalIssuePrice", "timeZoneConventions"]
|
53
55
|
|
54
56
|
@validator('instrument_type')
|
55
57
|
def instrument_type_validate_enum(cls, value):
|
@@ -159,6 +161,9 @@ class InflationLinkedBond(LusidInstrument):
|
|
159
161
|
# override the default output from pydantic by calling `to_dict()` of trading_conventions
|
160
162
|
if self.trading_conventions:
|
161
163
|
_dict['tradingConventions'] = self.trading_conventions.to_dict()
|
164
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
165
|
+
if self.time_zone_conventions:
|
166
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
162
167
|
# puts key-value pairs in additional_properties in the top level
|
163
168
|
if self.additional_properties is not None:
|
164
169
|
for _key, _value in self.additional_properties.items():
|
@@ -233,7 +238,8 @@ class InflationLinkedBond(LusidInstrument):
|
|
233
238
|
"stub_type": obj.get("stubType"),
|
234
239
|
"rounding_conventions": [RoundingConvention.from_dict(_item) for _item in obj.get("roundingConventions")] if obj.get("roundingConventions") is not None else None,
|
235
240
|
"trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None,
|
236
|
-
"original_issue_price": obj.get("originalIssuePrice")
|
241
|
+
"original_issue_price": obj.get("originalIssuePrice"),
|
242
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
237
243
|
})
|
238
244
|
# store additional fields in additional_properties
|
239
245
|
for _key in obj.keys():
|
lusid/models/inflation_swap.py
CHANGED
@@ -24,6 +24,7 @@ from lusid.models.additional_payment import AdditionalPayment
|
|
24
24
|
from lusid.models.fixed_leg import FixedLeg
|
25
25
|
from lusid.models.inflation_leg import InflationLeg
|
26
26
|
from lusid.models.lusid_instrument import LusidInstrument
|
27
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
27
28
|
|
28
29
|
class InflationSwap(LusidInstrument):
|
29
30
|
"""
|
@@ -34,9 +35,10 @@ class InflationSwap(LusidInstrument):
|
|
34
35
|
inflation_leg: InflationLeg = Field(..., alias="inflationLeg")
|
35
36
|
fixed_leg: FixedLeg = Field(..., alias="fixedLeg")
|
36
37
|
additional_payments: Optional[conlist(AdditionalPayment)] = Field(None, alias="additionalPayments", description="Optional additional payments at a given date e.g. to level off an uneven inflation swap. The dates must be distinct and either all payments are Pay or all payments are Receive.")
|
38
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
37
39
|
instrument_type: StrictStr = Field(...,alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
|
38
40
|
additional_properties: Dict[str, Any] = {}
|
39
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "inflationLeg", "fixedLeg", "additionalPayments"]
|
41
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "inflationLeg", "fixedLeg", "additionalPayments", "timeZoneConventions"]
|
40
42
|
|
41
43
|
@validator('instrument_type')
|
42
44
|
def instrument_type_validate_enum(cls, value):
|
@@ -143,6 +145,9 @@ class InflationSwap(LusidInstrument):
|
|
143
145
|
if _item:
|
144
146
|
_items.append(_item.to_dict())
|
145
147
|
_dict['additionalPayments'] = _items
|
148
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
149
|
+
if self.time_zone_conventions:
|
150
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
146
151
|
# puts key-value pairs in additional_properties in the top level
|
147
152
|
if self.additional_properties is not None:
|
148
153
|
for _key, _value in self.additional_properties.items():
|
@@ -170,7 +175,8 @@ class InflationSwap(LusidInstrument):
|
|
170
175
|
"maturity_date": obj.get("maturityDate"),
|
171
176
|
"inflation_leg": InflationLeg.from_dict(obj.get("inflationLeg")) if obj.get("inflationLeg") is not None else None,
|
172
177
|
"fixed_leg": FixedLeg.from_dict(obj.get("fixedLeg")) if obj.get("fixedLeg") is not None else None,
|
173
|
-
"additional_payments": [AdditionalPayment.from_dict(_item) for _item in obj.get("additionalPayments")] if obj.get("additionalPayments") is not None else None
|
178
|
+
"additional_payments": [AdditionalPayment.from_dict(_item) for _item in obj.get("additionalPayments")] if obj.get("additionalPayments") is not None else None,
|
179
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
174
180
|
})
|
175
181
|
# store additional fields in additional_properties
|
176
182
|
for _key in obj.keys():
|
@@ -23,6 +23,7 @@ from pydantic.v1 import StrictStr, Field, Field, StrictBool, StrictStr, conlist,
|
|
23
23
|
from lusid.models.additional_payment import AdditionalPayment
|
24
24
|
from lusid.models.instrument_leg import InstrumentLeg
|
25
25
|
from lusid.models.lusid_instrument import LusidInstrument
|
26
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
26
27
|
|
27
28
|
class InterestRateSwap(LusidInstrument):
|
28
29
|
"""
|
@@ -34,9 +35,10 @@ class InterestRateSwap(LusidInstrument):
|
|
34
35
|
legs: conlist(InstrumentLeg) = Field(..., description="The set of instrument legs that define the swap instrument, these should be FloatingLeg or FixedLeg.")
|
35
36
|
settlement_ccy: Optional[StrictStr] = Field(None,alias="settlementCcy", description="Settlement currency if IRS is non-deliverable.")
|
36
37
|
additional_payments: Optional[conlist(AdditionalPayment)] = Field(None, alias="additionalPayments", description="Optional additional payments at a given date e.g. to level off an uneven fixed-floating swap. The dates must be distinct and either all payments are Pay or all payments are Receive.")
|
38
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
37
39
|
instrument_type: StrictStr = Field(...,alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
|
38
40
|
additional_properties: Dict[str, Any] = {}
|
39
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "isNonDeliverable", "legs", "settlementCcy", "additionalPayments"]
|
41
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "isNonDeliverable", "legs", "settlementCcy", "additionalPayments", "timeZoneConventions"]
|
40
42
|
|
41
43
|
@validator('instrument_type')
|
42
44
|
def instrument_type_validate_enum(cls, value):
|
@@ -144,6 +146,9 @@ class InterestRateSwap(LusidInstrument):
|
|
144
146
|
if _item:
|
145
147
|
_items.append(_item.to_dict())
|
146
148
|
_dict['additionalPayments'] = _items
|
149
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
150
|
+
if self.time_zone_conventions:
|
151
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
147
152
|
# puts key-value pairs in additional_properties in the top level
|
148
153
|
if self.additional_properties is not None:
|
149
154
|
for _key, _value in self.additional_properties.items():
|
@@ -177,7 +182,8 @@ class InterestRateSwap(LusidInstrument):
|
|
177
182
|
"is_non_deliverable": obj.get("isNonDeliverable"),
|
178
183
|
"legs": [InstrumentLeg.from_dict(_item) for _item in obj.get("legs")] if obj.get("legs") is not None else None,
|
179
184
|
"settlement_ccy": obj.get("settlementCcy"),
|
180
|
-
"additional_payments": [AdditionalPayment.from_dict(_item) for _item in obj.get("additionalPayments")] if obj.get("additionalPayments") is not None else None
|
185
|
+
"additional_payments": [AdditionalPayment.from_dict(_item) for _item in obj.get("additionalPayments")] if obj.get("additionalPayments") is not None else None,
|
186
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
181
187
|
})
|
182
188
|
# store additional fields in additional_properties
|
183
189
|
for _key in obj.keys():
|
@@ -23,6 +23,7 @@ from pydantic.v1 import StrictStr, Field, Field, StrictStr, constr, validator
|
|
23
23
|
from lusid.models.interest_rate_swap import InterestRateSwap
|
24
24
|
from lusid.models.lusid_instrument import LusidInstrument
|
25
25
|
from lusid.models.premium import Premium
|
26
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
26
27
|
|
27
28
|
class InterestRateSwaption(LusidInstrument):
|
28
29
|
"""
|
@@ -33,9 +34,10 @@ class InterestRateSwaption(LusidInstrument):
|
|
33
34
|
premium: Optional[Premium] = None
|
34
35
|
delivery_method: StrictStr = Field(...,alias="deliveryMethod", description="How does the option settle Supported string (enumeration) values are: [Cash, Physical].")
|
35
36
|
swap: InterestRateSwap = Field(...)
|
37
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
36
38
|
instrument_type: StrictStr = Field(...,alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
|
37
39
|
additional_properties: Dict[str, Any] = {}
|
38
|
-
__properties = ["instrumentType", "startDate", "payOrReceiveFixed", "premium", "deliveryMethod", "swap"]
|
40
|
+
__properties = ["instrumentType", "startDate", "payOrReceiveFixed", "premium", "deliveryMethod", "swap", "timeZoneConventions"]
|
39
41
|
|
40
42
|
@validator('instrument_type')
|
41
43
|
def instrument_type_validate_enum(cls, value):
|
@@ -135,6 +137,9 @@ class InterestRateSwaption(LusidInstrument):
|
|
135
137
|
# override the default output from pydantic by calling `to_dict()` of swap
|
136
138
|
if self.swap:
|
137
139
|
_dict['swap'] = self.swap.to_dict()
|
140
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
141
|
+
if self.time_zone_conventions:
|
142
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
138
143
|
# puts key-value pairs in additional_properties in the top level
|
139
144
|
if self.additional_properties is not None:
|
140
145
|
for _key, _value in self.additional_properties.items():
|
@@ -157,7 +162,8 @@ class InterestRateSwaption(LusidInstrument):
|
|
157
162
|
"pay_or_receive_fixed": obj.get("payOrReceiveFixed"),
|
158
163
|
"premium": Premium.from_dict(obj.get("premium")) if obj.get("premium") is not None else None,
|
159
164
|
"delivery_method": obj.get("deliveryMethod"),
|
160
|
-
"swap": InterestRateSwap.from_dict(obj.get("swap")) if obj.get("swap") is not None else None
|
165
|
+
"swap": InterestRateSwap.from_dict(obj.get("swap")) if obj.get("swap") is not None else None,
|
166
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
161
167
|
})
|
162
168
|
# store additional fields in additional_properties
|
163
169
|
for _key in obj.keys():
|
lusid/models/loan_facility.py
CHANGED
@@ -18,10 +18,11 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
from datetime import datetime
|
21
|
-
from typing import Any, Dict, List, Union
|
21
|
+
from typing import Any, Dict, List, Optional, Union
|
22
22
|
from pydantic.v1 import StrictStr, Field, Field, StrictFloat, StrictInt, StrictStr, conlist, constr, validator
|
23
23
|
from lusid.models.lusid_instrument import LusidInstrument
|
24
24
|
from lusid.models.schedule import Schedule
|
25
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
25
26
|
|
26
27
|
class LoanFacility(LusidInstrument):
|
27
28
|
"""
|
@@ -33,9 +34,10 @@ class LoanFacility(LusidInstrument):
|
|
33
34
|
initial_commitment: Union[StrictFloat, StrictInt] = Field(..., alias="initialCommitment", description="The initial commitment for the loan facility.")
|
34
35
|
loan_type: StrictStr = Field(...,alias="loanType", description="LoanType for this facility. The facility can either be a revolving or a term loan. Supported string (enumeration) values are: [Revolver, TermLoan].")
|
35
36
|
schedules: conlist(Schedule) = Field(..., description="Repayment schedules for the loan.")
|
37
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
36
38
|
instrument_type: StrictStr = Field(...,alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
|
37
39
|
additional_properties: Dict[str, Any] = {}
|
38
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "initialCommitment", "loanType", "schedules"]
|
40
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "initialCommitment", "loanType", "schedules", "timeZoneConventions"]
|
39
41
|
|
40
42
|
@validator('instrument_type')
|
41
43
|
def instrument_type_validate_enum(cls, value):
|
@@ -136,6 +138,9 @@ class LoanFacility(LusidInstrument):
|
|
136
138
|
if _item:
|
137
139
|
_items.append(_item.to_dict())
|
138
140
|
_dict['schedules'] = _items
|
141
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
142
|
+
if self.time_zone_conventions:
|
143
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
139
144
|
# puts key-value pairs in additional_properties in the top level
|
140
145
|
if self.additional_properties is not None:
|
141
146
|
for _key, _value in self.additional_properties.items():
|
@@ -159,7 +164,8 @@ class LoanFacility(LusidInstrument):
|
|
159
164
|
"dom_ccy": obj.get("domCcy"),
|
160
165
|
"initial_commitment": obj.get("initialCommitment"),
|
161
166
|
"loan_type": obj.get("loanType"),
|
162
|
-
"schedules": [Schedule.from_dict(_item) for _item in obj.get("schedules")] if obj.get("schedules") is not None else None
|
167
|
+
"schedules": [Schedule.from_dict(_item) for _item in obj.get("schedules")] if obj.get("schedules") is not None else None,
|
168
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
163
169
|
})
|
164
170
|
# store additional fields in additional_properties
|
165
171
|
for _key in obj.keys():
|
lusid/models/repo.py
CHANGED
@@ -21,6 +21,7 @@ from datetime import datetime
|
|
21
21
|
from typing import Any, Dict, List, Optional, Union
|
22
22
|
from pydantic.v1 import StrictStr, Field, Field, StrictFloat, StrictInt, StrictStr, conlist, constr, validator
|
23
23
|
from lusid.models.lusid_instrument import LusidInstrument
|
24
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
24
25
|
|
25
26
|
class Repo(LusidInstrument):
|
26
27
|
"""
|
@@ -37,9 +38,10 @@ class Repo(LusidInstrument):
|
|
37
38
|
purchase_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="purchasePrice", description="The price the collateral is initially purchased for, this property can be used to explicitly set the purchase price and not require collateral value and a margin or haircut. While this property is optional, one, and only one, of PurchasePrice, Margin and Haircut must be specified.")
|
38
39
|
repo_rate: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="repoRate", description="The rate at which interest is to be accrue and be paid upon redemption of the collateral at maturity. This field is used to calculate the Repurchase price. While this property is optional, one, and only one, of the RepoRate and RepurchasePrice must be specified.")
|
39
40
|
repurchase_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="repurchasePrice", description="The price at which the collateral is repurchased, this field is optional and can be explicitly set here or will be calculated from the PurchasePrice and RepoRate. One, and only one, of the RepoRate and RepurchasePrice must be specified.")
|
41
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
40
42
|
instrument_type: StrictStr = Field(...,alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
|
41
43
|
additional_properties: Dict[str, Any] = {}
|
42
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "accrualBasis", "collateral", "collateralValue", "haircut", "margin", "purchasePrice", "repoRate", "repurchasePrice"]
|
44
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "accrualBasis", "collateral", "collateralValue", "haircut", "margin", "purchasePrice", "repoRate", "repurchasePrice", "timeZoneConventions"]
|
43
45
|
|
44
46
|
@validator('instrument_type')
|
45
47
|
def instrument_type_validate_enum(cls, value):
|
@@ -140,6 +142,9 @@ class Repo(LusidInstrument):
|
|
140
142
|
if _item:
|
141
143
|
_items.append(_item.to_dict())
|
142
144
|
_dict['collateral'] = _items
|
145
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
146
|
+
if self.time_zone_conventions:
|
147
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
143
148
|
# puts key-value pairs in additional_properties in the top level
|
144
149
|
if self.additional_properties is not None:
|
145
150
|
for _key, _value in self.additional_properties.items():
|
@@ -203,7 +208,8 @@ class Repo(LusidInstrument):
|
|
203
208
|
"margin": obj.get("margin"),
|
204
209
|
"purchase_price": obj.get("purchasePrice"),
|
205
210
|
"repo_rate": obj.get("repoRate"),
|
206
|
-
"repurchase_price": obj.get("repurchasePrice")
|
211
|
+
"repurchase_price": obj.get("repurchasePrice"),
|
212
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
207
213
|
})
|
208
214
|
# store additional fields in additional_properties
|
209
215
|
for _key in obj.keys():
|
@@ -18,10 +18,11 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
from datetime import datetime
|
21
|
-
from typing import Any, Dict, List
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
22
|
from pydantic.v1 import StrictStr, Field, Field, StrictStr, conlist, validator
|
23
23
|
from lusid.models.loan_period import LoanPeriod
|
24
24
|
from lusid.models.lusid_instrument import LusidInstrument
|
25
|
+
from lusid.models.time_zone_conventions import TimeZoneConventions
|
25
26
|
|
26
27
|
class SimpleCashFlowLoan(LusidInstrument):
|
27
28
|
"""
|
@@ -31,9 +32,10 @@ class SimpleCashFlowLoan(LusidInstrument):
|
|
31
32
|
maturity_date: datetime = Field(..., alias="maturityDate", description="The final maturity date of the instrument. This means the last date on which the instruments makes a payment of any amount. For the avoidance of doubt, that is not necessarily prior to its last sensitivity date for the purposes of risk; e.g. instruments such as Constant Maturity Swaps (CMS) often have sensitivities to rates that may well be observed or set prior to the maturity date, but refer to a termination date beyond it.")
|
32
33
|
dom_ccy: StrictStr = Field(...,alias="domCcy", description="The domestic currency of the instrument.")
|
33
34
|
periods: conlist(LoanPeriod) = Field(..., description="Periods of the underlying loan")
|
35
|
+
time_zone_conventions: Optional[TimeZoneConventions] = Field(None, alias="timeZoneConventions")
|
34
36
|
instrument_type: StrictStr = Field(...,alias="instrumentType", description="The available values are: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit")
|
35
37
|
additional_properties: Dict[str, Any] = {}
|
36
|
-
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "periods"]
|
38
|
+
__properties = ["instrumentType", "startDate", "maturityDate", "domCcy", "periods", "timeZoneConventions"]
|
37
39
|
|
38
40
|
@validator('instrument_type')
|
39
41
|
def instrument_type_validate_enum(cls, value):
|
@@ -134,6 +136,9 @@ class SimpleCashFlowLoan(LusidInstrument):
|
|
134
136
|
if _item:
|
135
137
|
_items.append(_item.to_dict())
|
136
138
|
_dict['periods'] = _items
|
139
|
+
# override the default output from pydantic by calling `to_dict()` of time_zone_conventions
|
140
|
+
if self.time_zone_conventions:
|
141
|
+
_dict['timeZoneConventions'] = self.time_zone_conventions.to_dict()
|
137
142
|
# puts key-value pairs in additional_properties in the top level
|
138
143
|
if self.additional_properties is not None:
|
139
144
|
for _key, _value in self.additional_properties.items():
|
@@ -155,7 +160,8 @@ class SimpleCashFlowLoan(LusidInstrument):
|
|
155
160
|
"start_date": obj.get("startDate"),
|
156
161
|
"maturity_date": obj.get("maturityDate"),
|
157
162
|
"dom_ccy": obj.get("domCcy"),
|
158
|
-
"periods": [LoanPeriod.from_dict(_item) for _item in obj.get("periods")] if obj.get("periods") is not None else None
|
163
|
+
"periods": [LoanPeriod.from_dict(_item) for _item in obj.get("periods")] if obj.get("periods") is not None else None,
|
164
|
+
"time_zone_conventions": TimeZoneConventions.from_dict(obj.get("timeZoneConventions")) if obj.get("timeZoneConventions") is not None else None
|
159
165
|
})
|
160
166
|
# store additional fields in additional_properties
|
161
167
|
for _key in obj.keys():
|