Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Refinitiv Data Platform /
avatar image
REFINITIV
Question by mami.kimura · Sep 08, 2021 at 05:59 AM · rdp-apirefinitiv-data-platformrefinitiv-data-platform-librariesforexvolatilityipa

How do I set up call/put in parameter for IPA FX Volatility surface API ?

A way to set up Call/Put in parameter for IPA FX Volatility surface API is not mentioned in the document"IPA Volatility Surfaces : FX".

In Eikon FXVE, call delta and put delta are automatically come up in the bottom section by selecting "delta" as Y axis on the top left of the app:

無題2.png

(Y axis=delta)

無題.png

(Call delta/Put delta)

However, there seems no such a parameter in IPA:

Document: https://developers.refinitiv.com/en/api-catalog/refinitiv-data-platform/refinitiv-data-platform-apis/documentation#ipa-volatility-surfaces-fx


Here is the sample code:

fx_request_body={

"universe": [

{

"underlyingType": "Fx",

"surfaceTag": "FxVol-USDJPY

",

"underlyingDefinition": {

"fxCrossCode": "USDJPY"

},

"surfaceLayout": {

"format": "Matrix",

"yValues": [ "-0.1","-0.15","-0.2","-0.25","-0.3","-0.35","-0.4","-0.45","0.5","0.45","0.4","0.35","0.3","0.25","0.2","0.15","0.1"]

},

"surfaceParameters": {

"xAxis": "Date",

"yAxis": "Delta",

"calculationDate": "2021-09-08T00:00:00Z",

"returnAtm": "False",

}

}

]

}


fx_response = vs_endpoint.send_request(

method = rdp.Endpoint.RequestMethod.POST,

body_parameters = fx_request_body

)


print(json.dumps(fx_response.data.raw, indent=2))


Could you please advise how to set up call/put in API FX Volatility surface IPA on RDP?





People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Mark.Klimushkin · Sep 08, 2021 at 04:51 PM

Hi @mami.kimura ,


1) This Jupyter notebook is just an example and expected to work properly only with the pre-defined requests there. When some x/yAxis type is changed from the "Date" to "Tenor", it changes output format significantly (Dates vs Strings/Float numbers), what results in the provided error.

If you plan to change or add your own requests in the provided example, you may also need to update existing Python code accordingly or create a separate script/notebook for this purpose.


2) There are additional parameters that can be specified in the API request under "surfaceParameters" section:

            "surfaceParameters": {
                "volatilityModel": "SVI",
                "priceSide":"Mid",
                "deltaConvention": "Spot",
                ....
            }

- When I set these parameters to the same values as selected in FXVE (usually they are the same as provided above) and when I change Delta Convention from "Regular" to "Prem-Adj" in FXVE for USDJPY, I get the same values as in API response.

- API doesn't provide an ability to select Regular or Prem-Adj yet.

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
mami.kimura · Sep 10, 2021 at 12:12 AM 0
Share
Thank you very much!
avatar image
REFINITIV
Answer by Mark.Klimushkin · Sep 08, 2021 at 10:29 AM

Hi @mami.kimura ,

Thanks for your question. You can use below request to get Call/Put Delta values in the output similarly to what's displayed in Eikon FXVE.

- "Date" axis has been replaced with "Tenor" value.

- "returnAtm": true has been added to the request to display "ATM" values.

- xAxis and yAxis can be swapped with each other to get output in different formats if necessary.

- Delta values below 0 in the input return Put Delta values in the output. Delta values above 0 in the input return Call Delta values in the output.


Let me know if you have any other questions.


Request:

{
    "universe": [
        {
            "underlyingType": "Fx",
            "surfaceTag": "FxVol",
            "underlyingDefinition": {
                "fxCrossCode": "USDJPY"
            },
            "surfaceLayout": {
                "format": "Matrix",
                "xValues": [
                    
                    "-0.1",
                    "-0.15",
                    "-0.2",
                    "-0.25",
                    "-0.3",
                    "-0.35",
                    "-0.4",
                    "-0.45",
                    "0.45",
                    "0.4",
                    "0.35",
                    "0.3",
                    "0.25",
                    "0.2",
                    "0.15",
                    "0.1"
                ]
            },
            "surfaceParameters": {
                "xAxis": "Delta",
                "yAxis": "Tenor",
                "calculationDate": "2021-09-08T00:00:00Z",
                "returnAtm": true
            }
        }
    ]
}
Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
mami.kimura · Sep 08, 2021 at 11:40 AM 0
Share

Thank you for the quick response! The code you sent returns value fine but I have a few more questions.


1) I am referring to FX Volatility surface part of this sample on Github:

https://github.com/Refinitiv-API-Samples/Article.RDPLibrary.Python.VolatilitySurfaces_Curves/blob/master/Vol%20Surfaces%20Webinar.ipynb

It consist of 2 requests and first one worked fine with your suggested code, however second one which is to request matrix by using plot returns error message such as "IndexError: index out of bounds".


(First request)

Your suggested code

+

fx_response = vs_endpoint.send_request(

method = rdp.Endpoint.RequestMethod.POST,

body_parameters = fx_request_body

)


print(json.dumps(fx_response.data.raw, indent=2))


(Second request)

2.jpg


(error)

1631101008326.png

1631101030342.png


Could you please advise what to adjust in the code?


2) The returned value gradually gets differ from the FXVE as maturity term gets longer though value of ON and SW seems almost same.

Is there any way to adjust some of the parameter additionally to make it look same?


I would appreciate your advice.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
8 People are following this question.

Related Questions

How do I adjust Values of yAxis displayed on Matrix of FX Volatility Surface IPA?

FX volatility smile

How to retrieve interest rate volatility cube

RDP IPA FX Volatility

WMR Rates - FIDs

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges