question

Upvotes
Accepted
3 0 1 5

Using the python API, is there any way to retrieve the data from the Volatility Chart on XAU= (Volatility QC in eikon [VOLC].

Using the python API, is there any way to retrieve the data from the Volatility Chart on XAU= (Volatility QC in eikon [VOLC].


Having this is a table with vol with different terms/pillars.


volc.png

#technologyapi#contentpython api
volc.png (54.6 KiB)
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.

Anyone who can assist. The client is using visual studio.

Thanks

1 Answer

· Write an Answer
Upvotes
Accepted
5.6k 18 2 7

Hi @jeremiemae.celajes ,


I was trying to answer to your question yesterday, however failed to find a comprehensive one. But let me share with you what I have found during my research and maybe you find it useful to take it from there.

I have tried using Instrument Price Analytics from Refinitiv Data Libraries to get the volatility surface for the required instrument. Please see my code below:

import refinitiv.data as rd
from refinitiv.data.content.ipa import surfaces
rd.open_session()

response = surfaces.fx.Definition(

    surface_tag="XAU/USD",
    underlying_definition=surfaces.fx.FxSurfaceDefinition(
        fx_cross_code="XAUUSD"
    ),
    surface_parameters=surfaces.fx.FxCalculationParams(
        volatility_model="SVI",
        x_axis="Tenor",
        y_axis="Strike",
        calculation_date="2023-10-18",
    ),
    surface_layout=surfaces.fx.SurfaceLayout(
        format="Matrix",
    ),
).get_data()

response.data.df

Below is the output for the the requested calculation date:



screenshot-2023-10-19-at-102134.png

I have tried to see if there is a way to provide a time range, but failed to find a way to do it. You may try to make separate requests for each day.

You may find more information about the parameters/fields from the API Playground page of the endpoint and the official documentation here.


Also, you find useful some additional examples from our GitHub page.


Hope this helps, I will let my colleagues to contribute in case have missed anything here.


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.

Thank you for the information.

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.