Beispiel #1
0
    def add_factor_risk_report(self, risk_model_id: str, fx_hedged: bool):
        """
        Create and schedule a new factor risk report for your basket

        :param risk_model_id: risk model identifier
        :param fx_hedged: Assume basket is FX hedged

        **Usage**

        Create and schedule a new factor risk report for your basket

        **Examples**

        >>> from gs_quant.markets.baskets import Basket
        >>>
        >>> basket = Basket.get("GSMBXXXX")
        >>> basket.add_factor_risk_report('AXUS4M', True)

        **See also**

        :func:`delete_factor_risk_report`
        """
        payload = CustomBasketRiskParams(risk_model=risk_model_id,
                                         fx_hedged=fx_hedged)
        return GsIndexApi.update_risk_reports(payload)
Beispiel #2
0
    def delete_factor_risk_report(self, risk_model_id: str):
        """
        Delete an existing factor risk report for your basket

        :param risk_model_id: risk model identifier for the report you'd like to delete

        **Usage**

        Delete an existing factor risk report for your basket

        **Examples**

        >>> from gs_quant.markets.baskets import Basket
        >>>
        >>> basket = Basket.get("GSMBXXXX")
        >>> basket.delete_factor_risk_report('AXUS4M')

        **See also**

        :func:`add_factor_risk_report`
        """
        payload = CustomBasketRiskParams(risk_model=risk_model_id, delete=True)
        return GsIndexApi.update_risk_reports(payload)