|Last update||January 2019|
Python is currently one of the most popular programming languages and is also considered a great language to start programming with.
There are a great number of Python beginners guides online, but I would like to save you a little time by helping you create a designated Eikon development environment. It will consist of:
Anaconda from Continuum Analytics is universally praised by the Python community as possibly the simplest way to install libraries for numerical operations.
The 'conda' command is a package installer, so you can add the most popular packages with it easily, however, you can see that pip, wheel and setuptools are also installed.
Let's install our first package: jupyter notebook, that allows creating and running interactive notebooks inside a browser:
Note, that we installed jupyter to the default environment. It itself supports multiple environments, and you can easily switch it back and forth. But keeping your project specific packages is vital. If you are just starting, you will play with the language a lot and it is essential to be able to undo the effects of your experiments. For this purpose, we are going to create a separate development environment.
Now let's activate our environment and list the packages:
(refinitiv) C:\Users\zhenyakovalyov>conda list
# packages in environment at C:\Users\zhenyakovalyov\Miniconda3\envs\refinitiv:
pip 9.0.1 py36_1
python 3.6.1 0
setuptools 27.2.0 py36_1
vs2015_runtime 14.0.25123 0
wheel 0.29.0 py36_0
et's install the packages that we will require for our work in this environment: numpy, pandas and matplotlib.
Once we are done working here, we can easily deactivate the environment with deactivate refinitivcommand.
I use Visual Code for anything these days (including this guide), however, you can always check out its free alternatives like Sublime Text or Atom, or use a designated python integrated development environment like PyCharm.
Depending on your Eikon version and your Operating System (Windows or Mac OS) you may need to run the Eikon Data API Proxy or just Eikon. Please refer to the Quick Start guide for Windows if you use Windows with TR Eikon 4.0.36 (or higher). Refers to the Quick Start guide for Mac OS if you use Mac OS or a version of TR Eikon prior to 4.0.36.
Ok, you are all done!
Now, let's practice some command line commands.
Let's run Eikon:
Now, Let's go back to our notebook. In the first cell, input the following commands:
import eikon as tr
import pandas as pd
ratings_data, err = tr.get_data(instruments=['0#.SPX'],
The result should look like this:
|Instrument||Company Common Name||Issuer Rating||Issuer Rating|
|4||ATVI.OQ||Activision Blizzard Inc||BBB-||BB-|