lusid-sdk 2.1.261__py3-none-any.whl → 2.1.286__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.

Potentially problematic release.


This version of lusid-sdk might be problematic. Click here for more details.

Files changed (37) hide show
  1. lusid/__init__.py +26 -0
  2. lusid/api/funds_api.py +1 -1
  3. lusid/configuration.py +1 -1
  4. lusid/models/__init__.py +26 -0
  5. lusid/models/cash.py +93 -0
  6. lusid/models/component_filter.py +85 -0
  7. lusid/models/component_rule.py +13 -19
  8. lusid/models/contract_for_difference.py +4 -2
  9. lusid/models/fund.py +6 -1
  10. lusid/models/fund_amount.py +69 -0
  11. lusid/models/fund_configuration.py +16 -15
  12. lusid/models/fund_configuration_request.py +18 -12
  13. lusid/models/fund_previous_nav.py +69 -0
  14. lusid/models/fund_request.py +6 -1
  15. lusid/models/fund_valuation_point_data.py +160 -0
  16. lusid/models/futures_contract_details.py +9 -2
  17. lusid/models/lusid_instrument.py +3 -2
  18. lusid/models/market_data_key_rule.py +3 -3
  19. lusid/models/market_data_specific_rule.py +3 -3
  20. lusid/models/market_quote.py +3 -3
  21. lusid/models/model_selection.py +3 -3
  22. lusid/models/previous_fund_valuation_point_data.py +79 -0
  23. lusid/models/previous_nav.py +73 -0
  24. lusid/models/previous_share_class_breakdown.py +81 -0
  25. lusid/models/pricing_model.py +1 -0
  26. lusid/models/quote_series_id.py +4 -20
  27. lusid/models/quote_type.py +3 -0
  28. lusid/models/share_class_amount.py +73 -0
  29. lusid/models/share_class_breakdown.py +171 -0
  30. lusid/models/share_class_data.py +79 -0
  31. lusid/models/share_class_details.py +108 -0
  32. lusid/models/transaction_field_map.py +1 -1
  33. lusid/models/unitisation_data.py +73 -0
  34. lusid/models/valuation_point_data_response.py +30 -9
  35. {lusid_sdk-2.1.261.dist-info → lusid_sdk-2.1.286.dist-info}/METADATA +17 -4
  36. {lusid_sdk-2.1.261.dist-info → lusid_sdk-2.1.286.dist-info}/RECORD +37 -24
  37. {lusid_sdk-2.1.261.dist-info → lusid_sdk-2.1.286.dist-info}/WHEEL +0 -0
@@ -34,11 +34,13 @@ class FundConfiguration(BaseModel):
34
34
  id: ResourceId = Field(...)
35
35
  display_name: Optional[StrictStr] = Field(None, alias="displayName", description="The name of the FundConfiguration.")
36
36
  description: Optional[StrictStr] = Field(None, description="A description for the FundConfiguration.")
37
- component_rules: Optional[conlist(ComponentRule)] = Field(None, alias="componentRules", description="The first matching rule decides the set of filters used.")
37
+ dealing_rule: Optional[ComponentRule] = Field(None, alias="dealingRule")
38
+ fund_pnl_exclusion_rule: Optional[ComponentRule] = Field(None, alias="fundPnlExclusionRule")
39
+ back_out_rule: Optional[ComponentRule] = Field(None, alias="backOutRule")
38
40
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund Configuration.")
39
41
  version: Optional[Version] = None
40
42
  links: Optional[conlist(Link)] = None
41
- __properties = ["href", "id", "displayName", "description", "componentRules", "properties", "version", "links"]
43
+ __properties = ["href", "id", "displayName", "description", "dealingRule", "fundPnlExclusionRule", "backOutRule", "properties", "version", "links"]
42
44
 
43
45
  class Config:
44
46
  """Pydantic configuration"""
@@ -67,13 +69,15 @@ class FundConfiguration(BaseModel):
67
69
  # override the default output from pydantic by calling `to_dict()` of id
68
70
  if self.id:
69
71
  _dict['id'] = self.id.to_dict()
70
- # override the default output from pydantic by calling `to_dict()` of each item in component_rules (list)
71
- _items = []
72
- if self.component_rules:
73
- for _item in self.component_rules:
74
- if _item:
75
- _items.append(_item.to_dict())
76
- _dict['componentRules'] = _items
72
+ # override the default output from pydantic by calling `to_dict()` of dealing_rule
73
+ if self.dealing_rule:
74
+ _dict['dealingRule'] = self.dealing_rule.to_dict()
75
+ # override the default output from pydantic by calling `to_dict()` of fund_pnl_exclusion_rule
76
+ if self.fund_pnl_exclusion_rule:
77
+ _dict['fundPnlExclusionRule'] = self.fund_pnl_exclusion_rule.to_dict()
78
+ # override the default output from pydantic by calling `to_dict()` of back_out_rule
79
+ if self.back_out_rule:
80
+ _dict['backOutRule'] = self.back_out_rule.to_dict()
77
81
  # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
78
82
  _field_dict = {}
79
83
  if self.properties:
@@ -106,11 +110,6 @@ class FundConfiguration(BaseModel):
106
110
  if self.description is None and "description" in self.__fields_set__:
107
111
  _dict['description'] = None
108
112
 
109
- # set to None if component_rules (nullable) is None
110
- # and __fields_set__ contains the field
111
- if self.component_rules is None and "component_rules" in self.__fields_set__:
112
- _dict['componentRules'] = None
113
-
114
113
  # set to None if properties (nullable) is None
115
114
  # and __fields_set__ contains the field
116
115
  if self.properties is None and "properties" in self.__fields_set__:
@@ -137,7 +136,9 @@ class FundConfiguration(BaseModel):
137
136
  "id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
138
137
  "display_name": obj.get("displayName"),
139
138
  "description": obj.get("description"),
140
- "component_rules": [ComponentRule.from_dict(_item) for _item in obj.get("componentRules")] if obj.get("componentRules") is not None else None,
139
+ "dealing_rule": ComponentRule.from_dict(obj.get("dealingRule")) if obj.get("dealingRule") is not None else None,
140
+ "fund_pnl_exclusion_rule": ComponentRule.from_dict(obj.get("fundPnlExclusionRule")) if obj.get("fundPnlExclusionRule") is not None else None,
141
+ "back_out_rule": ComponentRule.from_dict(obj.get("backOutRule")) if obj.get("backOutRule") is not None else None,
141
142
  "properties": dict(
142
143
  (_k, ModelProperty.from_dict(_v))
143
144
  for _k, _v in obj.get("properties").items()
@@ -18,8 +18,8 @@ import re # noqa: F401
18
18
  import json
19
19
 
20
20
 
21
- from typing import Any, Dict, List, Optional
22
- from pydantic.v1 import BaseModel, Field, conlist, constr, validator
21
+ from typing import Any, Dict, Optional
22
+ from pydantic.v1 import BaseModel, Field, constr, validator
23
23
  from lusid.models.component_rule import ComponentRule
24
24
  from lusid.models.model_property import ModelProperty
25
25
 
@@ -30,9 +30,11 @@ class FundConfigurationRequest(BaseModel):
30
30
  code: constr(strict=True, max_length=64, min_length=1) = Field(...)
31
31
  display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the Fund.")
32
32
  description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fund.")
33
- component_rules: conlist(ComponentRule) = Field(..., alias="componentRules")
33
+ dealing_rule: ComponentRule = Field(..., alias="dealingRule")
34
+ fund_pnl_exclusion_rule: Optional[ComponentRule] = Field(None, alias="fundPnlExclusionRule")
35
+ back_out_rule: ComponentRule = Field(..., alias="backOutRule")
34
36
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund Configuration.")
35
- __properties = ["code", "displayName", "description", "componentRules", "properties"]
37
+ __properties = ["code", "displayName", "description", "dealingRule", "fundPnlExclusionRule", "backOutRule", "properties"]
36
38
 
37
39
  @validator('code')
38
40
  def code_validate_regular_expression(cls, value):
@@ -75,13 +77,15 @@ class FundConfigurationRequest(BaseModel):
75
77
  exclude={
76
78
  },
77
79
  exclude_none=True)
78
- # override the default output from pydantic by calling `to_dict()` of each item in component_rules (list)
79
- _items = []
80
- if self.component_rules:
81
- for _item in self.component_rules:
82
- if _item:
83
- _items.append(_item.to_dict())
84
- _dict['componentRules'] = _items
80
+ # override the default output from pydantic by calling `to_dict()` of dealing_rule
81
+ if self.dealing_rule:
82
+ _dict['dealingRule'] = self.dealing_rule.to_dict()
83
+ # override the default output from pydantic by calling `to_dict()` of fund_pnl_exclusion_rule
84
+ if self.fund_pnl_exclusion_rule:
85
+ _dict['fundPnlExclusionRule'] = self.fund_pnl_exclusion_rule.to_dict()
86
+ # override the default output from pydantic by calling `to_dict()` of back_out_rule
87
+ if self.back_out_rule:
88
+ _dict['backOutRule'] = self.back_out_rule.to_dict()
85
89
  # override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
86
90
  _field_dict = {}
87
91
  if self.properties:
@@ -119,7 +123,9 @@ class FundConfigurationRequest(BaseModel):
119
123
  "code": obj.get("code"),
120
124
  "display_name": obj.get("displayName"),
121
125
  "description": obj.get("description"),
122
- "component_rules": [ComponentRule.from_dict(_item) for _item in obj.get("componentRules")] if obj.get("componentRules") is not None else None,
126
+ "dealing_rule": ComponentRule.from_dict(obj.get("dealingRule")) if obj.get("dealingRule") is not None else None,
127
+ "fund_pnl_exclusion_rule": ComponentRule.from_dict(obj.get("fundPnlExclusionRule")) if obj.get("fundPnlExclusionRule") is not None else None,
128
+ "back_out_rule": ComponentRule.from_dict(obj.get("backOutRule")) if obj.get("backOutRule") is not None else None,
123
129
  "properties": dict(
124
130
  (_k, ModelProperty.from_dict(_v))
125
131
  for _k, _v in obj.get("properties").items()
@@ -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, Optional, Union
22
+ from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt
23
+
24
+ class FundPreviousNAV(BaseModel):
25
+ """
26
+ FundPreviousNAV
27
+ """
28
+ amount: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The amount of the previous NAV.")
29
+ __properties = ["amount"]
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) -> FundPreviousNAV:
46
+ """Create an instance of FundPreviousNAV 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) -> FundPreviousNAV:
59
+ """Create an instance of FundPreviousNAV from a dict"""
60
+ if obj is None:
61
+ return None
62
+
63
+ if not isinstance(obj, dict):
64
+ return FundPreviousNAV.parse_obj(obj)
65
+
66
+ _obj = FundPreviousNAV.parse_obj({
67
+ "amount": obj.get("amount")
68
+ })
69
+ return _obj
@@ -32,6 +32,7 @@ class FundRequest(BaseModel):
32
32
  code: constr(strict=True, max_length=64, min_length=1) = Field(..., description="The code given for the Fund.")
33
33
  display_name: Optional[constr(strict=True, max_length=256, min_length=1)] = Field(None, alias="displayName", description="The name of the Fund.")
34
34
  description: Optional[constr(strict=True, max_length=1024, min_length=0)] = Field(None, description="A description for the Fund.")
35
+ fund_configuration_id: Optional[ResourceId] = Field(None, alias="fundConfigurationId")
35
36
  abor_id: ResourceId = Field(..., alias="aborId")
36
37
  share_class_instrument_scopes: Optional[conlist(StrictStr, max_items=1)] = Field(None, alias="shareClassInstrumentScopes", description="The scopes in which the instruments lie, currently limited to one.")
37
38
  share_class_instruments: Optional[conlist(InstrumentResolutionDetail)] = Field(None, alias="shareClassInstruments", description="Details the user-provided instrument identifiers and the instrument resolved from them.")
@@ -40,7 +41,7 @@ class FundRequest(BaseModel):
40
41
  decimal_places: Optional[conint(strict=True, le=30, ge=0)] = Field(None, alias="decimalPlaces", description="Number of decimal places for reporting")
41
42
  year_end_date: DayMonth = Field(..., alias="yearEndDate")
42
43
  properties: Optional[Dict[str, ModelProperty]] = Field(None, description="A set of properties for the Fund.")
43
- __properties = ["code", "displayName", "description", "aborId", "shareClassInstrumentScopes", "shareClassInstruments", "type", "inceptionDate", "decimalPlaces", "yearEndDate", "properties"]
44
+ __properties = ["code", "displayName", "description", "fundConfigurationId", "aborId", "shareClassInstrumentScopes", "shareClassInstruments", "type", "inceptionDate", "decimalPlaces", "yearEndDate", "properties"]
44
45
 
45
46
  @validator('code')
46
47
  def code_validate_regular_expression(cls, value):
@@ -83,6 +84,9 @@ class FundRequest(BaseModel):
83
84
  exclude={
84
85
  },
85
86
  exclude_none=True)
87
+ # override the default output from pydantic by calling `to_dict()` of fund_configuration_id
88
+ if self.fund_configuration_id:
89
+ _dict['fundConfigurationId'] = self.fund_configuration_id.to_dict()
86
90
  # override the default output from pydantic by calling `to_dict()` of abor_id
87
91
  if self.abor_id:
88
92
  _dict['aborId'] = self.abor_id.to_dict()
@@ -148,6 +152,7 @@ class FundRequest(BaseModel):
148
152
  "code": obj.get("code"),
149
153
  "display_name": obj.get("displayName"),
150
154
  "description": obj.get("description"),
155
+ "fund_configuration_id": ResourceId.from_dict(obj.get("fundConfigurationId")) if obj.get("fundConfigurationId") is not None else None,
151
156
  "abor_id": ResourceId.from_dict(obj.get("aborId")) if obj.get("aborId") is not None else None,
152
157
  "share_class_instrument_scopes": obj.get("shareClassInstrumentScopes"),
153
158
  "share_class_instruments": [InstrumentResolutionDetail.from_dict(_item) for _item in obj.get("shareClassInstruments")] if obj.get("shareClassInstruments") is not None else None,
@@ -0,0 +1,160 @@
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
+ from lusid.models.fee_accrual import FeeAccrual
24
+ from lusid.models.fund_amount import FundAmount
25
+ from lusid.models.previous_fund_valuation_point_data import PreviousFundValuationPointData
26
+ from lusid.models.unitisation_data import UnitisationData
27
+
28
+ class FundValuationPointData(BaseModel):
29
+ """
30
+ The Valuation Point Data for a Fund on a specified date. # noqa: E501
31
+ """
32
+ back_out: Dict[str, FundAmount] = Field(..., alias="backOut", description="Bucket of detail for the Valuation Point where data points have been 'backed out'.")
33
+ dealing: Dict[str, FundAmount] = Field(..., description="Bucket of detail for any 'Dealing' that has occured inside the queried period.")
34
+ pn_l: Dict[str, FundAmount] = Field(..., alias="pnL", description="Bucket of detail for 'PnL' that has occured inside the queried period.")
35
+ gav: Union[StrictFloat, StrictInt] = Field(..., description="The Gross Asset Value of the Fund or Share Class at the Valuation Point. This is effectively a summation of all Trial balance entries linked to accounts of types 'Asset' and 'Liabilities'.")
36
+ fees: Dict[str, FeeAccrual] = Field(..., description="Bucket of detail for any 'Fees' that have been charged in the selected period.")
37
+ nav: Union[StrictFloat, StrictInt] = Field(..., description="The Net Asset Value of the Fund or Share Class at the Valuation Point. This represents the GAV with any fees applied in the period.")
38
+ unitisation: Optional[UnitisationData] = None
39
+ miscellaneous: Optional[Dict[str, FundAmount]] = Field(None, description="Not used directly by the LUSID engines but serves as a holding area for any custom derived data points that may be useful in, for example, fee calculations).")
40
+ previous_valuation_point_data: Optional[PreviousFundValuationPointData] = Field(None, alias="previousValuationPointData")
41
+ __properties = ["backOut", "dealing", "pnL", "gav", "fees", "nav", "unitisation", "miscellaneous", "previousValuationPointData"]
42
+
43
+ class Config:
44
+ """Pydantic configuration"""
45
+ allow_population_by_field_name = True
46
+ validate_assignment = True
47
+
48
+ def to_str(self) -> str:
49
+ """Returns the string representation of the model using alias"""
50
+ return pprint.pformat(self.dict(by_alias=True))
51
+
52
+ def to_json(self) -> str:
53
+ """Returns the JSON representation of the model using alias"""
54
+ return json.dumps(self.to_dict())
55
+
56
+ @classmethod
57
+ def from_json(cls, json_str: str) -> FundValuationPointData:
58
+ """Create an instance of FundValuationPointData from a JSON string"""
59
+ return cls.from_dict(json.loads(json_str))
60
+
61
+ def to_dict(self):
62
+ """Returns the dictionary representation of the model using alias"""
63
+ _dict = self.dict(by_alias=True,
64
+ exclude={
65
+ },
66
+ exclude_none=True)
67
+ # override the default output from pydantic by calling `to_dict()` of each value in back_out (dict)
68
+ _field_dict = {}
69
+ if self.back_out:
70
+ for _key in self.back_out:
71
+ if self.back_out[_key]:
72
+ _field_dict[_key] = self.back_out[_key].to_dict()
73
+ _dict['backOut'] = _field_dict
74
+ # override the default output from pydantic by calling `to_dict()` of each value in dealing (dict)
75
+ _field_dict = {}
76
+ if self.dealing:
77
+ for _key in self.dealing:
78
+ if self.dealing[_key]:
79
+ _field_dict[_key] = self.dealing[_key].to_dict()
80
+ _dict['dealing'] = _field_dict
81
+ # override the default output from pydantic by calling `to_dict()` of each value in pn_l (dict)
82
+ _field_dict = {}
83
+ if self.pn_l:
84
+ for _key in self.pn_l:
85
+ if self.pn_l[_key]:
86
+ _field_dict[_key] = self.pn_l[_key].to_dict()
87
+ _dict['pnL'] = _field_dict
88
+ # override the default output from pydantic by calling `to_dict()` of each value in fees (dict)
89
+ _field_dict = {}
90
+ if self.fees:
91
+ for _key in self.fees:
92
+ if self.fees[_key]:
93
+ _field_dict[_key] = self.fees[_key].to_dict()
94
+ _dict['fees'] = _field_dict
95
+ # override the default output from pydantic by calling `to_dict()` of unitisation
96
+ if self.unitisation:
97
+ _dict['unitisation'] = self.unitisation.to_dict()
98
+ # override the default output from pydantic by calling `to_dict()` of each value in miscellaneous (dict)
99
+ _field_dict = {}
100
+ if self.miscellaneous:
101
+ for _key in self.miscellaneous:
102
+ if self.miscellaneous[_key]:
103
+ _field_dict[_key] = self.miscellaneous[_key].to_dict()
104
+ _dict['miscellaneous'] = _field_dict
105
+ # override the default output from pydantic by calling `to_dict()` of previous_valuation_point_data
106
+ if self.previous_valuation_point_data:
107
+ _dict['previousValuationPointData'] = self.previous_valuation_point_data.to_dict()
108
+ # set to None if miscellaneous (nullable) is None
109
+ # and __fields_set__ contains the field
110
+ if self.miscellaneous is None and "miscellaneous" in self.__fields_set__:
111
+ _dict['miscellaneous'] = None
112
+
113
+ return _dict
114
+
115
+ @classmethod
116
+ def from_dict(cls, obj: dict) -> FundValuationPointData:
117
+ """Create an instance of FundValuationPointData from a dict"""
118
+ if obj is None:
119
+ return None
120
+
121
+ if not isinstance(obj, dict):
122
+ return FundValuationPointData.parse_obj(obj)
123
+
124
+ _obj = FundValuationPointData.parse_obj({
125
+ "back_out": dict(
126
+ (_k, FundAmount.from_dict(_v))
127
+ for _k, _v in obj.get("backOut").items()
128
+ )
129
+ if obj.get("backOut") is not None
130
+ else None,
131
+ "dealing": dict(
132
+ (_k, FundAmount.from_dict(_v))
133
+ for _k, _v in obj.get("dealing").items()
134
+ )
135
+ if obj.get("dealing") is not None
136
+ else None,
137
+ "pn_l": dict(
138
+ (_k, FundAmount.from_dict(_v))
139
+ for _k, _v in obj.get("pnL").items()
140
+ )
141
+ if obj.get("pnL") is not None
142
+ else None,
143
+ "gav": obj.get("gav"),
144
+ "fees": dict(
145
+ (_k, FeeAccrual.from_dict(_v))
146
+ for _k, _v in obj.get("fees").items()
147
+ )
148
+ if obj.get("fees") is not None
149
+ else None,
150
+ "nav": obj.get("nav"),
151
+ "unitisation": UnitisationData.from_dict(obj.get("unitisation")) if obj.get("unitisation") is not None else None,
152
+ "miscellaneous": dict(
153
+ (_k, FundAmount.from_dict(_v))
154
+ for _k, _v in obj.get("miscellaneous").items()
155
+ )
156
+ if obj.get("miscellaneous") is not None
157
+ else None,
158
+ "previous_valuation_point_data": PreviousFundValuationPointData.from_dict(obj.get("previousValuationPointData")) if obj.get("previousValuationPointData") is not None else None
159
+ })
160
+ return _obj
@@ -39,7 +39,8 @@ class FuturesContractDetails(BaseModel):
39
39
  ticker_step: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tickerStep", description="Minimal step size change in ticker.")
40
40
  unit_value: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="unitValue", description="The value in the currency of a 1 unit change in the contract price.")
41
41
  calendars: Optional[conlist(StrictStr)] = Field(None, description="Holiday calendars that apply to yield-to-price conversions (i.e. for BRL futures).")
42
- __properties = ["domCcy", "fgnCcy", "assetClass", "contractCode", "contractMonth", "contractSize", "convention", "country", "description", "exchangeCode", "exchangeName", "tickerStep", "unitValue", "calendars"]
42
+ delivery_type: Optional[StrictStr] = Field(None, alias="deliveryType", description="Delivery type to be used on settling the contract. Optional: Defaults to DeliveryType.Physical if not provided. Supported string (enumeration) values are: [Cash, Physical].")
43
+ __properties = ["domCcy", "fgnCcy", "assetClass", "contractCode", "contractMonth", "contractSize", "convention", "country", "description", "exchangeCode", "exchangeName", "tickerStep", "unitValue", "calendars", "deliveryType"]
43
44
 
44
45
  class Config:
45
46
  """Pydantic configuration"""
@@ -100,6 +101,11 @@ class FuturesContractDetails(BaseModel):
100
101
  if self.calendars is None and "calendars" in self.__fields_set__:
101
102
  _dict['calendars'] = None
102
103
 
104
+ # set to None if delivery_type (nullable) is None
105
+ # and __fields_set__ contains the field
106
+ if self.delivery_type is None and "delivery_type" in self.__fields_set__:
107
+ _dict['deliveryType'] = None
108
+
103
109
  return _dict
104
110
 
105
111
  @classmethod
@@ -125,6 +131,7 @@ class FuturesContractDetails(BaseModel):
125
131
  "exchange_name": obj.get("exchangeName"),
126
132
  "ticker_step": obj.get("tickerStep"),
127
133
  "unit_value": obj.get("unitValue"),
128
- "calendars": obj.get("calendars")
134
+ "calendars": obj.get("calendars"),
135
+ "delivery_type": obj.get("deliveryType")
129
136
  })
130
137
  return _obj
@@ -49,6 +49,7 @@ class LusidInstrument(BaseModel):
49
49
  'Basket': 'Basket',
50
50
  'Bond': 'Bond',
51
51
  'CapFloor': 'CapFloor',
52
+ 'Cash': 'Cash',
52
53
  'CashPerpetual': 'CashPerpetual',
53
54
  'CdsIndex': 'CdsIndex',
54
55
  'ComplexBond': 'ComplexBond',
@@ -101,7 +102,7 @@ class LusidInstrument(BaseModel):
101
102
  return json.dumps(self.to_dict())
102
103
 
103
104
  @classmethod
104
- def from_json(cls, json_str: str) -> Union(Basket, Bond, CapFloor, CashPerpetual, CdsIndex, ComplexBond, ContractForDifference, CreditDefaultSwap, Equity, EquityOption, EquitySwap, ExchangeTradedOption, ExoticInstrument, FlexibleLoan, ForwardRateAgreement, FundShareClass, Future, FxForward, FxOption, FxSwap, InflationLeg, InflationLinkedBond, InflationSwap, InstrumentLeg, InterestRateSwap, InterestRateSwaption, ReferenceInstrument, Repo, SimpleCashFlowLoan, SimpleInstrument, TermDeposit, TotalReturnSwap):
105
+ def from_json(cls, json_str: str) -> Union(Basket, Bond, CapFloor, Cash, CashPerpetual, CdsIndex, ComplexBond, ContractForDifference, CreditDefaultSwap, Equity, EquityOption, EquitySwap, ExchangeTradedOption, ExoticInstrument, FlexibleLoan, ForwardRateAgreement, FundShareClass, Future, FxForward, FxOption, FxSwap, InflationLeg, InflationLinkedBond, InflationSwap, InstrumentLeg, InterestRateSwap, InterestRateSwaption, ReferenceInstrument, Repo, SimpleCashFlowLoan, SimpleInstrument, TermDeposit, TotalReturnSwap):
105
106
  """Create an instance of LusidInstrument from a JSON string"""
106
107
  return cls.from_dict(json.loads(json_str))
107
108
 
@@ -114,7 +115,7 @@ class LusidInstrument(BaseModel):
114
115
  return _dict
115
116
 
116
117
  @classmethod
117
- def from_dict(cls, obj: dict) -> Union(Basket, Bond, CapFloor, CashPerpetual, CdsIndex, ComplexBond, ContractForDifference, CreditDefaultSwap, Equity, EquityOption, EquitySwap, ExchangeTradedOption, ExoticInstrument, FlexibleLoan, ForwardRateAgreement, FundShareClass, Future, FxForward, FxOption, FxSwap, InflationLeg, InflationLinkedBond, InflationSwap, InstrumentLeg, InterestRateSwap, InterestRateSwaption, ReferenceInstrument, Repo, SimpleCashFlowLoan, SimpleInstrument, TermDeposit, TotalReturnSwap):
118
+ def from_dict(cls, obj: dict) -> Union(Basket, Bond, CapFloor, Cash, CashPerpetual, CdsIndex, ComplexBond, ContractForDifference, CreditDefaultSwap, Equity, EquityOption, EquitySwap, ExchangeTradedOption, ExoticInstrument, FlexibleLoan, ForwardRateAgreement, FundShareClass, Future, FxForward, FxOption, FxSwap, InflationLeg, InflationLinkedBond, InflationSwap, InstrumentLeg, InterestRateSwap, InterestRateSwaption, ReferenceInstrument, Repo, SimpleCashFlowLoan, SimpleInstrument, TermDeposit, TotalReturnSwap):
118
119
  """Create an instance of LusidInstrument from a dict"""
119
120
  # look up the object type based on discriminator mapping
120
121
  object_type = cls.get_discriminator_value(obj)
@@ -28,7 +28,7 @@ class MarketDataKeyRule(BaseModel):
28
28
  key: constr(strict=True, max_length=128, min_length=0) = Field(..., description="A dot-separated string that defines a pattern for matching market data dependencies. The form of the string depends on the type of the dependency; see below for basic types and the Knowledge Base for further info. Quote lookup: \"Quote.{CodeType}.*\" e.g. \"Quote.RIC.*\" refers to 'any RIC quote' Fx rates: \"Fx.CurrencyPair.*\", which refers to 'any FX rate' Discounting curves: \"Rates.{Currency}.{Currency}OIS e.g. \"Rates.USD.USDOIS\" refers to the OIS USD discounting curve For non-fx and non-quote rules, trailing parameters can be replaced by the wildcard character '*'. e.g. \"Rates.*.*\" matches any dependency on a discounting curve.")
29
29
  supplier: constr(strict=True, max_length=32, min_length=0) = Field(..., description="The market data supplier (where the data comes from)")
30
30
  data_scope: constr(strict=True, max_length=256, min_length=1) = Field(..., alias="dataScope", description="The scope in which the data should be found when using this rule.")
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")
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
34
  as_at: Optional[datetime] = Field(None, alias="asAt", description="The AsAt predicate specification.")
@@ -47,8 +47,8 @@ class MarketDataKeyRule(BaseModel):
47
47
  @validator('quote_type')
48
48
  def quote_type_validate_enum(cls, value):
49
49
  """Validates the enum"""
50
- if value not in ('Price', 'Spread', 'Rate', 'LogNormalVol', 'NormalVol', 'ParSpread', 'IsdaSpread', 'Upfront', 'Index', 'Ratio', 'Delta', 'PoolFactor', 'InflationAssumption', 'DirtyPrice'):
51
- raise ValueError("must be one of enum values ('Price', 'Spread', 'Rate', 'LogNormalVol', 'NormalVol', 'ParSpread', 'IsdaSpread', 'Upfront', 'Index', 'Ratio', 'Delta', 'PoolFactor', 'InflationAssumption', 'DirtyPrice')")
50
+ if value not in ('Price', 'Spread', 'Rate', 'LogNormalVol', 'NormalVol', 'ParSpread', 'IsdaSpread', 'Upfront', 'Index', 'Ratio', 'Delta', 'PoolFactor', 'InflationAssumption', 'DirtyPrice', 'PrincipalWriteOff', 'InterestDeferred', 'InterestShortfall'):
51
+ raise ValueError("must be one of enum values ('Price', 'Spread', 'Rate', 'LogNormalVol', 'NormalVol', 'ParSpread', 'IsdaSpread', 'Upfront', 'Index', 'Ratio', 'Delta', 'PoolFactor', 'InflationAssumption', 'DirtyPrice', 'PrincipalWriteOff', 'InterestDeferred', 'InterestShortfall')")
52
52
  return value
53
53
 
54
54
  class Config:
@@ -29,7 +29,7 @@ class MarketDataSpecificRule(BaseModel):
29
29
  key: constr(strict=True, max_length=128, min_length=0) = Field(..., description="The market data key pattern which this is a rule for. A dot separated string (A.B.C.D.*)")
30
30
  supplier: constr(strict=True, max_length=32, min_length=0) = Field(..., description="The market data supplier (where the data comes from)")
31
31
  data_scope: constr(strict=True, max_length=256, min_length=1) = Field(..., alias="dataScope", description="The scope in which the data should be found when using this rule.")
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")
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
35
  as_at: Optional[datetime] = Field(None, alias="asAt", description="The AsAt predicate specification.")
@@ -49,8 +49,8 @@ class MarketDataSpecificRule(BaseModel):
49
49
  @validator('quote_type')
50
50
  def quote_type_validate_enum(cls, value):
51
51
  """Validates the enum"""
52
- if value not in ('Price', 'Spread', 'Rate', 'LogNormalVol', 'NormalVol', 'ParSpread', 'IsdaSpread', 'Upfront', 'Index', 'Ratio', 'Delta', 'PoolFactor', 'InflationAssumption', 'DirtyPrice'):
53
- raise ValueError("must be one of enum values ('Price', 'Spread', 'Rate', 'LogNormalVol', 'NormalVol', 'ParSpread', 'IsdaSpread', 'Upfront', 'Index', 'Ratio', 'Delta', 'PoolFactor', 'InflationAssumption', 'DirtyPrice')")
52
+ if value not in ('Price', 'Spread', 'Rate', 'LogNormalVol', 'NormalVol', 'ParSpread', 'IsdaSpread', 'Upfront', 'Index', 'Ratio', 'Delta', 'PoolFactor', 'InflationAssumption', 'DirtyPrice', 'PrincipalWriteOff', 'InterestDeferred', 'InterestShortfall'):
53
+ raise ValueError("must be one of enum values ('Price', 'Spread', 'Rate', 'LogNormalVol', 'NormalVol', 'ParSpread', 'IsdaSpread', 'Upfront', 'Index', 'Ratio', 'Delta', 'PoolFactor', 'InflationAssumption', 'DirtyPrice', 'PrincipalWriteOff', 'InterestDeferred', 'InterestShortfall')")
54
54
  return value
55
55
 
56
56
  class Config:
@@ -25,15 +25,15 @@ class MarketQuote(BaseModel):
25
25
  """
26
26
  The market quote for an observable which will be used to calibrate the market data, including the format of the quote. e.g. a volatility quote for a specific strike and expiry the par rate of a swap This is a slimmed down version of a full Quote that can be stored in our QuoteStore to remove lineage, price source etc. for ease of use when creating complex market data. # noqa: E501
27
27
  """
28
- 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")
28
+ 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")
29
29
  value: Union[StrictFloat, StrictInt] = Field(..., description="Numeric value of the quote")
30
30
  __properties = ["quoteType", "value"]
31
31
 
32
32
  @validator('quote_type')
33
33
  def quote_type_validate_enum(cls, value):
34
34
  """Validates the enum"""
35
- if value not in ('Price', 'Spread', 'Rate', 'LogNormalVol', 'NormalVol', 'ParSpread', 'IsdaSpread', 'Upfront', 'Index', 'Ratio', 'Delta', 'PoolFactor', 'InflationAssumption', 'DirtyPrice'):
36
- raise ValueError("must be one of enum values ('Price', 'Spread', 'Rate', 'LogNormalVol', 'NormalVol', 'ParSpread', 'IsdaSpread', 'Upfront', 'Index', 'Ratio', 'Delta', 'PoolFactor', 'InflationAssumption', 'DirtyPrice')")
35
+ if value not in ('Price', 'Spread', 'Rate', 'LogNormalVol', 'NormalVol', 'ParSpread', 'IsdaSpread', 'Upfront', 'Index', 'Ratio', 'Delta', 'PoolFactor', 'InflationAssumption', 'DirtyPrice', 'PrincipalWriteOff', 'InterestDeferred', 'InterestShortfall'):
36
+ raise ValueError("must be one of enum values ('Price', 'Spread', 'Rate', 'LogNormalVol', 'NormalVol', 'ParSpread', 'IsdaSpread', 'Upfront', 'Index', 'Ratio', 'Delta', 'PoolFactor', 'InflationAssumption', 'DirtyPrice', 'PrincipalWriteOff', 'InterestDeferred', 'InterestShortfall')")
37
37
  return value
38
38
 
39
39
  class Config:
@@ -26,7 +26,7 @@ class ModelSelection(BaseModel):
26
26
  The combination of a library to use and a model in that library that defines which pricing code will evaluate instruments having a particular type/class. This allows us to control the model type and library for a given instrument. # noqa: E501
27
27
  """
28
28
  library: StrictStr = Field(..., description="The available values are: Lusid, RefinitivQps, RefinitivTracsWeb, VolMaster, IsdaCds, YieldBook, LusidCalc")
29
- model: StrictStr = Field(..., description="The available values are: SimpleStatic, Discounting, VendorDefault, BlackScholes, ConstantTimeValueOfMoney, Bachelier, ForwardWithPoints, ForwardWithPointsUndiscounted, ForwardSpecifiedRate, ForwardSpecifiedRateUndiscounted, IndexNav, IndexPrice, InlinedIndex, ForwardFromCurve, ForwardFromCurveUndiscounted, BlackScholesDigital, BjerksundStensland1993, BondLookupPricer, FlexibleLoanPricer")
29
+ model: StrictStr = Field(..., description="The available values are: SimpleStatic, Discounting, VendorDefault, BlackScholes, ConstantTimeValueOfMoney, Bachelier, ForwardWithPoints, ForwardWithPointsUndiscounted, ForwardSpecifiedRate, ForwardSpecifiedRateUndiscounted, IndexNav, IndexPrice, InlinedIndex, ForwardFromCurve, ForwardFromCurveUndiscounted, BlackScholesDigital, BjerksundStensland1993, BondLookupPricer, FlexibleLoanPricer, CdsLookupPricer")
30
30
  __properties = ["library", "model"]
31
31
 
32
32
  @validator('library')
@@ -39,8 +39,8 @@ class ModelSelection(BaseModel):
39
39
  @validator('model')
40
40
  def model_validate_enum(cls, value):
41
41
  """Validates the enum"""
42
- if value not in ('SimpleStatic', 'Discounting', 'VendorDefault', 'BlackScholes', 'ConstantTimeValueOfMoney', 'Bachelier', 'ForwardWithPoints', 'ForwardWithPointsUndiscounted', 'ForwardSpecifiedRate', 'ForwardSpecifiedRateUndiscounted', 'IndexNav', 'IndexPrice', 'InlinedIndex', 'ForwardFromCurve', 'ForwardFromCurveUndiscounted', 'BlackScholesDigital', 'BjerksundStensland1993', 'BondLookupPricer', 'FlexibleLoanPricer'):
43
- raise ValueError("must be one of enum values ('SimpleStatic', 'Discounting', 'VendorDefault', 'BlackScholes', 'ConstantTimeValueOfMoney', 'Bachelier', 'ForwardWithPoints', 'ForwardWithPointsUndiscounted', 'ForwardSpecifiedRate', 'ForwardSpecifiedRateUndiscounted', 'IndexNav', 'IndexPrice', 'InlinedIndex', 'ForwardFromCurve', 'ForwardFromCurveUndiscounted', 'BlackScholesDigital', 'BjerksundStensland1993', 'BondLookupPricer', 'FlexibleLoanPricer')")
42
+ if value not in ('SimpleStatic', 'Discounting', 'VendorDefault', 'BlackScholes', 'ConstantTimeValueOfMoney', 'Bachelier', 'ForwardWithPoints', 'ForwardWithPointsUndiscounted', 'ForwardSpecifiedRate', 'ForwardSpecifiedRateUndiscounted', 'IndexNav', 'IndexPrice', 'InlinedIndex', 'ForwardFromCurve', 'ForwardFromCurveUndiscounted', 'BlackScholesDigital', 'BjerksundStensland1993', 'BondLookupPricer', 'FlexibleLoanPricer', 'CdsLookupPricer'):
43
+ raise ValueError("must be one of enum values ('SimpleStatic', 'Discounting', 'VendorDefault', 'BlackScholes', 'ConstantTimeValueOfMoney', 'Bachelier', 'ForwardWithPoints', 'ForwardWithPointsUndiscounted', 'ForwardSpecifiedRate', 'ForwardSpecifiedRateUndiscounted', 'IndexNav', 'IndexPrice', 'InlinedIndex', 'ForwardFromCurve', 'ForwardFromCurveUndiscounted', 'BlackScholesDigital', 'BjerksundStensland1993', 'BondLookupPricer', 'FlexibleLoanPricer', 'CdsLookupPricer')")
44
44
  return value
45
45
 
46
46
  class Config:
@@ -0,0 +1,79 @@
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
23
+ from lusid.models.fund_previous_nav import FundPreviousNAV
24
+ from lusid.models.unitisation_data import UnitisationData
25
+
26
+ class PreviousFundValuationPointData(BaseModel):
27
+ """
28
+ The data for a Fund at the previous valuation point. # noqa: E501
29
+ """
30
+ nav: FundPreviousNAV = Field(...)
31
+ unitisation: Optional[UnitisationData] = None
32
+ __properties = ["nav", "unitisation"]
33
+
34
+ class Config:
35
+ """Pydantic configuration"""
36
+ allow_population_by_field_name = True
37
+ validate_assignment = True
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.dict(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ return json.dumps(self.to_dict())
46
+
47
+ @classmethod
48
+ def from_json(cls, json_str: str) -> PreviousFundValuationPointData:
49
+ """Create an instance of PreviousFundValuationPointData from a JSON string"""
50
+ return cls.from_dict(json.loads(json_str))
51
+
52
+ def to_dict(self):
53
+ """Returns the dictionary representation of the model using alias"""
54
+ _dict = self.dict(by_alias=True,
55
+ exclude={
56
+ },
57
+ exclude_none=True)
58
+ # override the default output from pydantic by calling `to_dict()` of nav
59
+ if self.nav:
60
+ _dict['nav'] = self.nav.to_dict()
61
+ # override the default output from pydantic by calling `to_dict()` of unitisation
62
+ if self.unitisation:
63
+ _dict['unitisation'] = self.unitisation.to_dict()
64
+ return _dict
65
+
66
+ @classmethod
67
+ def from_dict(cls, obj: dict) -> PreviousFundValuationPointData:
68
+ """Create an instance of PreviousFundValuationPointData from a dict"""
69
+ if obj is None:
70
+ return None
71
+
72
+ if not isinstance(obj, dict):
73
+ return PreviousFundValuationPointData.parse_obj(obj)
74
+
75
+ _obj = PreviousFundValuationPointData.parse_obj({
76
+ "nav": FundPreviousNAV.from_dict(obj.get("nav")) if obj.get("nav") is not None else None,
77
+ "unitisation": UnitisationData.from_dict(obj.get("unitisation")) if obj.get("unitisation") is not None else None
78
+ })
79
+ return _obj