Retrieve historic PAR_YLD and SWAP_SPRD through Eikon Python Data API
We want to retrieve the same data as the below Excel functions do, but through the Eikon Python API.
RHistory("AEURNFI5Y=";"PAR_YLD.Timestamp;PAR_YLD.Close";"START:"&START_DATE_ANALYSIS&" END:"&Value_Date&" INTERVAL:1D";;"NULL:NA TSREPEAT:NO CH:Fd";B12)
RHistory("AEURNFI5Y=";"SWAP_SPRD.Timestamp;SWAP_SPRD.Value";"START:"&START_DATE_ANALYSIS&" END:"&Value_Date&" INTERVAL:1D";;"NULL:NA TSREPEAT:NO CH:Fd";E12)
Using get_timeseries does not seem to work, as it does not accept PAR_YLD or SWAP_SPRD.
Best Answer
-
Hi @tr105
The Swap Spread is available under TR.SWAPSPREAD field:
ek.get_data('AEURNFI5Y=',['TR.SWAPSPREAD.date','TR.SWAPSPREAD'],parameters={'SDate':'-30D','EDate':'0D'})
However PAR_YIELD is not mapped to any TR.xxx field but you can use get_timeseries method where that data resides under CLOSE field.
ek.get_timeseries('AEURNFI5Y=','CLOSE',start_date='2019-09-01', end_date='2019-09-16')
0
Answers
-
Thanks for your answer! I suspected this, but thanks a lot for confirming.
Is this documented somewhere? I.e. how the field names from the Excel API map to the Python API / Data Item Browser.
0 -
Hi @tr105
All TR.xxx fields should be accessible both through Excel and API therefore no mapping is required. The tricky part could be with the fields that you retrieve using RHiistory() function as this is taken from another source and you cannot implement the exact field names. I think that this is a matter of time when all data items will be available using the first method. For a now you need to do a trial and error to make sure which field gives you the expected result.1 -
I carefully reviewed your response, but I'm still a bit confused. Let me clarify the situation. Due to the overriding nature of the Workspace Excel plugin, I'm unable to access the Eikon Excel plugin, and unfortunately, there doesn't seem to be a solution for this issue. My objective is to retrieve data for the PAR_YLD field for various indexes such as AEURCYP3M= and AEURCYP6M=. However, I couldn't find the PAR_YLD field on Workspace, and when I tried using the TR function, it returned an error stating "invalid field(s)."
Here's the formula I used:
=@RHistory(K7;"PAR_YLD.Timestamp;PAR_YLD.Close";"START:"&$B$4&" END:"&$B$3&" INTERVAL:1D";;"TSREPEAT:NO CH:Fd";J13)
My question to you is: Do you happen to know which field in Workspace would provide the same data as the PAR_YLD field?
Thank you for your assistance.
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 中文论坛