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:
(Y axis=delta)
(Call delta/Put delta)
However, there seems no such a parameter in IPA:
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?
Best Answer
-
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.
0
Answers
-
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
}
}
]
}0 -
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:
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)
(error)
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.
0 -
Thank you very much!0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛