Data items to get historical prices using ISIN for multiple asset classes
Hi,
I'm currently trying
prices = ek.get_data(codes,
['AVAIL(TR.PRICECLOSE.date,TR.FIPRICE.date,TR.NETASSETVAL.date),
AVAIL(TR.PRICECLOSE,TR.FIPRICE,TR.NETASSETVAL)'],
{'SDate':'2020-10-01', 'EDate':'2020-10-05'})
to get historical prices for equities, bonds, etfs and funds. Above codes is an array of ISIN codes.
All I get is <NA>.
Should I use some other data items? Or if you have working solution, that would be even better.
Thanks in advance.
BR, J
Best Answer
-
@""juha.pomell, For funds not traded in exchanges (i.e. not ETFs) there is no closing price as it is not traded in exchanges. Thus you need to identify them and treat them separately. Most funds reports daily NAV, but few old style funds may report Bid/Offer prices and may only reporting weekly or monthly prices. Below is a sample code for getting historical price of a mutual fund (in funds' denominated currency):
Fund_NAV = ek.get_data('LP60000012',['TR.FundNAV.Date', 'TR.FundNAV'], {'SDate':'2019-01-01', 'EDate':'2019-05-10',\
'Curn':'Native'})Notes, Jason's symbology conversion may not work directly from ISIN to RIC for funds. If failed, you can try to firestly convert ISIN to LIPPERID, and then use LIPPERID to convert to RIC (or actually just Prefix the LIPPERID with "LP")
0
Answers
-
@juha.pomell I couldn't find the field 'TR.FIPRICE' and the query was incorrectly formed - but try this:
codes = ['VOD.L','TSLA.O','LHAG.DE']
prices,err = ek.get_data(codes,['TR.PriceClose.date','TR.NETASSETVAL.date','TR.PRICECLOSE','TR.NETASSETVAL'],{'SDate':'2020-10-01', 'EDate':'2020-10-05'})
pricesThe net asset value fields are empty as these would apply to funds in your list - i have only put in equities. You can use the Data Item Browser tool (type DIB into eikon search bar) to find fields available. I hope this can help.
0 -
HI Jason,
thanks for your reply.
Equities and using ric codes works nice. Problem is that I have list/array of ISIN codes. I can't make them work currently.
Any ideas to make it work?
J
0 -
The problem in your query is the field TR.FIPRICE.date.
If you open Data Item Browser, you will see that this field is not a time series field. If you remove it, the output will work:
>>> df, err = ek.get_data(['IBM', 'LP40000259'], ['AVAIL(TR.PRICECLOSE, TR.NETASSETVAL)', 'AVAIL(TR.PRICECLOSE.date, TR.NETASSETVAL.date)'], {'SDate':'2020-10-01', 'EDate':'2020-10-05'})
>>> df
Instrument AVAIL(TR.PRICECLOSE, TR.NETASSETVAL) AVAIL(TR.PRICECLOSE.DATE, TR.NETASSETVAL.date)
0 IBM 121.09 2020-10-01T00:00:00Z
1 IBM 120.57 2020-10-02T00:00:00Z
2 IBM 122.01 2020-10-05T00:00:00Z
3 LP40000259 33.36 2020-10-01T00:00:00Z
4 LP40000259 33.12 2020-10-02T00:00:00Z
5 LP40000259 33.67 2020-10-05T00:00:00Z0 -
Hi,
Fantastic!
I'll give it try.
Many thanks guys.
BR, Juha
0 -
@juha.pomell Please use our symbology conversion API :
df1 = ek.get_symbology(['GB00BH4HKS39'],from_symbol_type='ISIN',to_symbol_type='RIC')
df1I hope this can help
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
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛