Algo Trading: REST API & Python Wrapper
Tick Data, Historical Data, Real-Time Data, Backtesting, Orders
Dr. Yves J. Hilpisch | The Python Quants GmbH
Online, 04. April 2018
(short link to this Gist: https://goo.gl/oS1ZYw)
- http://tpq.io
- http://hilpisch.com
- http://twitter.com/dyjh
- http://pyalgo.tpq.io
- http://certificate.tpq.io
Trading forex/CFDs on margin carries a high level of risk and may not be suitable for all investors as you could sustain losses in excess of deposits. Leverage can work against you. Due to the certain restrictions imposed by the local law and regulation, German resident retail client(s) could sustain a total loss of deposited funds but are not subject to subsequent payment obligations beyond the deposited funds. Be aware and fully understand all risks associated with the market and trading. Prior to trading any products, carefully consider your financial situation and experience level. Any opinions, news, research, analyses, prices, or other information is provided as general market commentary, and does not constitute investment advice. FXCM will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information.
You find the slides under http://hilpisch.com/fxcm_algo_trading.pdf
You find HTML versions of the Jupyter notebooks under:
The webinar covers the following topics:
Introduction
- The Python Quants Group
- Data-Driven Finance
- AI-First Finance
Live Demo
- Historical Tick Data
- Historical Candle Data
- Visualization
- Backtesting of AI-Based Strategies
- Streaming Data
- Order Placement
If you have either Miniconda or Anaconda already installed, there is no need to install anything new.
The code that follows uses Python 3.6. For example, download and install Miniconda 3.6 from https://conda.io/miniconda.html if you do not have conda
already installed.
In any case, for Linux/Mac you should execute the following lines on the shell to create a new environment with the needed packages:
conda create -n fxcm python=3.6
source activate fxcm
conda install numpy pandas matplotlib statsmodels
pip install plotly cufflinks
pip install fxcmpy
conda install ipython jupyter
jupyter notebook
On Windows, execute the following lines on the command prompt:
conda create -n fxcm python=3.6
activate fxcm
conda install numpy pandas matplotlib statsmodels
pip install plotly cufflinks
pip install fxcmpy
pip install win-unicode-console
set PYTHONIOENCODING=UTF-8
conda install ipython jupyter
jupyter notebook
Read more about the management of environments under https://conda.io/docs/using/envs.html
The following book is recommended for Python data analysis: Python Data Science Handbook, O'Reilly
Regarding accounts, bid-ask spreads, etc. you need to reach out to FXCM directly.