Client is using the python API and are trying to switch from refinitiv.dataplatform to refinitiv.data.
As an example they sent two different scripts from those two libraries and what they want to get is the same output for the following fields: ‘MarketValueInDealCcy’, 'VegaAmountInDealCcy', 'ThetaAmountInDealCcy' using the same input.
And it seems that between the two libraries there is a different method of providing data.
Do you have any mapping for fields that are used in old and new version, documentation about that change, because we couldn’t find it.
Can you please share your insights regarding the differences between these two?
old script:
capFloorDef = ipa.capfloor.Definition(
notional_ccy="EUR",
start_date="2024-12-31",
end_date="2027-12-31",
buy_sell="Sell",
notional_amount=71100000,
index_name="EURIBOR",
interest_payment_frequency="SemiAnnual",
index_tenor="SemiAnnual",
cap_strike_percent=0,
floor_strike_percent=2.220446049250313e-16)
valuationResult = rdp.get_capfloor_analytics(universe=capFloorDef,
calculation_params=ipa.capfloor.CalculationParams(
valuation_date="2024-11-20",
report_ccy="EUR"),
fields=['MarketValueInDealCcy',
'VegaAmountInDealCcy',
'ThetaAmountInDealCcy'])
#-45603.262079,-2275.055439,382.477931
new script:
import refinitiv.data.content.ipa.financial_contracts as rdf
definition = rdf.cap_floor.Definition(
notional_ccy = "EUR",
start_date = "2024-12-31",
end_date = "2027-12-31",
notional_amount = 71100000,
index_name = "EURIBOR",
index_tenor = "6M",
interest_calculation_method = "Dcb_Actual_360",
interest_payment_frequency = rdf.cap_floor.Frequency.SEMI_ANNUAL,
buy_sell = rdf.cap_floor.BuySell.SELL,
cap_strike_percent = 0,
floor_strike_percent = 2.220446049250313e-16,
pricing_parameters = rdf.cap_floor.PricingParameters(
report_ccy="EUR", valuation_date = "2024-11-20"),
fields = [
"MarketValueInDealCcy",
'VegaAmountInDealCcy',
'ThetaAmountInDealCcy'
],
)
response = definition.get_data()
print(response)
#-4516937.00011158, 0.0, 681.69217952