-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdeveloping-a-real-time-automated-trading-platform-with-python.html
221 lines (195 loc) · 11.1 KB
/
developing-a-real-time-automated-trading-platform-with-python.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://use.fontawesome.com/2231f865fc.js"></script>
<link rel="shortcut icon" href="https://pyvideo.org/theme/images/favicon.png">
<meta name="google-site-verification" content="cHuieLjiIIDAHKKXSPPDsnbLEz9QgVNTi23qy_mOzDU" />
<title>PyVideo.org · Developing a real-time automated trading platform with Python</title>
<link href="https://pyvideo.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="PyVideo.org Full Atom Feed" />
<link href="https://pyvideo.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="PyVideo.org Full RSS Feed" />
<link href="https://pyvideo.org/feeds/event_europython-2016.atom.xml" type="application/atom+xml" rel="alternate" title="PyVideo.org Event Atom Feed" />
<link href="https://pyvideo.org/feeds/event_europython-2016.rss.xml" type="application/rss+xml" rel="alternate" title="PyVideo.org Event RSS Feed" />
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha256-7s5uDGW3AHqw6xtJmNNtr+OBRJUlgkNJEo78P4b0yRw= sha512-nNo+yCHEyn0smMxSswnf/OnX6/KwJuZTlNZBjauKhTK0c+zT+q5JOCx0UFhXQ6rJR9jg6Es8gPuD2uZcYDLqSw=="
crossorigin="anonymous">
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="/theme/css/ie10-viewport-bug-workaround.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="/theme/css/base.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<meta property="og:site_name" content="PyVideo.org" />
<meta property="og:title" content="Developing a real-time automated trading platform with Python" />
<meta property="og:type" content="video" />
<meta property="og:url" content="https://pyvideo.org/europython-2016/developing-a-real-time-automated-trading-platform-with-python.html" />
<meta property="og:image" content="https://i.ytimg.com/vi/95ZYHH-Dhjw/maxresdefault.jpg" />
<meta property="og:image:secure_url" content="https://i.ytimg.com/vi/95ZYHH-Dhjw/maxresdefault.jpg" />
<meta property="og:image:type" content="image/jpeg" />
</head>
<body>
<a class="github" href="https://github.com/pyvideo/pyvideo/wiki/How-to-Contribute-Media">
<img style="position: absolute; top: 0; right: 0; border: 0; z-index: 2;" src="/images/contribute_to_me_right_red_aa0000.png" alt="Contribute Media" />
</a>
<div class="header notice clearfix">
A thank you to everyone who makes this possible:
<a href="/pages/thank-you-contributors.html">Read More</a>
</div>
<header id="banner" class="header clearfix">
<nav class="header__nav"><div class="container">
<ul class="nav">
<li role="presentation">
<a href="https://pyvideo.org/index.html"><i class="fa fa-fw fa-home"></i> <span>Start</span></a>
</li>
<li role="presentation" class="active">
<a href="https://pyvideo.org/events.html"><i class="fa fa-fw fa-list-ul"></i> <span>Events</span></a>
</li>
<li role="presentation">
<a href="https://pyvideo.org/tags.html"><i class="fa fa-fw fa-tags"></i> <span>Tags</span></a>
</li>
<li role="presentation">
<a href="https://pyvideo.org/speakers.html"><i class="fa fa-fw fa-users"></i> <span>Speakers</span></a>
</li>
<li role="presentation"
>
<a href="https://pyvideo.org/pages/about.html"><i class="fa fa-fw fa-info"></i> <span>About</span></a>
</li>
<li role="presentation"
style="display: none;">
<a href="https://pyvideo.org/pages/thank-you-contributors.html"><i class="fa fa-fw fa-info"></i> <span>Thank You</span></a>
</li>
<li role="presentation"
style="display: none;">
<a href="https://pyvideo.org/pages/thanks-will-and-sheila.html"><i class="fa fa-fw fa-info"></i> <span></span></a>
</li>
</ul>
</div></nav>
<div class="container">
<h3 class="text-muted header__title">
<a href="https://pyvideo.org/"><img src="/theme/images/logo.png" alt="" style="height:50px"> <span><i>Py</i>Video</span> <strong></strong></a>
</h3>
<div class="header__searchbox">
<form method="GET" action="/search.html">
<input name="q" type="search" placeholder="Search...">
</form>
</div>
</div>
</header>
<div class="container">
<section id="content" class="body">
<header>
<h2 class="entry-title">
<a href="https://pyvideo.org/europython-2016/developing-a-real-time-automated-trading-platform-with-python.html" rel="bookmark"
title="Permalink to Developing a real-time automated trading platform with Python">Developing a real-time automated trading platform with Python
</a>
</h2>
</header>
<footer class="post-info">
<time class="published" datetime="2016-08-09T00:00:00+00:00">
<i class="fa fa-calendar"></i> Tue 09 August 2016
</time>
<address class="vcard author">
By
<a class="url fn" href="https://pyvideo.org/speaker/miguel-sanchez-de-leon-peque.html">Miguel Sánchez de León Peque</a>
</address>
</footer><!-- /.post-info -->
<div class="entry-content">
<ul class="nav nav-tabs" role="tablist">
<li class="active" role="presentation"><a href="#youtube" aria-controls="youtube" role="tab" data-toggle="tab">
<i class="fa fa-fw fa-youtube"></i> YouTube
</a></li>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="youtube">
<div class="embed-responsive embed-responsive-16by9 videocontainer">
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/95ZYHH-Dhjw" title="Video for " frameborder="0" allowfullscreen></iframe>
</div>
</div>
</div> <h3>Description</h3><p>Miguel Sánchez de León Peque - Developing a real-time automated trading platform with Python
[EuroPython 2016]
[18 July 2016]
[Bilbao, Euskadi, Spain]
(<a class="reference external" href="https://ep2016.europython.eu//conference/talks/developing-a-real-time-automated-trading-platform-with-python">https://ep2016.europython.eu//conference/talks/developing-a-real-time-automated-trading-platform-with-python</a>)</p>
<p>Nowadays Python is the perfect environment for developing a real-time
automated trading tool. In this talk we will discuss the development
of: a general-purpose multiagent-system module using Pyro and ZeroMQ;
a platform, based on it, for developing automated trading strategies
using Numpy, Numba, Theano, etc.; and a GUI for visualizing real-time
market data using PyQtGraph and Qt.</p>
<hr class="docutils" />
<p>In OpenSistemas we have developed a general-purpose multi-agent system
which is written in pure Python: <em>osBrain</em>. Agents communicate with
each other using ZeroMQ, allowing the user to define different
communication patterns based on their needs.</p>
<p>Based on this multi-agent system, we have also developed a broker-
independent platform for real-time automated trading: <em>osMarkets</em>.
This platform implements specialized agents:</p>
<ul class="simple">
<li><strong>Feeder</strong> is an agent which receives real-time data from the broker.</li>
<li><strong>Router</strong> is an agent which receives data from feeders. It manages the historical data and distributes updates to all the subscribed agents in the network.</li>
<li><strong>Brain</strong> is the most common agent. It receives data from router or from other brains and processes them, sending the results to other brains or sending orders to be executed. Brains can make use of many useful packages avilable in the Python ecosystem: NumPy, SciPy, Numba, Theano...</li>
<li><strong>Trader</strong> is an agent which is designed to interact with the broker, just as the feeder, but to execute market orders.</li>
</ul>
<img alt="alternate text" class="align-center" src="http://i.imgur.com/A9vsWee.png" style="width: 100%;" />
<p>While it is still in its earliest stages, we are developing a tool for
real-time visualization of trading strategies using PyQtGraph. This
tool acts as an agent in the multi-agent system.</p>
<img alt="alternate text" class="align-center" src="http://i.imgur.com/5XS7oBQ.png" style="width: 100%;" />
</div><!-- /.entry-content -->
<div class="details-content">
<h3>Details</h3>
<ul>
<li>
Event:
<a href="https://pyvideo.org/events/europython-2016.html">EuroPython 2016</a>
</li>
<li>Language: English</li>
<li>
Media URL: <a href="https://www.youtube.com/watch?v=95ZYHH-Dhjw" rel="external">YouTube</a> </li>
<li>
Related URLs:
<ul class="related-urls">
<li><a href="http://i.imgur.com/A9vsWee.png">
http://i.imgur.com/A9vsWee.png </a></li><li><a href="http://i.imgur.com/5XS7oBQ.png">
http://i.imgur.com/5XS7oBQ.png </a></li><li><a href="https://ep2016.europython.eu//conference/talks/developing-a-real-time-automated-trading-platform-with-python">
https://ep2016.europython.eu//conference/talks/developing-a-real-time-automated-trading-platform-... </a></li> </ul>
</li>
</ul>
</div>
<a href="https://github.com/pyvideo/data/blob/main/europython-2016/videos/miguel-sanchez-de-leon-peque-developing-a-real-time-automated-trading-platform-with-python.json">
<i class="fa fa-pencil-square-o"></i> Improve this page
</a>
</section>
<footer class="footer">
<p>
©
<a href="https://github.com/pyvideo/pyvideo/blob/main/LICENSE">PyVideo.org</a> |
<a href="https://github.com/pyvideo/data/blob/main/LICENSE">pyvideo/data</a>
</p>
</footer>
<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha256-KXn5puMvxCw+dAYznun+drMdG1IFl3agK0p/pqT9KAo= sha512-2e8qq0ETcfWRI4HJBzQiA3UoyFk6tbNyG+qSaIBZLyW9Xf3sWZHN/lxe9fTh1U45DpPf07yj94KsUHHWe4Yk1A==" crossorigin="anonymous"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="/theme/js/ie10-viewport-bug-workaround.js"></script>
<script src="/theme/js/thumb.js"></script>
<script src="/theme/js/language.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-72949800-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = 'https://ssl.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</div>
</body>
</html>