From VBA to Python

Years ago I programmed some macros in Eikon that capture and save in a folder on his PC hard disk the graphs of about 200 RICs (stocks, indices, currencies, etc.). They are graphs that have studies, annotations, trend lines, Fibonacci, and that are generated in daily and weekly format. The macros convert all the graphics in his Eikon quotelists one by one to jpg format, and are the ones that are saved to a folder daily. Now I have Workspace, and I have been told that WS doesn't suppor VBA, but Python.How can I convert my VBA macros into Python? I would really appreciate if somebody could guide me, as I don't know Pyhton....
Best Answer
-
For such a workflow, I would advise using the Refinitiv Data Library for Python in CodeBook. I’d advise starting with the articles “Summary of Common LSEG Refinitiv APIs” and “WEBINAR Beginners' Guide to Python and the London Stock Exchange Refinitiv Data Library”. You might then be interested in building an app using functions shown in the “13. User Interface Library” folder:
You can plot graphs with Plotly in CodeBook and you can even build Voila apps.
0
Answers
-
Hi @jurraca
I would suggest you review the pages under the Upgrading to Workspace within the Developer Portal.
0 -
hi @nick.zincone . I did, but honestly, the solution that I have been provided with is reprogramming my VBA macros into Python. And the issue is that I don't know anything about Python.
It would be great if somebody could illustrate and guide me: I could check my VBA macros and how to adopt them to Python with this person that would be willing to help me.
Thank you so much if someone here could help.
Juan
0 -
Thanks for your answer, @jonathan.legrand. I really appreciate it. But honestly, I haven't been able to find out how to save a chart as image from Workspace in another folder, I don't know where it can be or how I can do it (and believe me I have tried hard). Any idea/input/suggestion?
0 -
Hi @jurraca, I understand, it can be overwhelming switing to a new coding environment.
As an example, I thought it best to use a piece I wrote in the __Examples__ folder in CodeBook, specifically "__Examples__/03. Quantitative Analytics/03.08. Curves/Cross_Currency_Curves.ipynb".
In this example, if you run all but the last cell (that closes your session which you need opened to create a curve), you can choose the currency pair you'd like to choose a curve for, along with details you can choose in drop downs:If you place your cursor anywhere in the red box I drew in the screenshot above, a menu appears at the top right. You can choose there to download the image as an image if you choose to:
Note that this is only one of many ways to get an image out of your code, you can programmatically ask for images to be outputted using, for e.g., Matplotlib.
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 613 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
- 248 ETA
- 552 WebSocket API
- 37 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
- 632 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
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 85 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛