Trying to get forex forward curve historic, problems with NDA_RAW fields and Spot Date

Hi, I'm trying to get the EUR (for example) forward curve from yesterday and the day before.
So, in Excel, I got:
=@RHistory("EUR1M=";"NDA_RAW.Nda_date;NDA_RAW.Nda_ask;NDA_RAW.Nda_bid;NDA_RAW.Nda_days_maturity";"START:2020-10-07 END:2020-10-14 CODE:MULTI INTERVAL:1D";;"CH:IN;Fd";)
This gives me the Date, Bid, Ask and Days for Maturity for the 1M vertice. But NO Spot Date is given.
Even so, I tried:
get_data(instruments = "EUR1M=",
fields = list("NDA_RAW.Nda_date", "NDA_RAW.Nda_ask", "NDA_RAW.Nda_bid", "NDA_RAW.Nda_days_maturity"),
parameters = list("Frq" = "D",
"SDate" = format(Sys.Date() - 7, "%Y-%m-%d"),
"EDate" = format(Sys.Date() - 1, "%Y-%m-%d")))
and
get_timeseries(rics = "EUR1M=",
fields = list("NDA_RAW.Nda_date", "NDA_RAW.Nda_ask", "NDA_RAW.Nda_bid", "NDA_RAW.Nda_days_maturity"),
interval = "daily",
start_date = paste0(Sys.Date() - 7, "T00:00:00"),
end_date = paste0(Sys.Date() - 1, "T00:00:00"))
But none work.
If I want the Spot Date, in Excel:
=@TR("EUR1M=";"GV1_DATE;MATUR_DATE;DAYS_MAT";"Frq=D SDate=0 EDate=-8 CH=Fd RH=IN CODE=MULTI";G6)
Unfortunately this gives me just the Spot Date for the current cotation, NOT the yesterday or some historical date.
There are other problems like.. I want the outright and the RIC to gives me that is EUR1MV=, but this RIC don't work as well. This solution will have to be extended later to all tenors: SN, SW, 2W, 3W, 1M, 2M, ... 11M, 1Y, ... 2Y and other currencies.
What is the best way (preference in R or Python) to get those information, so I can have a table like that:
RIC | Date | Spot | Expiring | Mat_Days | Bid | Ask
EUR1M= | 2020-10-14 | 2020-10-16 | 2020-11-16 | 31 | 1.169484 | 1.169718
EUR1M= | 2020-10-13 | 2020-10-15 | 2020-11-16 | 32 | 1.169524 | 1.170026
Best Answer
-
Hi @ty
Please refer to the answer from this question.
And this is more information for your API call.
1. Eikon Data API (get_timeseries) cannot access to view other than RIC's default view.
2. GV1_DATE, MATUR_DATE and DAYS_MAT fields are from realtime database so it does not support timeseries retrieval.
You can use "Data Item Browser" to check the fields supported parameters.
0
Answers
-
Hi @ty
I think that you can still make it using the example privided in this answer and doing it for series of valuation dates. The same can be done with tenors.
for single_date in daterange(start_date, end_date):
tenor="1M"
crosscode="EURUSD"
fwd_contract = cross.Definition(fx_cross_code=crosscode,
instrument_tag=crosscode[:3]+tenor,
fx_cross_type='FxForward',
legs = [cross.LegDefinition(tenor=tenor)])
response = fc.get_cross_analytics(fwd_contract,
fields = ['InstrumentTag', 'ValuationDate','StartDate','EndDate','FxSwapsCcy1Ccy2'],
calculation_params = cross.CalculationParams(valuation_date=single_date.strftime("%Y-%m-%d")))
result.append(response.data.df)
df = pd.concat(result)
df['StartDate'] = pd.to_datetime(df['StartDate'])
df['EndDate'] = pd.to_datetime(df['EndDate'])
df['ValuationDate'] = pd.to_datetime(df['ValuationDate'])
df["Mat_days"]= df['EndDate']-df['StartDate']
df["StartDate"] = df["StartDate"].dt.strftime("%Y-%m-%d")
df["EndDate"] = df["EndDate"].dt.strftime("%Y-%m-%d")
df["ValuationDate"] = df["ValuationDate"].dt.strftime("%Y-%m-%d")
df0 -
marcin.bunkowski! I'm trying to get the most from Refinitiv APIs, but it's hard sometimes to get what I want. Do you recomend any manual to learn more? I just use get.data and get.timeseries with DIB, but you gave me this new library solution and someone show me the raw_output option for another problem; both great solutions.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 249 ETA
- 554 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 643 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 192 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛