Would you know where I could find out the corresponding python call for the formula:

=@RDP.Analytics("financialcontracts", "fxforward", "EURUSD", "legs:[(StartTenor:0D Tenor:#2)] Valuationdate:#1", "StartDate;EndDate",,,TradeDate,"1M")

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @RALPHPAOLO.NAVARRO

    Thank you for reaching out to us.

    Please refer to the EX-2.07.04-IPA-FinancialContracts-FXCross.ipynb example. The example use the LSEG Data Library for Python. The code should look like this:

    response = cross.Definition(
        instrument_tag="1M_EURUSD",
        fx_cross_type=cross.FxCrossType.FX_FORWARD,
        fx_cross_code="EURUSD",
        legs=[
            cross.LegDefinition(
                start_tenor="0D",
                tenor="1M",
            )
        ],
        pricing_parameters=cross.PricingParameters(
            valuation_date="2018-02-17T00:00:00Z"
        ),
        fields=[
            "StartDate",
            "EndDate"
        ]
    ).get_data()
    
    response.data.df