Skip to Content
Python for Algorithmic Trading
book

Python for Algorithmic Trading

by Yves Hilpisch
November 2020
Intermediate to advanced
378 pages
8h 47m
English
O'Reilly Media, Inc.
Content preview from Python for Algorithmic Trading

Chapter 7. Working with Real-Time Data and Sockets

If you want to find the secrets of the universe, think in terms of energy, frequency, and vibration.

Nikola Tesla

Developing trading ideas and backtesting them is a rather asynchronous and non-critical process during which there are multiple steps that might or might not be repeated, during which no capital is at stake, and during which performance and speed are not the most important requirements. Turning to the markets to deploy a trading strategy changes the rules considerably. Data arrives in real time and usually in massive amounts, making a real-time processing of the data and the real-time decision making based on the streaming data a necessity. This chapter is about working with real-time data for which sockets are in general the technological tool of choice. In this context, here are a few words on central technical terms:

Network socket

Endpoint of a connection in a computer network, also simply socket for short.

Socket address

Combination of an Internet Protocol (IP) address and a port number.

Socket protocol

A protocol defining and handling the socket communication, like the Transfer Control Protocol (TCP).

Socket pair

Combination of a local and a remote socket that communicate with each other.

Socket API

The application programming interface allowing for the controlling of sockets and their communication.

This chapter focuses on the use of ZeroMQ as a lightweight, fast, and scalable socket programming ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Hands-On Algorithmic Trading with Python

Hands-On Algorithmic Trading with Python

Deepak K. Kanungo

Publisher Resources

ISBN: 9781492053347Errata Page