lusid-sdk 2.1.609__py3-none-any.whl → 2.1.611__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/models/future.py CHANGED
@@ -22,6 +22,8 @@ from typing import Any, Dict, Optional, Union
22
22
  from pydantic.v1 import Field, StrictFloat, StrictInt, StrictStr, constr, validator
23
23
  from lusid.models.futures_contract_details import FuturesContractDetails
24
24
  from lusid.models.lusid_instrument import LusidInstrument
25
+ from lusid.models.mark_to_market_conventions import MarkToMarketConventions
26
+ from lusid.models.trading_conventions import TradingConventions
25
27
 
26
28
  class Future(LusidInstrument):
27
29
  """
@@ -32,12 +34,14 @@ class Future(LusidInstrument):
32
34
  identifiers: Dict[str, StrictStr] = Field(..., description="External market codes and identifiers for the bond, e.g. ISIN.")
33
35
  contract_details: FuturesContractDetails = Field(..., alias="contractDetails")
34
36
  contracts: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The number of contracts held.")
37
+ mark_to_market_conventions: Optional[MarkToMarketConventions] = Field(None, alias="markToMarketConventions")
35
38
  ref_spot_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="refSpotPrice", description="The reference spot price for the future at which the contract was entered into.")
36
39
  underlying: Optional[LusidInstrument] = None
37
- calculation_type: Optional[constr(strict=True, max_length=32, min_length=0)] = 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].")
40
+ calculation_type: Optional[constr(strict=True, max_length=32, min_length=0)] = 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
+ trading_conventions: Optional[TradingConventions] = Field(None, alias="tradingConventions")
38
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")
39
43
  additional_properties: Dict[str, Any] = {}
40
- __properties = ["instrumentType", "startDate", "maturityDate", "identifiers", "contractDetails", "contracts", "refSpotPrice", "underlying", "calculationType"]
44
+ __properties = ["instrumentType", "startDate", "maturityDate", "identifiers", "contractDetails", "contracts", "markToMarketConventions", "refSpotPrice", "underlying", "calculationType", "tradingConventions"]
41
45
 
42
46
  @validator('instrument_type')
43
47
  def instrument_type_validate_enum(cls, value):
@@ -74,9 +78,15 @@ class Future(LusidInstrument):
74
78
  # override the default output from pydantic by calling `to_dict()` of contract_details
75
79
  if self.contract_details:
76
80
  _dict['contractDetails'] = self.contract_details.to_dict()
81
+ # override the default output from pydantic by calling `to_dict()` of mark_to_market_conventions
82
+ if self.mark_to_market_conventions:
83
+ _dict['markToMarketConventions'] = self.mark_to_market_conventions.to_dict()
77
84
  # override the default output from pydantic by calling `to_dict()` of underlying
78
85
  if self.underlying:
79
86
  _dict['underlying'] = self.underlying.to_dict()
87
+ # override the default output from pydantic by calling `to_dict()` of trading_conventions
88
+ if self.trading_conventions:
89
+ _dict['tradingConventions'] = self.trading_conventions.to_dict()
80
90
  # puts key-value pairs in additional_properties in the top level
81
91
  if self.additional_properties is not None:
82
92
  for _key, _value in self.additional_properties.items():
@@ -105,9 +115,11 @@ class Future(LusidInstrument):
105
115
  "identifiers": obj.get("identifiers"),
106
116
  "contract_details": FuturesContractDetails.from_dict(obj.get("contractDetails")) if obj.get("contractDetails") is not None else None,
107
117
  "contracts": obj.get("contracts"),
118
+ "mark_to_market_conventions": MarkToMarketConventions.from_dict(obj.get("markToMarketConventions")) if obj.get("markToMarketConventions") is not None else None,
108
119
  "ref_spot_price": obj.get("refSpotPrice"),
109
120
  "underlying": LusidInstrument.from_dict(obj.get("underlying")) if obj.get("underlying") is not None else None,
110
- "calculation_type": obj.get("calculationType")
121
+ "calculation_type": obj.get("calculationType"),
122
+ "trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None
111
123
  })
112
124
  # store additional fields in additional_properties
113
125
  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.trading_conventions import TradingConventions
27
28
 
28
29
  class InflationLinkedBond(LusidInstrument):
29
30
  """
@@ -44,9 +45,10 @@ class InflationLinkedBond(LusidInstrument):
44
45
  principal_protection: Optional[StrictBool] = Field(None, alias="principalProtection", description="If true then the principal is protected in that the redemption amount will be at least the face value (Principal). This is typically set to true for inflation linked bonds issued by the United States and France (for example). This is typically set to false for inflation linked bonds issued by the United Kingdom (post 2005). For other sovereigns this can vary from issue to issue. If not set this property defaults to true. This is sometimes referred to as Deflation protection or an inflation floor of 0%.")
45
46
  stub_type: Optional[StrictStr] = Field(None, alias="stubType", description="StubType. Most Inflation linked bonds have a ShortFront stub type so this is the default, however in some cases with a long front stub LongFront should be selected. StubType Both is not supported for InflationLinkedBonds. Supported string (enumeration) values are: [ShortFront, ShortBack, LongBack, LongFront, Both].")
46
47
  rounding_conventions: Optional[conlist(RoundingConvention)] = Field(None, alias="roundingConventions", description="Rounding conventions for analytics, if any.")
48
+ trading_conventions: Optional[TradingConventions] = Field(None, alias="tradingConventions")
47
49
  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")
48
50
  additional_properties: Dict[str, Any] = {}
49
- __properties = ["instrumentType", "startDate", "maturityDate", "flowConventions", "inflationIndexConventions", "couponRate", "identifiers", "baseCPI", "baseCPIDate", "calculationType", "exDividendDays", "indexPrecision", "principal", "principalProtection", "stubType", "roundingConventions"]
51
+ __properties = ["instrumentType", "startDate", "maturityDate", "flowConventions", "inflationIndexConventions", "couponRate", "identifiers", "baseCPI", "baseCPIDate", "calculationType", "exDividendDays", "indexPrecision", "principal", "principalProtection", "stubType", "roundingConventions", "tradingConventions"]
50
52
 
51
53
  @validator('instrument_type')
52
54
  def instrument_type_validate_enum(cls, value):
@@ -93,6 +95,9 @@ class InflationLinkedBond(LusidInstrument):
93
95
  if _item:
94
96
  _items.append(_item.to_dict())
95
97
  _dict['roundingConventions'] = _items
98
+ # override the default output from pydantic by calling `to_dict()` of trading_conventions
99
+ if self.trading_conventions:
100
+ _dict['tradingConventions'] = self.trading_conventions.to_dict()
96
101
  # puts key-value pairs in additional_properties in the top level
97
102
  if self.additional_properties is not None:
98
103
  for _key, _value in self.additional_properties.items():
@@ -160,7 +165,8 @@ class InflationLinkedBond(LusidInstrument):
160
165
  "principal": obj.get("principal"),
161
166
  "principal_protection": obj.get("principalProtection"),
162
167
  "stub_type": obj.get("stubType"),
163
- "rounding_conventions": [RoundingConvention.from_dict(_item) for _item in obj.get("roundingConventions")] if obj.get("roundingConventions") is not None else None
168
+ "rounding_conventions": [RoundingConvention.from_dict(_item) for _item in obj.get("roundingConventions")] if obj.get("roundingConventions") is not None else None,
169
+ "trading_conventions": TradingConventions.from_dict(obj.get("tradingConventions")) if obj.get("tradingConventions") is not None else None
164
170
  })
165
171
  # store additional fields in additional_properties
166
172
  for _key in obj.keys():
@@ -0,0 +1,74 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, Optional
22
+ from pydantic.v1 import BaseModel, Field, constr
23
+
24
+ class MarkToMarketConventions(BaseModel):
25
+ """
26
+ A set of conventions for mark to market. Mark to market is a method that values financial instruments based on current market prices, reflecting their current value, rather than historical cost. # noqa: E501
27
+ """
28
+ calendar_code: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="calendarCode", description="The calendar to use when generating mark to market cashflows and events.")
29
+ __properties = ["calendarCode"]
30
+
31
+ class Config:
32
+ """Pydantic configuration"""
33
+ allow_population_by_field_name = True
34
+ validate_assignment = True
35
+
36
+ def to_str(self) -> str:
37
+ """Returns the string representation of the model using alias"""
38
+ return pprint.pformat(self.dict(by_alias=True))
39
+
40
+ def to_json(self) -> str:
41
+ """Returns the JSON representation of the model using alias"""
42
+ return json.dumps(self.to_dict())
43
+
44
+ @classmethod
45
+ def from_json(cls, json_str: str) -> MarkToMarketConventions:
46
+ """Create an instance of MarkToMarketConventions from a JSON string"""
47
+ return cls.from_dict(json.loads(json_str))
48
+
49
+ def to_dict(self):
50
+ """Returns the dictionary representation of the model using alias"""
51
+ _dict = self.dict(by_alias=True,
52
+ exclude={
53
+ },
54
+ exclude_none=True)
55
+ # set to None if calendar_code (nullable) is None
56
+ # and __fields_set__ contains the field
57
+ if self.calendar_code is None and "calendar_code" in self.__fields_set__:
58
+ _dict['calendarCode'] = None
59
+
60
+ return _dict
61
+
62
+ @classmethod
63
+ def from_dict(cls, obj: dict) -> MarkToMarketConventions:
64
+ """Create an instance of MarkToMarketConventions from a dict"""
65
+ if obj is None:
66
+ return None
67
+
68
+ if not isinstance(obj, dict):
69
+ return MarkToMarketConventions.parse_obj(obj)
70
+
71
+ _obj = MarkToMarketConventions.parse_obj({
72
+ "calendar_code": obj.get("calendarCode")
73
+ })
74
+ return _obj
@@ -31,7 +31,7 @@ class MarketDataKeyRule(BaseModel):
31
31
  quote_type: StrictStr = Field(..., alias="quoteType", description="The available values are: Price, Spread, Rate, LogNormalVol, NormalVol, ParSpread, IsdaSpread, Upfront, Index, Ratio, Delta, PoolFactor, InflationAssumption, DirtyPrice, PrincipalWriteOff, InterestDeferred, InterestShortfall")
32
32
  field: Optional[constr(strict=True, max_length=32, min_length=0)] = Field(None, description="The conceptual qualification for the field, typically 'bid', 'mid' (default), or 'ask', but can also be 'open', 'close', etc. When resolving quotes from LUSID's database, only quotes whose Field is identical to the Field specified here will be accepted as market data. When resolving data from an external supplier, the Field must be one of a defined set for the given supplier. Note: Applies to the retrieval of quotes only. Has no impact on the resolution of complex market data.")
33
33
  quote_interval: Optional[constr(strict=True, max_length=16, min_length=0)] = Field(None, alias="quoteInterval", description="Shorthand for the time interval used to select market data. This must be a dot-separated string nominating a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). The syntax is <i>int</i><i>char</i>.<i>int</i><i>char</i>, where <i>char</i> is one of D(ay), Bd(business day), W(eek), M(onth) or Y(ear). Business days are calculated using the calendars specified on the Valuation Request. If no calendar is provided in the request, then it will default to only skipping weekends. For example, if the valuation date is a Monday, then a quote interval of \"1Bd\" would behave as \"3D\", looking back to the Friday. Data with effectiveAt on the weekend will still be found in that window.")
34
- as_at: Optional[datetime] = Field(None, alias="asAt", description="The AsAt predicate specification.")
34
+ as_at: Optional[datetime] = Field(None, alias="asAt", description="Deprecated field which no longer has any effect on market data resolution.")
35
35
  price_source: Optional[constr(strict=True, max_length=256, min_length=0)] = Field(None, alias="priceSource", description="The source of the quote. For a given provider/supplier of market data there may be an additional qualifier, e.g. the exchange or bank that provided the quote")
36
36
  mask: Optional[constr(strict=True, max_length=256, min_length=0)] = Field(None, description="Allows for partial or complete override of the market asset resolved for a dependency Either a named override or a dot separated string (A.B.C.D.*). e.g. for Rates curve 'EUR.*' will replace the resolve MarketAsset 'GBP/12M', 'GBP/3M' with the EUR equivalent, if there are no wildcards in the mask, the mask is taken as the MarketAsset for any dependency matching the rule.")
37
37
  source_system: Optional[constr(strict=True, max_length=256, min_length=0)] = Field(None, alias="sourceSystem", description="If set, this parameter will seek an external source of market data. Optional and, if omitted, will default to \"Lusid\". This means that data will be retrieved from the LUSID Quote Store and LUSID Complex Market Data Store. This can be set to \"MarketDataOverrides\" if Supplier is set to \"Client\".")
@@ -32,7 +32,7 @@ class MarketDataSpecificRule(BaseModel):
32
32
  quote_type: StrictStr = Field(..., alias="quoteType", description="The available values are: Price, Spread, Rate, LogNormalVol, NormalVol, ParSpread, IsdaSpread, Upfront, Index, Ratio, Delta, PoolFactor, InflationAssumption, DirtyPrice, PrincipalWriteOff, InterestDeferred, InterestShortfall")
33
33
  field: constr(strict=True, max_length=32, min_length=0) = Field(..., description="The conceptual qualification for the field, such as bid, mid, or ask. The field must be one of a defined set for the given supplier, in the same way as it is for the Finbourne.WebApi.Interface.Dto.Quotes.QuoteSeriesId")
34
34
  quote_interval: Optional[constr(strict=True, max_length=16, min_length=0)] = Field(None, alias="quoteInterval", description="Shorthand for the time interval used to select market data. This must be a dot-separated string nominating a start and end date, for example '5D.0D' to look back 5 days from today (0 days ago). The syntax is <i>int</i><i>char</i>.<i>int</i><i>char</i>, where <i>char</i> is one of D(ay), W(eek), M(onth) or Y(ear).")
35
- as_at: Optional[datetime] = Field(None, alias="asAt", description="The AsAt predicate specification.")
35
+ as_at: Optional[datetime] = Field(None, alias="asAt", description="Deprecated field which no longer has any effect on market data resolution.")
36
36
  price_source: Optional[constr(strict=True, max_length=256, min_length=0)] = Field(None, alias="priceSource", description="The source of the quote. For a given provider/supplier of market data there may be an additional qualifier, e.g. the exchange or bank that provided the quote")
37
37
  mask: Optional[constr(strict=True, max_length=256, min_length=0)] = Field(None, description="Allows for partial or complete override of the market asset resolved for a dependency Either a named override or a dot separated string (A.B.C.D.*). e.g. for Rates curve 'EUR.*' will replace the resolve MarketAsset 'GBP/12M', 'GBP/3M' with the EUR equivalent, if there are no wildcards in the mask, the mask is taken as the MarketAsset for any dependency matching the rule.")
38
38
  dependency_source_filter: DependencySourceFilter = Field(..., alias="dependencySourceFilter")
@@ -0,0 +1,113 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic.v1 import BaseModel, Field, StrictStr, conlist
23
+ from lusid.models.link import Link
24
+ from lusid.models.risk_model_factor_set import RiskModelFactorSet
25
+
26
+ class PagedResourceListOfRiskModelFactorSet(BaseModel):
27
+ """
28
+ PagedResourceListOfRiskModelFactorSet
29
+ """
30
+ next_page: Optional[StrictStr] = Field(None, alias="nextPage")
31
+ previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
32
+ values: conlist(RiskModelFactorSet) = Field(...)
33
+ href: Optional[StrictStr] = None
34
+ links: Optional[conlist(Link)] = None
35
+ __properties = ["nextPage", "previousPage", "values", "href", "links"]
36
+
37
+ class Config:
38
+ """Pydantic configuration"""
39
+ allow_population_by_field_name = True
40
+ validate_assignment = True
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.dict(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> PagedResourceListOfRiskModelFactorSet:
52
+ """Create an instance of PagedResourceListOfRiskModelFactorSet from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self):
56
+ """Returns the dictionary representation of the model using alias"""
57
+ _dict = self.dict(by_alias=True,
58
+ exclude={
59
+ },
60
+ exclude_none=True)
61
+ # override the default output from pydantic by calling `to_dict()` of each item in values (list)
62
+ _items = []
63
+ if self.values:
64
+ for _item in self.values:
65
+ if _item:
66
+ _items.append(_item.to_dict())
67
+ _dict['values'] = _items
68
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
69
+ _items = []
70
+ if self.links:
71
+ for _item in self.links:
72
+ if _item:
73
+ _items.append(_item.to_dict())
74
+ _dict['links'] = _items
75
+ # set to None if next_page (nullable) is None
76
+ # and __fields_set__ contains the field
77
+ if self.next_page is None and "next_page" in self.__fields_set__:
78
+ _dict['nextPage'] = None
79
+
80
+ # set to None if previous_page (nullable) is None
81
+ # and __fields_set__ contains the field
82
+ if self.previous_page is None and "previous_page" in self.__fields_set__:
83
+ _dict['previousPage'] = None
84
+
85
+ # set to None if href (nullable) is None
86
+ # and __fields_set__ contains the field
87
+ if self.href is None and "href" in self.__fields_set__:
88
+ _dict['href'] = None
89
+
90
+ # set to None if links (nullable) is None
91
+ # and __fields_set__ contains the field
92
+ if self.links is None and "links" in self.__fields_set__:
93
+ _dict['links'] = None
94
+
95
+ return _dict
96
+
97
+ @classmethod
98
+ def from_dict(cls, obj: dict) -> PagedResourceListOfRiskModelFactorSet:
99
+ """Create an instance of PagedResourceListOfRiskModelFactorSet from a dict"""
100
+ if obj is None:
101
+ return None
102
+
103
+ if not isinstance(obj, dict):
104
+ return PagedResourceListOfRiskModelFactorSet.parse_obj(obj)
105
+
106
+ _obj = PagedResourceListOfRiskModelFactorSet.parse_obj({
107
+ "next_page": obj.get("nextPage"),
108
+ "previous_page": obj.get("previousPage"),
109
+ "values": [RiskModelFactorSet.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
110
+ "href": obj.get("href"),
111
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
112
+ })
113
+ return _obj
@@ -0,0 +1,103 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, List, Optional
22
+ from pydantic.v1 import BaseModel, Field, StrictStr, conlist, constr
23
+ from lusid.models.link import Link
24
+ from lusid.models.resource_id import ResourceId
25
+ from lusid.models.version import Version
26
+
27
+ class RiskModelFactorSet(BaseModel):
28
+ """
29
+ RiskModelFactorSet
30
+ """
31
+ id: ResourceId = Field(...)
32
+ display_name: constr(strict=True, min_length=1) = Field(..., alias="displayName", description="Factor Set name.")
33
+ href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
34
+ version: Optional[Version] = None
35
+ links: Optional[conlist(Link)] = None
36
+ __properties = ["id", "displayName", "href", "version", "links"]
37
+
38
+ class Config:
39
+ """Pydantic configuration"""
40
+ allow_population_by_field_name = True
41
+ validate_assignment = True
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.dict(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> RiskModelFactorSet:
53
+ """Create an instance of RiskModelFactorSet from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self):
57
+ """Returns the dictionary representation of the model using alias"""
58
+ _dict = self.dict(by_alias=True,
59
+ exclude={
60
+ },
61
+ exclude_none=True)
62
+ # override the default output from pydantic by calling `to_dict()` of id
63
+ if self.id:
64
+ _dict['id'] = self.id.to_dict()
65
+ # override the default output from pydantic by calling `to_dict()` of version
66
+ if self.version:
67
+ _dict['version'] = self.version.to_dict()
68
+ # override the default output from pydantic by calling `to_dict()` of each item in links (list)
69
+ _items = []
70
+ if self.links:
71
+ for _item in self.links:
72
+ if _item:
73
+ _items.append(_item.to_dict())
74
+ _dict['links'] = _items
75
+ # set to None if href (nullable) is None
76
+ # and __fields_set__ contains the field
77
+ if self.href is None and "href" in self.__fields_set__:
78
+ _dict['href'] = None
79
+
80
+ # set to None if links (nullable) is None
81
+ # and __fields_set__ contains the field
82
+ if self.links is None and "links" in self.__fields_set__:
83
+ _dict['links'] = None
84
+
85
+ return _dict
86
+
87
+ @classmethod
88
+ def from_dict(cls, obj: dict) -> RiskModelFactorSet:
89
+ """Create an instance of RiskModelFactorSet from a dict"""
90
+ if obj is None:
91
+ return None
92
+
93
+ if not isinstance(obj, dict):
94
+ return RiskModelFactorSet.parse_obj(obj)
95
+
96
+ _obj = RiskModelFactorSet.parse_obj({
97
+ "id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
98
+ "display_name": obj.get("displayName"),
99
+ "href": obj.get("href"),
100
+ "version": Version.from_dict(obj.get("version")) if obj.get("version") is not None else None,
101
+ "links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
102
+ })
103
+ return _obj
@@ -0,0 +1,73 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict, Optional, Union
22
+ from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt
23
+
24
+ class TradingConventions(BaseModel):
25
+ """
26
+ Common Trading details for exchange traded instruments like Futures and Bonds # noqa: E501
27
+ """
28
+ price_scale_factor: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="priceScaleFactor", description="The factor used to scale prices for the instrument. Currently used by LUSID when calculating cost and notional amounts on transactions. Note this factor does not yet impact Valuation, PV, exposure, all of which use the scale factor attached to the price quotes in the QuoteStore. Must be positive and defaults to 1 if not set.")
29
+ minimum_order_size: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="minimumOrderSize", description="The Minimum Order Size Must be non-negative and defaults to 0 if not set.")
30
+ minimum_order_increment: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="minimumOrderIncrement", description="The Minimum Order Increment Must be non-negative and defaults to 0 if not set.")
31
+ __properties = ["priceScaleFactor", "minimumOrderSize", "minimumOrderIncrement"]
32
+
33
+ class Config:
34
+ """Pydantic configuration"""
35
+ allow_population_by_field_name = True
36
+ validate_assignment = True
37
+
38
+ def to_str(self) -> str:
39
+ """Returns the string representation of the model using alias"""
40
+ return pprint.pformat(self.dict(by_alias=True))
41
+
42
+ def to_json(self) -> str:
43
+ """Returns the JSON representation of the model using alias"""
44
+ return json.dumps(self.to_dict())
45
+
46
+ @classmethod
47
+ def from_json(cls, json_str: str) -> TradingConventions:
48
+ """Create an instance of TradingConventions from a JSON string"""
49
+ return cls.from_dict(json.loads(json_str))
50
+
51
+ def to_dict(self):
52
+ """Returns the dictionary representation of the model using alias"""
53
+ _dict = self.dict(by_alias=True,
54
+ exclude={
55
+ },
56
+ exclude_none=True)
57
+ return _dict
58
+
59
+ @classmethod
60
+ def from_dict(cls, obj: dict) -> TradingConventions:
61
+ """Create an instance of TradingConventions from a dict"""
62
+ if obj is None:
63
+ return None
64
+
65
+ if not isinstance(obj, dict):
66
+ return TradingConventions.parse_obj(obj)
67
+
68
+ _obj = TradingConventions.parse_obj({
69
+ "price_scale_factor": obj.get("priceScaleFactor"),
70
+ "minimum_order_size": obj.get("minimumOrderSize"),
71
+ "minimum_order_increment": obj.get("minimumOrderIncrement")
72
+ })
73
+ return _obj
@@ -0,0 +1,69 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ LUSID API
5
+
6
+ FINBOURNE Technology # noqa: E501
7
+
8
+ Contact: info@finbourne.com
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+
21
+ from typing import Any, Dict
22
+ from pydantic.v1 import BaseModel, Field, constr
23
+
24
+ class UpdateRiskModelFactorSetRequest(BaseModel):
25
+ """
26
+ UpdateRiskModelFactorSetRequest
27
+ """
28
+ display_name: constr(strict=True, max_length=256, min_length=1) = Field(..., alias="displayName", description="Factor Set name.")
29
+ __properties = ["displayName"]
30
+
31
+ class Config:
32
+ """Pydantic configuration"""
33
+ allow_population_by_field_name = True
34
+ validate_assignment = True
35
+
36
+ def to_str(self) -> str:
37
+ """Returns the string representation of the model using alias"""
38
+ return pprint.pformat(self.dict(by_alias=True))
39
+
40
+ def to_json(self) -> str:
41
+ """Returns the JSON representation of the model using alias"""
42
+ return json.dumps(self.to_dict())
43
+
44
+ @classmethod
45
+ def from_json(cls, json_str: str) -> UpdateRiskModelFactorSetRequest:
46
+ """Create an instance of UpdateRiskModelFactorSetRequest from a JSON string"""
47
+ return cls.from_dict(json.loads(json_str))
48
+
49
+ def to_dict(self):
50
+ """Returns the dictionary representation of the model using alias"""
51
+ _dict = self.dict(by_alias=True,
52
+ exclude={
53
+ },
54
+ exclude_none=True)
55
+ return _dict
56
+
57
+ @classmethod
58
+ def from_dict(cls, obj: dict) -> UpdateRiskModelFactorSetRequest:
59
+ """Create an instance of UpdateRiskModelFactorSetRequest from a dict"""
60
+ if obj is None:
61
+ return None
62
+
63
+ if not isinstance(obj, dict):
64
+ return UpdateRiskModelFactorSetRequest.parse_obj(obj)
65
+
66
+ _obj = UpdateRiskModelFactorSetRequest.parse_obj({
67
+ "display_name": obj.get("displayName")
68
+ })
69
+ return _obj
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lusid-sdk
3
- Version: 2.1.609
3
+ Version: 2.1.611
4
4
  Summary: LUSID API
5
5
  Home-page: https://github.com/finbourne/lusid-sdk-python
6
6
  License: MIT
@@ -497,6 +497,11 @@ Class | Method | HTTP request | Description
497
497
  *RelationshipDefinitionsApi* | [**update_relationship_definition**](docs/RelationshipDefinitionsApi.md#update_relationship_definition) | **PUT** /api/relationshipdefinitions/{scope}/{code} | [EARLY ACCESS] UpdateRelationshipDefinition: Update Relationship Definition
498
498
  *RelationshipsApi* | [**create_relationship**](docs/RelationshipsApi.md#create_relationship) | **POST** /api/relationshipdefinitions/{scope}/{code}/relationships | CreateRelationship: Create Relationship
499
499
  *RelationshipsApi* | [**delete_relationship**](docs/RelationshipsApi.md#delete_relationship) | **POST** /api/relationshipdefinitions/{scope}/{code}/relationships/$delete | [EARLY ACCESS] DeleteRelationship: Delete Relationship
500
+ *RiskModelFactorSetsApi* | [**create_risk_model_factor_set**](docs/RiskModelFactorSetsApi.md#create_risk_model_factor_set) | **POST** /api/riskmodels/factorsets | [EXPERIMENTAL] CreateRiskModelFactorSet: Create a Factor Set
501
+ *RiskModelFactorSetsApi* | [**delete_risk_model_factor_set**](docs/RiskModelFactorSetsApi.md#delete_risk_model_factor_set) | **DELETE** /api/riskmodels/factorsets/{scope}/{code} | [EXPERIMENTAL] DeleteRiskModelFactorSet: Deletes a particular Factor Set
502
+ *RiskModelFactorSetsApi* | [**get_risk_model_factor_set**](docs/RiskModelFactorSetsApi.md#get_risk_model_factor_set) | **GET** /api/riskmodels/factorsets/{scope}/{code} | [EXPERIMENTAL] GetRiskModelFactorSet: Get a single Factor Set by scope and code.
503
+ *RiskModelFactorSetsApi* | [**list_risk_model_factor_sets**](docs/RiskModelFactorSetsApi.md#list_risk_model_factor_sets) | **GET** /api/riskmodels/factorsets | [EXPERIMENTAL] ListRiskModelFactorSets: Get a set of Factor Sets
504
+ *RiskModelFactorSetsApi* | [**update_risk_model_factor_set_name**](docs/RiskModelFactorSetsApi.md#update_risk_model_factor_set_name) | **PUT** /api/riskmodels/factorsets/{scope}/{code} | [EXPERIMENTAL] UpdateRiskModelFactorSetName: Update Factor Set Display Name
500
505
  *SchemasApi* | [**get_entity_schema**](docs/SchemasApi.md#get_entity_schema) | **GET** /api/schemas/entities/{entity} | [EARLY ACCESS] GetEntitySchema: Get schema
501
506
  *SchemasApi* | [**get_property_schema**](docs/SchemasApi.md#get_property_schema) | **GET** /api/schemas/properties | [EARLY ACCESS] GetPropertySchema: Get property schema
502
507
  *SchemasApi* | [**get_value_types**](docs/SchemasApi.md#get_value_types) | **GET** /api/schemas/types | [EARLY ACCESS] GetValueTypes: Get value types
@@ -576,6 +581,7 @@ Class | Method | HTTP request | Description
576
581
  *TransactionPortfoliosApi* | [**batch_upsert_transactions**](docs/TransactionPortfoliosApi.md#batch_upsert_transactions) | **POST** /api/transactionportfolios/{scope}/{code}/transactions/$batchUpsert | [EARLY ACCESS] BatchUpsertTransactions: Batch upsert transactions
577
582
  *TransactionPortfoliosApi* | [**build_transactions**](docs/TransactionPortfoliosApi.md#build_transactions) | **POST** /api/transactionportfolios/{scope}/{code}/transactions/$build | BuildTransactions: Build transactions
578
583
  *TransactionPortfoliosApi* | [**cancel_adjust_holdings**](docs/TransactionPortfoliosApi.md#cancel_adjust_holdings) | **DELETE** /api/transactionportfolios/{scope}/{code}/holdings | CancelAdjustHoldings: Cancel adjust holdings
584
+ *TransactionPortfoliosApi* | [**cancel_single_adjust_holding**](docs/TransactionPortfoliosApi.md#cancel_single_adjust_holding) | **POST** /api/transactionportfolios/{scope}/{code}/holdings/$cancelAdjustment | [EARLY ACCESS] CancelSingleAdjustHolding: Cancel single holding adjustment.
579
585
  *TransactionPortfoliosApi* | [**cancel_transactions**](docs/TransactionPortfoliosApi.md#cancel_transactions) | **DELETE** /api/transactionportfolios/{scope}/{code}/transactions | CancelTransactions: Cancel transactions
580
586
  *TransactionPortfoliosApi* | [**create_portfolio**](docs/TransactionPortfoliosApi.md#create_portfolio) | **POST** /api/transactionportfolios/{scope} | CreatePortfolio: Create portfolio
581
587
  *TransactionPortfoliosApi* | [**create_trade_ticket**](docs/TransactionPortfoliosApi.md#create_trade_ticket) | **POST** /api/transactionportfolios/{scope}/{code}/$tradeticket | [EARLY ACCESS] CreateTradeTicket: Create Trade Ticket
@@ -744,6 +750,7 @@ Class | Method | HTTP request | Description
744
750
  - [CancelOrdersAndMoveRemainingResponse](docs/CancelOrdersAndMoveRemainingResponse.md)
745
751
  - [CancelOrdersResponse](docs/CancelOrdersResponse.md)
746
752
  - [CancelPlacementsResponse](docs/CancelPlacementsResponse.md)
753
+ - [CancelSingleHoldingAdjustmentRequest](docs/CancelSingleHoldingAdjustmentRequest.md)
747
754
  - [CancelledOrderResult](docs/CancelledOrderResult.md)
748
755
  - [CancelledPlacementResult](docs/CancelledPlacementResult.md)
749
756
  - [CapFloor](docs/CapFloor.md)
@@ -867,6 +874,7 @@ Class | Method | HTTP request | Description
867
874
  - [CreateRelationRequest](docs/CreateRelationRequest.md)
868
875
  - [CreateRelationshipDefinitionRequest](docs/CreateRelationshipDefinitionRequest.md)
869
876
  - [CreateRelationshipRequest](docs/CreateRelationshipRequest.md)
877
+ - [CreateRiskModelFactorSetRequest](docs/CreateRiskModelFactorSetRequest.md)
870
878
  - [CreateSequenceRequest](docs/CreateSequenceRequest.md)
871
879
  - [CreateStagingRuleSetRequest](docs/CreateStagingRuleSetRequest.md)
872
880
  - [CreateTaxRuleSetRequest](docs/CreateTaxRuleSetRequest.md)
@@ -1181,6 +1189,7 @@ Class | Method | HTTP request | Description
1181
1189
  - [MappedString](docs/MappedString.md)
1182
1190
  - [Mapping](docs/Mapping.md)
1183
1191
  - [MappingRule](docs/MappingRule.md)
1192
+ - [MarkToMarketConventions](docs/MarkToMarketConventions.md)
1184
1193
  - [MarketContext](docs/MarketContext.md)
1185
1194
  - [MarketContextSuppliers](docs/MarketContextSuppliers.md)
1186
1195
  - [MarketDataKeyRule](docs/MarketDataKeyRule.md)
@@ -1316,6 +1325,7 @@ Class | Method | HTTP request | Description
1316
1325
  - [PagedResourceListOfReconciliation](docs/PagedResourceListOfReconciliation.md)
1317
1326
  - [PagedResourceListOfReferenceListResponse](docs/PagedResourceListOfReferenceListResponse.md)
1318
1327
  - [PagedResourceListOfRelationshipDefinition](docs/PagedResourceListOfRelationshipDefinition.md)
1328
+ - [PagedResourceListOfRiskModelFactorSet](docs/PagedResourceListOfRiskModelFactorSet.md)
1319
1329
  - [PagedResourceListOfSequenceDefinition](docs/PagedResourceListOfSequenceDefinition.md)
1320
1330
  - [PagedResourceListOfStagedModification](docs/PagedResourceListOfStagedModification.md)
1321
1331
  - [PagedResourceListOfStagedModificationsRequestedChangeInterval](docs/PagedResourceListOfStagedModificationsRequestedChangeInterval.md)
@@ -1542,6 +1552,7 @@ Class | Method | HTTP request | Description
1542
1552
  - [ResultValueType](docs/ResultValueType.md)
1543
1553
  - [ReturnZeroPvOptions](docs/ReturnZeroPvOptions.md)
1544
1554
  - [ReverseStockSplitEvent](docs/ReverseStockSplitEvent.md)
1555
+ - [RiskModelFactorSet](docs/RiskModelFactorSet.md)
1545
1556
  - [RoundingConfiguration](docs/RoundingConfiguration.md)
1546
1557
  - [RoundingConfigurationComponent](docs/RoundingConfigurationComponent.md)
1547
1558
  - [RoundingConvention](docs/RoundingConvention.md)
@@ -1622,6 +1633,7 @@ Class | Method | HTTP request | Description
1622
1633
  - [Touch](docs/Touch.md)
1623
1634
  - [TradeTicket](docs/TradeTicket.md)
1624
1635
  - [TradeTicketType](docs/TradeTicketType.md)
1636
+ - [TradingConventions](docs/TradingConventions.md)
1625
1637
  - [Transaction](docs/Transaction.md)
1626
1638
  - [TransactionConfigurationData](docs/TransactionConfigurationData.md)
1627
1639
  - [TransactionConfigurationDataRequest](docs/TransactionConfigurationDataRequest.md)
@@ -1699,6 +1711,7 @@ Class | Method | HTTP request | Description
1699
1711
  - [UpdateReconciliationRequest](docs/UpdateReconciliationRequest.md)
1700
1712
  - [UpdateReferenceDataRequest](docs/UpdateReferenceDataRequest.md)
1701
1713
  - [UpdateRelationshipDefinitionRequest](docs/UpdateRelationshipDefinitionRequest.md)
1714
+ - [UpdateRiskModelFactorSetRequest](docs/UpdateRiskModelFactorSetRequest.md)
1702
1715
  - [UpdateStagingRuleSetRequest](docs/UpdateStagingRuleSetRequest.md)
1703
1716
  - [UpdateTaxRuleSetRequest](docs/UpdateTaxRuleSetRequest.md)
1704
1717
  - [UpdateTimelineRequest](docs/UpdateTimelineRequest.md)