What is the formula to retreive daily VWAP data using Python?
What is the formula to retreive daily VWAP data using Python? (For example for 7203.T)
Do I use eikon.get_data or eikon.get_timeseries?
Please provide me with a sample formula to retreive historical VWAP (Ex for 20days).
0
Best Answer
-
TimeSeries provides following daily data:
>>> ek.get_timeseries('7203.T')
7203.T HIGH CLOSE LOW OPEN VOLUME COUNT
Date
2017-06-29 5934.0 5910.0 5886.0 5930.0 6462300.0 -1.0
2017-06-30 5906.0 5893.0 5867.0 5896.0 7372400.0 -1.0
2017-07-03 5996.0 5950.0 5887.0 5893.0 11484000.0 -1.0
... ... ... ... ... ... ...
2017-10-04 6802.0 6730.0 6719.0 6800.0 6968500.0 -1.0
2017-10-05 6805.0 6784.0 6773.0 6790.0 6378400.0 -1.0
2017-10-06 6890.0 6889.0 6810.0 6815.0 10004000.0 10995.0
[69 rows x 6 columns]
>>>In your case, you should use get_data.
To identify which field to request, you can search with the Data Item Browser (link available in the Eikon API Proxy window), type the RIC (ex:7203.T) then key word (ex:VWAP) :
TR.TSVWAP field seems to match with your needs :
>>> vwap,err=ek.get_data('7203.T', ['TR.TSVWAP','TR.TSVWAP.Date'], parameters={'SDate':'20170906','EDate':'20171005'})
>>> vwap
Instrument VWAP Date
0 7203.T 6168.9320 2017-09-06T00:00:00Z
1 7203.T 6235.1348 2017-09-07T00:00:00Z
2 7203.T 6257.3599 2017-09-08T00:00:00Z
3 7203.T 6294.5292 2017-09-11T00:00:00Z
4 7203.T 6368.8700 2017-09-12T00:00:00Z
5 7203.T 6410.2355 2017-09-13T00:00:00Z
6 7203.T 6427.6915 2017-09-14T00:00:00Z
7 7203.T 6469.6285 2017-09-15T00:00:00Z
8 7203.T 6668.0025 2017-09-19T00:00:00Z
9 7203.T 6701.9567 2017-09-20T00:00:00Z
10 7203.T 6763.2350 2017-09-21T00:00:00Z
11 7203.T 6756.1145 2017-09-22T00:00:00Z
12 7203.T 6779.5475 2017-09-25T00:00:00Z
13 7203.T 6810.9750 2017-09-26T00:00:00Z
14 7203.T 6753.8888 2017-09-27T00:00:00Z
15 7203.T 6760.6621 2017-09-28T00:00:00Z
16 7203.T 6708.2255 2017-09-29T00:00:00Z
17 7203.T 6691.0715 2017-10-02T00:00:00Z
18 7203.T 6738.9075 2017-10-03T00:00:00Z
19 7203.T 6759.8712 2017-10-04T00:00:00Z
20 7203.T 6789.5579 2017-10-05T00:00:00Z
>>>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 中文论坛