![Page 1: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/1.jpg)
Interactive BrokerBacktesting
avec PyAlgoTrade
Par Charly Simon
Automne 2016
![Page 2: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/2.jpg)
Projet de fin d'étude Automne 2016
○ Ecole de Technologies Supérieure
○ Baccalaureat en Genie Logiciel
○ Parties prenantes :○ Prof. Alain April○ Mr. Thomas Maketa○ Mr. Nicolas Hubert○ Mr. Charly Simon
2 PFE - Automne 2016 - ETS
![Page 3: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/3.jpg)
Agenda ○ Planification du projet
○ Le monde de la bourse
○ Interactive Broker
○ PyAlgoTrade
○ Déroulement du projet
○ Retour sur les objectifs
3 PFE - Automne 2016 - ETS
![Page 4: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/4.jpg)
Agenda ○ Planification du projet
○ Objectifs à atteindre○ Tâches à réaliser○ Artéfacts○ Plan de projet
○ Le monde de la bourse○ Interactive Broker○ PyAlgoTrade ○ Déroulement du projet○ Retour sur les objectifs
4 PFE - Automne 2016 - ETS
![Page 5: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/5.jpg)
Objectifs à atteindre
● BackTesting● Développement de stratégies● Utilisation des données de IB
○ Travail d’équipe et personnel○ Professionnalisme
Planification du projet5
![Page 6: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/6.jpg)
(https://github.com/TMda/MyAlgoSystem)
Tâches à réaliser
○ Découverte de MyAlgoSystem○ Par Mr T. Maketa○ Contribution de WilliamQLiu
○ Recherche d’outils de BackTesting○ Création/Modification application○ Qualité des développements○ Utilisation de données “Live”
Planification du projet6
![Page 7: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/7.jpg)
Artéfacts➢ ART-GES-01 :Fiche de renseignement
➢ ART-GES-02 :Plan de projet / Proposition
➢ ART-ANA-01 :Document de spécification des exigences
➢ ART-ARC-01 :Rapport d’architecture du système
➢ ART-DEV-01 :Rapport d’installation des systèmes
➢ ART-DEV-02 :Rapport de configuration des systèmes
➢ ART-DEV-03 :Documentation du code source
➢ ART-COM-01 :Présentation de la réalisation du projet
➢ ART-COM-02 :Rapport de réalisation de projet
➢ ART-AQ-03-XX :Rapport d’étape
Planification du projet7
![Page 8: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/8.jpg)
Plan de projet
Planification du projet8
Fiche de renseignement Proposition de projet Rencontre équipe
Définition des éxigences Planification Rapport d’étapeRencontre équipe
Recherche de technologie existantes
Développements
Architecture Planification
Rapport d’étape
Rencontre équipe
Présentation oral Rapport de projet
![Page 9: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/9.jpg)
Agenda ○ Planification du projet○ Le monde de la bourse
○ Qu’est-ce que la bourse○ Les indicateur techniques○ Le problème?
○ Interactive Broker○ PyAlgoTrade ○ Déroulement du projet○ Retour sur les objectifs
9 PFE - Automne 2016 - ETS
![Page 10: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/10.jpg)
Qu’est-ce que la bourse ?
Le monde de la bourse10
![Page 11: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/11.jpg)
Qu’est-ce que la bourse ?
Le monde de la bourse11
![Page 12: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/12.jpg)
Qu’est-ce que la bourse ?
Le monde de la bourse12
Actions Obligations
![Page 13: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/13.jpg)
Les indicateur techniques
Le monde de la bourse13
![Page 14: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/14.jpg)
Le problème ?
Le monde de la bourse14
![Page 15: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/15.jpg)
Agenda ○ Planification du projet○ Le monde de la bourse○ Interactive Broker
○ La Compagnie○ Les outils d’analyse○ L’interface de programmation (API)
○ PyAlgoTrade ○ Déroulement du projet○ Retour sur les objectifs
15 PFE - Automne 2016 - ETS
![Page 16: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/16.jpg)
La Compagnie
Interactive Broker16
![Page 17: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/17.jpg)
La Compagnie
Interactive Broker17
Thomas Peterffy
Greenwich, Connecticut, États-Unis
1977
![Page 18: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/18.jpg)
Les outils d’analyse
Interactive Broker18
![Page 19: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/19.jpg)
Interactive Broker19
Les outils d’analyse
![Page 20: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/20.jpg)
L’interface de programmation (API)
Interactive Broker20
![Page 21: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/21.jpg)
L’interface de programmation (API)
Interactive Broker21
Trader WorkStation (TWS)
![Page 22: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/22.jpg)
L’interface de programmation (API)
Interactive Broker22
![Page 23: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/23.jpg)
L’interface de programmation (API)
Interactive Broker23
IbPy
(https://github.com/blampe/IbPy)
![Page 24: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/24.jpg)
Agenda ○ Planification du projet○ Le monde de la bourse○ Interactive Broker○ PyAlgoTrade
○ Une Application python○ Les fonctions de base○ La structure de l’application
○ Déroulement du projet○ Retour sur les objectifs
24 PFE - Automne 2016 - ETS
![Page 25: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/25.jpg)
Une application python
PyAlgoTrade25
Python Algorithmic Trading Library
➢ Focus sur le BackTesting➢ Paper-Trading➢ Live Trading
➢ Licence Apache License, Version 2.0
![Page 26: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/26.jpg)
Les fonctions de base
PyAlgoTrade26
➢ Code entièrement documenté➢ Event Driven (Gestion par Evenement)
➢ Scalable
![Page 27: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/27.jpg)
Les fonctions de base
➢ Prise en charge du marché, Limite, Stop et ordres StopLimit
➢ Supporte les fichier CSV de données temporelle➢ Supporte le trading de Bitcoins avec Bitstamp.➢ Prend charge les évènements Twitter➢ Indicateur Techniques pré-implémentés
PyAlgoTrade27
![Page 28: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/28.jpg)
La structure de l’application
PyAlgoTrade28
http://www.sonarqube.org/
http://sonar.ddns.net:9000/
![Page 29: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/29.jpg)
La structure de l’application
PyAlgoTrade29
http://sonar.ddns.net:9000/http://www.sonarqube.org/
![Page 30: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/30.jpg)
La structure de l’application
PythonDSM(Diagramme Structure dependency)
➢ Génération de diagramme de dépendance➢ Exportation en fichier CSV➢ Calculs Matriciels➢ Java
PyAlgoTrade30
![Page 31: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/31.jpg)
La structure de l’application
Diagramme de dépendance
PyAlgoTrade31
https://github.com/sistorm/pyalgotrade/blob/contratsbacktesting/Diagramme%20de%20dependance.xlsx
![Page 32: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/32.jpg)
La structure de l’application
PyAlgoTrade32
![Page 33: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/33.jpg)
Agenda ○ Planification du projet○ Le monde de la bourse○ Interactive Broker○ PyAlgoTrade ○ Déroulement du projet
○ Les changements dans la planification○ La gestion des options○ Le module de “BackTesting”○ Le module “Live”
○ Retour sur les objectifs
33 PFE - Automne 2016 - ETS
![Page 34: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/34.jpg)
Les changements dans la planification
Déroulement34
Fiche de renseignement Proposition de projet Rencontre équipe
Définition des éxigences Planification Rapport d’étapeRencontre équipe
Recherche de technologie existantes
Développements
Architecture Planification
Rapport d’étape
Rencontre équipe
Présentation oral Rapport de projet
![Page 35: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/35.jpg)
La gestion des options
Déroulement35
![Page 36: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/36.jpg)
Le module de “BackTesting”
Déroulement36
PyAlgoTrade
Stratégies
parser
Valeur datéeBroker
BackTesting
Données boursièresimulées
Placement ordre achat/vente
Nicolas Hubert
![Page 37: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/37.jpg)
Le module de “Live”
Déroulement
PyAlgoTrade
37
Valeur datée
IbPy
Stratégies
BrokerLive
Données boursièreréelle
Placement ordre achat/vente
Demande de placement ordre achat/vente
Charly Simon
![Page 38: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/38.jpg)
Agenda ○ Planification du projet
○ Le monde de la bourse
○ Interactive Broker
○ PyAlgoTrade
○ Déroulement du projet
○ Retour sur les objectifs
38 PFE - Automne 2016 - ETS
![Page 39: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/39.jpg)
Retour sur les objectifs
● Utilisation des données de IB● Module “BackTesting”● Module “Live”● Développement de stratégies
○ Travail d’équipe et personnel○ Professionnalisme
39 PFE - Automne 2016 - ETS
![Page 40: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/40.jpg)
Merci de votre attention
40 PFE - Automne 2016 - ETS
![Page 41: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/41.jpg)
Références○ https://www.interactivebrokers.com
○ http://gbeced.github.io/pyalgotrade
○ https://pypi.python.org/pypi/IbPy2
○ https://github.com/blampe/IbPy
○ https://www.python.org
○ http://www.sonarqube.org
○ https://www.quantstart.com/successful-algorithmic-trading-ebook
41
![Page 42: LOG792 - PFE - PROJETS D’ENRICHISSEMENT DE SIGNAUX POUR AUTOMATES DE TRADING](https://reader030.vdocuments.fr/reader030/viewer/2022020410/58f2626d1a28ab306d8b45a9/html5/thumbnails/42.jpg)
Interactive BrokerBacktesting avec PyAlgoTrade
42 PFE - Automne 2016 - ETS