Book Image

Getting Started with Forex Trading Using Python

By : Alex Krishtop
Book Image

Getting Started with Forex Trading Using Python

By: Alex Krishtop

Overview of this book

Algorithm-based trading is a popular choice for Python programmers due to its apparent simplicity. However, very few traders get the results they want, partly because they aren’t able to capture the complexity of the factors that influence the market. Getting Started with Forex Trading Using Python helps you understand the market and build an application that reaps desirable results. The book is a comprehensive guide to everything that is market-related: data, orders, trading venues, and risk. From the programming side, you’ll learn the general architecture of trading applications, systemic risk management, de-facto industry standards such as FIX protocol, and practical examples of using simple Python codes. You’ll gain an understanding of how to connect to data sources and brokers, implement trading logic, and perform realistic tests. Throughout the book, you’ll be encouraged to further study the intricacies of algo trading with the help of code snippets. By the end of this book, you’ll have a deep understanding of the fx market from the perspective of a professional trader. You’ll learn to retrieve market data, clean it, filter it, compress it into various formats, apply trading logic, emulate the execution of orders, and test the trading app before trading live.
Table of Contents (21 chapters)
1
Part 1: Introduction to FX Trading Strategy Development
5
Part 2: General Architecture of a Trading Application and A Detailed Study of Its Components
11
Part 3: Orders, Trading Strategies, and Their Performance
15
Part 4: Strategies, Performance Analysis, and Vistas

Preface

Forex trading has been popular for the last 20 years and its popularity is only growing. This market attracts new traders mostly because of huge potential profits and the ability to start with a relatively small amount of initial capital. However, at the same time, it is known to be one of the most dangerous markets, as according to the statistics of most regulators, more than 75% of forex traders completely lose their money.

This happens for a number of reasons. Some newcomers to forex tend to treat it the same as stock trading and try to invest in a market that doesn’t have an intrinsic upside potential. Others want to take advantage of high leverage, being inspired by multiple “get rich quick” books to hunt for legendary profits, incorrectly calculating their exposure, and then quickly losing their entire deposit.

But the main problems for all beginner forex traders are a lack of trading ideas and a lack of understanding of why the market may do this or that, when it may be reasonable to place a trade, when it may be problematic, and when to stay away from the market entirely to avoid almost inevitable losses.

Algorithmic trading can provide a solution to this problem because it’s based on rules that can be tested before any real money is put at stake. Beyond that, trading automation helps to mitigate operational risks and provides full control over execution, which is not achievable with manual order placement.

This book bridges the gap between the “easy forex” advertised by many retail brokers and the real forex market, with all its caveats and pitfalls, from the perspective of a professional algo trader. It guides the reader through all the necessary steps in developing automated trading strategies that have at least a chance of survival in this controversial market. It is not a collection of ready-made recipes for you to copy, paste, and run: the markets are constantly changing and you will have to adapt and re-adapt your strategies to them as they change.

The main goal of the book is to provide a clear understanding of what is possible, what is not, and what to realistically expect from algorithmic trading in forex. By the end of the book, you will have the essential knowledge of the forex market at the level of a professional desk trader. At the same time, you will have developed practical skills for implementing trading algorithms in Python. Although this book is only the first step for beginners into the world of forex trading, it can help you not only get started as a retail trader but also eventually find a job in this industry.