problems with get_data() and get_timeseries()

I am trying to get historical prices data of a germany government bond with the get_timeseries() method but I am not able to get the prices. I can only get CLOSE, OPEN, etc. The values of these fields are between -1 and 1, and the bond prices quote around 100 (so nothing about prices). Is there any posibility to get these prices from Python? This is the line of code I'm using (for getting all the posible files):
data = ek.get_timeseries('DE110242=', start_date=start_date, end_date=end_date)
and i need a DataFrame with two columns: dates and the close mid prices of this bond.
Additionally, i try to get this info with the method ek.get_data() but in this form, i dont obtain the field 'Date' and i can't differenciate the bond prices for differents trading calendars, and with the method get_timeseries() i can do it. I need the answer as soon as possible, please.
Thank you so much.
Answers
-
Hello @dmp_232,
The Open, high, low, close data points in the timeseries output are the yield and not the price for this fixed income instrument.
If you are interested in using the get_data method, you can get the date using the .date modifier for the field. For example:
You can view the list of all the fields and available points for that field in the Data Item Browser (DIB) in the Workspace.
0 -
Hello @Gurpreet, thanks so much for your answer.
It's not that I'm interested in using the get_data method. The thing is that I need a history of the last 252 mid quotes of the bond prices at market close from a specific date to calculate VaR metrics.
In the first instance I had set up an example in Excel, where using the Excel API to Reuters, I performed a read operation to extract the historical series of these prices and calculate these VaR metrics.
My goal is to automate this entire process with Python, and I see that the Excel and Python APIs to Reuters have nothing to do with each other, because if I use the Python get_timeseries() method, which is the equivalent of extracting historical series from the Excel API, I can't extract the bond prices, only the yield (as you mentioned before in your answer). And through the get_data() method I understand that I could extract a history of this data with the example you have shown me.
Finally, the only doubt I have about this is whether there is a date field for the TR.MIDPRICE field, since the field you show in your answer is the one associated with the ask price, and also, these bond prices are the days on which it is quoted on the market, that is, it shows you the last 252 quotes, and not the last 252 data without taking into account holidays in between, and therefore repeating quote prices in case of holidays.If you could give me an answer as soon as possible to each of the questions I propose, I would appreciate it.
Thank you very much.
0 -
Thanks so much for your answer.
It's not that I'm interested in using the get_data method. The thing is that I need a history of the last 252 mid quotes of the bond prices at market close from a specific date to calculate VaR metrics.
In the first instance I had set up an example in Excel, where using the Excel API to Reuters, I performed a read operation to extract the historical series of these prices and calculate these VaR metrics.
My goal is to automate this entire process with Python, and I see that the Excel and Python APIs to Reuters have nothing to do with each other, because if I use the Python get_timeseries() method, which is the equivalent of extracting historical series from the Excel API, I can't extract the bond prices, only the yield (as you mentioned before in your answer). And through the get_data() method I understand that I could extract a history of this data with the example you have shown me.
Finally, the only doubt I have about this is whether there is a date field for the TR.MIDPRICE field, since the field you show in your answer is the one associated with the ask price, and also, these bond prices are the days on which it is quoted on the market, that is, it shows you the last 252 quotes, and not the last 252 data without taking into account holidays in between, and therefore repeating quote prices in case of holidays.If you could give me an answer as soon as possible to each of the questions I propose, I would appreciate it.
Thank you very much.
0 -
Thank you for reaching out to us.
ek.get_timeseries can only retreive the default view of historical real-time data. For DE110242=, I assume that the default view could be yield. To get other avaialble historical real-time data, you need to use the get_history method in the LSEG Data Libary for Python.
ld.get_history(universe=["DE110242="],interval="1D", start="2024-11-01", end="2024-12-03")
The output contains the following fields.
Index(['BID', 'ASK', 'B_YLD_1', 'A_YLD_1', 'ASP6M', 'HIGH_1', 'OPEN_PRC',
'LOW_1', 'HIGH_YLD', 'LOW_YLD', 'MID_PRICE', 'ACCR_INT', 'ISMA_A_YLD',
'MID_YLD_1', 'CONVEXITY', 'MOD_DURTN', 'ASK_HIGH_1', 'ASK_LOW_1',
'OPEN_ASK', 'OPEN_YLD', 'ISMA_B_YLD', 'AST_SWPSPD', 'BPV', 'BMK_SPD',
'SWAP_SPRDB', 'ASP3M', 'OAS_BID', 'ZSPREAD', 'INT_BASIS', 'INT_CDS',
'TRTN_PRICE', 'OIS_SPREAD', 'TED_SPREAD', 'ASP1M', 'REDEM_DATE',
'DIRTY_PRC', 'CLEAN_PRC'],
dtype='object', name='DE110242=')The examples are on GitHub.
0 -
Hello @Gurpreet, thanks so much for your answer.
It's not that I'm interested in using the get_data method. The thing is that I need a history of the last 252 mid quotes of the bond prices at market close from a specific date to calculate VaR metrics.
In the first instance I had set up an example in Excel, where using the Excel API to Reuters, I performed a read operation to extract the historical series of these prices and calculate these VaR metrics.
My goal is to automate this entire process with Python, and I see that the Excel and Python APIs to Reuters have nothing to do with each other, because if I use the Python get_timeseries() method, which is the equivalent of extracting historical series from the Excel API, I can't extract the bond prices, only the yield (as you mentioned before in your answer). And through the get_data() method I understand that I could extract a history of this data with the example you have shown me.
Finally, the only doubt I have about this is whether there is a date field for the TR.MIDPRICE field, since the field you show in your answer is the one associated with the ask price, and also, these bond prices are the days on which it is quoted on the market, that is, it shows you the last 252 quotes, and not the last 252 data without taking into account holidays in between, and therefore repeating quote prices in case of holidays.If you could give me an answer as soon as possible to each of the questions I propose, I would appreciate it.
Thank you very much.
0 -
Hello @Gurpreet, thanks so much for your answer.
It's not that I'm interested in using the get_data method. The thing is that I need a history of the last 252 mid quotes of the bond prices at market close from a specific date to calculate VaR metrics.
In the first instance I had set up an example in Excel, where using the Excel API to Reuters, I performed a read operation to extract the historical series of these prices and calculate these VaR metrics.
My goal is to automate this entire process with Python, and I see that the Excel and Python APIs to Reuters have nothing to do with each other, because if I use the Python get_timeseries() method, which is the equivalent of extracting historical series from the Excel API, I can't extract the bond prices, only the yield (as you mentioned before in your answer). And through the get_data() method I understand that I could extract a history of this data with the example you have shown me.
Finally, the only doubt I have about this is whether there is a date field for the TR.MIDPRICE field, since the field you show in your answer is the one associated with the ask price, and also, these bond prices are the days on which it is quoted on the market, that is, it shows you the last 252 quotes, and not the last 252 data without taking into account holidays in between, and therefore repeating quote prices in case of holidays.If you could give me an answer as soon as possible to each of the questions I propose, I would appreciate it.
Thank you very much.
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
- 685 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
- 252 ETA
- 556 WebSocket API
- 38 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
- 652 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
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 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 中文论坛