Download Swap Zero Curve with Rstudio
Hi,
I'm trying to download with Rstudio through Api the Swap Zero Curve for Euribor1M with all tenors available in one day, but I can't get any value. Can someone help me to solve the error?.
curve <- get_timeseries('0#EURAMMEZ=R',"CLOSE","2020-06-16T00:00:00","2020-06-16T00:00:00","daily")
Thanks
Best Answer
-
Hi @eva_maria.vela.palomino thanks for your question - the issue here is that the get_timeseries function does not decode chain RICs. In this instance you would need to use a get_data function to retrieve the list of instruments in the chain:
data_frame = get_data("0#EURAMMEZ=R", "CF_Name"))
That will give you a list of instruments that you can then get the timeseries history for. Alternatively as you seem to only want a snapshot of todays curve - you could use the get_data call to do this in one pass as the get_data call can decode chains.
data_frame = get_data("0#EURAMMEZ=R",list( "CF_Name","CF_Last"))
... (this output is from python but its the same in R)
I hope this can help.
1
Answers
-
jason.ramchandani Thank you very much for your answer, it's just what I needed. If I want to download this same information but for a specific day, for example 28/02/2019, how should I indicate the date?.
This doesn't work for me:
data_frame <- get_data("0#EURAMMEZ=R",list( "CF_Name","CF_Last"),parameters = {'SDate':'2019-02-28','EDate':'2019-02-28'})
Where can I get a list to know the name of the field in order to add the discount factor curve of this curve to the download list?
0 -
Hi @eva_maria.vela.palomino - so as these are realtime fields - we cant get the history from get_data. The only way to get a history is to use the get_timeseries function - I have just put the first 2 instruments in here but you should be able to take the chain output and turn that into a list with a bit of manipulation ie ignore first 3 rows etc.
curve =get_timeseries(list("EURAMMEONZ=R","EURAMMETNZ=R"),fields=list("CLOSE"),start_date = "2020-02-03T00:00:00",end_date = "2020-02-03T23:59:00",interval="daily",debug=TRUE)
You can use the Data Item Browser app (type DIB into search bar) to check fields and values for any instrument we carry. In terms of the specific discount factor for the curve you are looking for - you would need to contact the content helpdesk for help there.
I hope this is of use.
1 -
This option does not work. I get the following error:
Error in 1: nrow (input_data_frame): argument of length 0
curve <- get_timeseries(list("EURAMMEONZ=R","EURAMMETNZ=R","EURAMME1WZ=R","EURAMME1MZ=R"),'CLOSE','2020-02-28','2020-02-28','daily')
0 -
I have also tried this other alternative
RIC <- list("EURAMMEONZ=R","EURAMMETNZ=R","EURAMME1WZ=R","EURAMME1MZ=R","EURAMME2MZ=R","EURAMME3MZ=R","EURAMME6MZ=R","EURAMME9MZ=R","EURAMME1YZ=R","EURAMME1Y3MZ=R","EURAMME1Y6MZ=R","EURAMME1Y9MZ=R","EURAMME2YZ=R","EURAMME2Y3MZ=R","EURAMME2Y6MZ=R","EURAMME2Y9MZ=R","EURAMME3YZ=R","EURAMME3Y3MZ=R","EURAMME3Y6MZ=R","EURAMME3Y9MZ=R"....... )
curve <- get_timeseries(RIC,'CLOSE','2020-02-28','2020-02-28','daily')
0 -
Hi @eva_maria.vela.palomino I have updated the code in R you need to provide timestamps for dates in get_timeseries.
0 -
@eva_maria.vela.palomino my bad - you need to add timestamps to get_timeseries dates in R (you don't in Python) I have altered the sample code to reflect this.
0 -
Hi jason ramchandani ,
the field for downloading the discount curve into an excel file is 'DISC_FACTR.Value' and for the maturity date it is 'MATUR_DATE'. I have searched the application as you indicated me, to see the fields available for this RIC. I have tried with the DISC_RATE option but i get NAN value.
0
Categories
- All Categories
- 6 AHS
- 39 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
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛