From ec41cd8082f5dec4b93d0c284b9e84dc0ecb33c3 Mon Sep 17 00:00:00 2001 From: "Roberson, Martin [GBM Public]" Date: Mon, 23 Sep 2024 11:01:29 +0000 Subject: [PATCH] Chore: Make release 1.1.10 --- gs_quant/markets/securities.py | 4 ++-- gs_quant/target/common.py | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gs_quant/markets/securities.py b/gs_quant/markets/securities.py index eb5bd6ec..c1c0aa47 100644 --- a/gs_quant/markets/securities.py +++ b/gs_quant/markets/securities.py @@ -1149,7 +1149,7 @@ class FutureContract(Asset): def __init__(self, id_: str, asset_class: Union[AssetClass, str], - name: Union[AssetClass, str], + name: str, entity: Optional[Dict] = None): if isinstance(asset_class, str): asset_class = get_enum_value(AssetClass, asset_class) @@ -1456,7 +1456,7 @@ def __gs_asset_to_asset(cls, gs_asset: GsAsset) -> Asset: return Fund(gs_asset.id, gs_asset.name, gs_asset.assetClass, entity=asset_entity) if asset_type == GsAssetType.Default_Swap.value: - return DefaultSwap(gs_asset.id, gs_asset.asset_class, entity=asset_entity) + return DefaultSwap(gs_asset.id, gs_asset.name, entity=asset_entity) if asset_type == GsAssetType.Swaption.value: return Swaption(gs_asset.id, gs_asset.name, entity=asset_entity) diff --git a/gs_quant/target/common.py b/gs_quant/target/common.py index 51958bea..85589954 100644 --- a/gs_quant/target/common.py +++ b/gs_quant/target/common.py @@ -4755,6 +4755,15 @@ class DateRange(Base): name: Optional[str] = field(default=None, metadata=name_metadata) +@handle_camel_case_args +@dataclass_json(letter_case=LetterCase.CAMEL) +@dataclass(unsafe_hash=True, repr=False, order=True) +class DoubleParameter(RiskMeasureParameter): + value: Optional[float] = field(default=None, metadata=field_metadata) + parameter_type: Optional[str] = field(init=False, default='Double', metadata=field_metadata) + name: Optional[str] = field(default=None, metadata=name_metadata) + + @handle_camel_case_args @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass(unsafe_hash=True, repr=False)