Skip to content

Instantly share code, notes, and snippets.

@yhilpisch
Created April 4, 2018 09:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yhilpisch/e040b66c80ee3755c7473ed9f8ce64f8 to your computer and use it in GitHub Desktop.
Save yhilpisch/e040b66c80ee3755c7473ed9f8ce64f8 to your computer and use it in GitHub Desktop.

FXCM Webinar

Algo Trading: REST API & Python Wrapper

Python & Historical Tick Data

Dr. Yves J. Hilpisch | The Python Quants GmbH

Online, 04. April 2018

(short link to this Gist: TBA)

TPQ Resources

FXCM Resources

Risk Disclaimer

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.

Slides

You find the slides under http://hilpisch.com/fxcm_algo_trading.pdf

Agenda

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

Data

You find the historical EOD data set used under http://hilpisch.com/eurusd.csv (as provided by FXCM Forex Capital Markets Ltd.).

You find further information about the historical tick data source under https://github.com/FXCMAPI/FXCMTickData (as provided by FXCM Forex Capital Markets Ltd.).

Python

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

Books

The following book is recommended for Python data analysis: Python Data Science Handbook, O'Reilly

Display the source blob
Display the rendered blob
Raw
Sorry, this is too big to display.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment