Book Image

Mastering Python for Finance

Book Image

Mastering Python for Finance

Overview of this book

Table of Contents (17 chapters)
Mastering Python for Finance
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


In this chapter, we were introduced to the evolution of trading from the pits to the electronic trading platform, and learned how algorithmic trading came about. We looked at some brokers offering API access to their trading service offering. To help us get started on our journey in developing an algorithmic trading system, we used the TWS of IB and the IbPy Python module.

In our first trading program, we successfully sent an order to our broker through the TWS API using a demonstration account. Next, we developed a simple algorithmic trading system. We started by requesting the market data and account updates from the server. With the captured real-time information, we implemented a mean-reverting algorithm to trade the markets. Since this trading system uses only one indicator, more work would be required to build a robust, reliable, and profitable trading system.

We also discussed currency trading with the OANDA REST API with the help of the oandapy Python module. After setting...