For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
5 1 1 3

Forex on past and futures dates equivalent bloomberg api

Hi, in Excel Addin or API from Bloomberg, you can get the BID and ASK price from a forex like this:

bdp(securities = "EUR/USD N 102320@091620 Curncy",
    fields     = c('PX_BID', 'PX_ASK'))

Is there something similar to get exchange on specific future date on historical date?

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonapihistoricalforex
icon clock
10 |1500

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

Upvotes
Accepted
39.2k 75 11 27

@ty

As in the use case discussed on this thread, you can utilize Refinitiv Data Platform Library for the purpose of calculating FX Fwd points or outrights for a given Fwd end date as of a historical date.

from refinitiv.dataplatform.content.ipa.contracts import cross
from refinitiv.dataplatform.content.ipa import FinancialContracts as fc
fwd_contract = cross.Definition(fx_cross_code='EURUSD', 
                                fx_cross_type='FxForward',
                                legs = [cross.LegDefinition(
                                    end_date = '2020-10-23')])
calc_params = cross.CalculationParams(valuation_date = '2020-09-16', 
                                      price_side = 'Ask')
response = fc.get_cross_analytics(fwd_contract, 
                                  fields = ['ValuationDate',
                                            'StartDate',
                                            'EndDate',
                                            'FxSwapsCcy1Ccy2', 
                                            'FxOutrightCcy1Ccy2'],
                                  calculation_params = calc_params)
display(response.data.df)
icon clock
10 |1500

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

Upvotes
18k 21 12 20

Hi @ty

You may consider using RDP Library(Desktop session)

Please install refinitiv.dataplatform Python package:

pip install refinitiv.dataplatform

And this is sample code:


ahs.png (29.4 KiB)
icon clock
10 |1500

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

Upvotes
5 1 1 3

Actually, this solution just gives the historical price of 1M tenor. This Bloomberg formula gives the price of a currency in a reference date, so if the consulting date is greater than the reference date, it gives the swap point interpolation value for that date. It’s real useful if I want historical MtM for an active in my wallet based on a forward curve.

Considering the other question I did on another post, I think there is no solution from Refinitiv.

icon clock
10 |1500

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

Click below to post an Idea Post Idea