Retrieve EUR IRS in Python
Hi Dev team,
I am trying to retrieve EURAB3EIRS= using codebook. Using syntax below, I am only getting n/a as output
df, err = ek.get_data('EURAB3EIRS=',['GV4_TEXT','MATUR_DATE','PRIMACT_1','SEC_ACT_1'])
display(df)
Note that this syntax works for 0#EURABSEZ=R
Best Answer
-
Hi @lian.fernandez ,
Always with refinitv.data lib but another way using chain API and rd.get_data function :
import refinitiv.data as rd
session = rd.session.desktop.Definition(app_key=APP_KEY).get_session()
session.open()
rd.session.set_default(session)
EURAB3EIRS_chain = rd.content.pricing.chain.Definition(name='EURAB3EIRS=').get_stream()
EURAB3EIRS_chain.open(False)
print('EURAB3EIRS= constituents :', EURAB3EIRS_chain.constituents)
euro = rd.get_data(universe=EURAB3EIRS_chain.constituents, fields=['GV4_TEXT', 'MATUR_DATE', 'PRIMACT_1', 'SEC_ACT_1'])
print(euro)outputs:
EURAB3EIRS= constituents : ['EURAB3E6M=', 'EURAB3E9M=', 'EURAB3E1Y=', 'EURAB3E18M=', 'EURAB3E2Y=', 'EURAB3E3Y=', 'EURAB3E4Y=', 'EURAB3E5Y=', 'EURAB3E6Y=', 'EURAB3E7Y=', 'EURAB3E8Y=', 'EURAB3E9Y=', 'EURAB3E10Y=', 'EURAB3E11Y=', 'EURAB3E12Y=', 'EURAB3E13Y=', 'EURAB3E14Y=', 'EURAB3E15Y=', 'EURAB3E16Y=', 'EURAB3E17Y=', 'EURAB3E18Y=', 'EURAB3E19Y=', 'EURAB3E20Y=', 'EURAB3E25Y=', 'EURAB3E30Y=', 'EURAB3E40Y=', 'EURAB3E50Y=']
Instrument GV4_TEXT MATUR_DATE PRIMACT_1 SEC_ACT_1
0 EURAB3E6M= 6M 2023-06-28 2.673 2.703
1 EURAB3E9M= 9M 2023-09-28 3.019 3.049
2 EURAB3E1Y= 1Y 2023-12-28 3.188 3.238
3 EURAB3E18M= 18M 2024-06-28 3.324 3.334
4 EURAB3E2Y= 2Y 2024-12-30 3.318 3.324
5 EURAB3E3Y= 3Y 2025-12-29 3.192 3.232
6 EURAB3E4Y= 4Y 2026-12-28 3.079 3.12
7 EURAB3E5Y= 5Y 2027-12-28 3.04 3.081
8 EURAB3E6Y= 6Y 2028-12-28 3.014 3.055
9 EURAB3E7Y= 7Y 2029-12-28 2.997 3.038
10 EURAB3E8Y= 8Y 2030-12-30 2.993 3.034
11 EURAB3E9Y= 9Y 2031-12-29 3.0 3.041
12 EURAB3E10Y= 10Y 2032-12-28 3.014 3.055
13 EURAB3E11Y= 11Y 2033-12-28 3.027 3.068
14 EURAB3E12Y= 12Y 2034-12-28 3.033 3.074
15 EURAB3E13Y= 13Y 2035-12-28 3.062 3.072
16 EURAB3E14Y= 14Y 2036-12-29 3.044 3.054
17 EURAB3E15Y= 15Y 2037-12-28 3.007 3.048
18 EURAB3E16Y= 16Y 2038-12-28 2.87 2.88
19 EURAB3E17Y= 17Y 2039-12-28 2.987 2.997
20 EURAB3E18Y= 18Y 2040-12-28 2.499 2.509
21 EURAB3E19Y= 19Y 2041-12-30 2.901 2.941
22 EURAB3E20Y= 20Y 2042-12-29 2.833 2.874
23 EURAB3E25Y= 25Y 2047-12-30 2.633 2.674
24 EURAB3E30Y= 30Y 2052-12-30 2.464 2.505
25 EURAB3E40Y= 40Y 2062-12-28 2.276 2.31
26 EURAB3E50Y= 50Y 2072-12-28 2.04 2.0811
Answers
-
Hi @lian.fernandez ,
My understanding is that 'EURAB3EIRS=' is a swap and '0#EURABSEZ=R' is a chain of RICs made by Refinitiv showing instruments that (when put together) showcases insights that cannot be seen on an individual RIC basis (e.g.: Yield Curve). These are two different types of instruments, so their fields will also be different. Please use the DIB to find the fields relevent to any one instrument.
Looking at EURAB3EIRS=, I can see that it constitutes of several other RICs:I looked into the fields you were after for these constituents:
df1 = rd.get_data('EURAB3EIRS=',[f'LONGLINK{i}' for i in range(4, 8)])
df2 = rd.get_data(
df1.loc[0].to_list(),
['GV4_TEXT','MATUR_DATE','PRIMACT_1','SEC_ACT_1'])
Does this result in the data you were after?
1
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 中文论坛