question

Upvotes
1 0 0 1

Refinitiv data library for Python to price a USD 5Y swap USD_SB3L and a swaption which take the same swap as underlying

hello, when I use refinitiv data library for Python to price a USD 5Y swap USD_SB3L and a swaption which take the same swap as underlying, I don't get the same value in FixedRatePercent of the swap and in the StrikePercent of the swaption, but they should be the same ?


FixedRatePercent of swap in this result

import refinitiv.data as rd
from refinitiv.data.content.ipa.financial_contracts import swap
from refinitiv.data.content.ipa.financial_contracts import swaption

rd.open_session()

response = swap.Definition(
    instrument_tag="USD 5Y swap",
    template="USD_SB3L",
    start_date = "2023-01-12",
    tenor="5Y",
    
    pricing_parameters=swap.PricingParameters(
        valuation_date="2018-01-12"),
    
    fields=['InstrumentDescription', 'LegDescription', 
           'InstrumentTag', 'LegTag', 'ValuationDate',  'StartDate',
            'EndDate', 'Tenor', 'InterestType',
           'FixedRatePercent', 'SpreadBp', 'Duration', 
           'PV01Bp', 'DV01Bp', 'DiscountCurveName',
           'ForwardCurveName']
).get_data()


response.data.df


StrikePercent of swaption

response = swaption.Definition(


    instrument_tag="USD_3M_5Y_pay",
    settlement_type=swaption.SwaptionSettlementType.PHYSICAL,
    # notional_amount=10000,
    buy_sell=swaption.BuySell.BUY,
    swaption_type=swaption.SwaptionType.PAYER,
    end_date="2023-01-12",
    exercise_style=swaption.ExerciseStyle.EURO,
    
    underlying_definition=swap.Definition(
        tenor="5Y",
        template="USD_SB3L",
        start_date = "2023-01-12",
        pricing_parameters=swap.PricingParameters(
            valuation_date="2018-01-12"),
    ),
    
    pricing_parameters=swaption.PricingParameters(
        # market_data_date="2018-01-12",
        valuation_date="2018-01-12"
    ),
    
    fields=["InstrumentTag",
            "InstrumentDescription",
            "ValuationDate",
            "StartDate", "EndDate",
            "StrikePercent", "UnderlyingTenor",
            'PremiumPercent',
            "ImpliedVolatilityPercent",
            "ImpliedVolatilityBp",
            "ForwardPremiumPercent",
            "ForwardPremiumBp",
            "DiscountCurveName",
            "ForwardCurveName",]
).get_data()


response.data.df
#technology#contentpython apirefinitiv-data-librariesswaps
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

13459452 - work still in progress

Upvotes
6.2k 18 2 8

Hi @jiale.ning ,


Thank you for your question. Since this is related to the content rather than the API usage (as your code looks and works as expected) I need to involve a content specialist here. Let me check with the team and get back to you on this.


Best regards,

Haykaz

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
6.2k 18 2 8

Hi @jiale.ning


I have raised a content query (case number - 13459452) on your behalf. Someone will reach out you regarding that.

Best regards,

Haykaz

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.