Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Getting Started with Forex Trading Using Python

You're reading from  Getting Started with Forex Trading Using Python

Product type Book
Published in Mar 2023
Publisher Packt
ISBN-13 9781804616857
Pages 384 pages
Edition 1st Edition
Languages
Author (1):
Alex Krishtop Alex Krishtop
Profile icon Alex Krishtop

Table of Contents (21) Chapters

Preface Part 1: Introduction to FX Trading Strategy Development
Chapter 1: Developing Trading Strategies – Why They Are Different Chapter 2: Using Python for Trading Strategies Chapter 3: FX Market Overview from a Developer's Standpoint Part 2: General Architecture of a Trading Application and A Detailed Study of Its Components
Chapter 4: Trading Application: What’s Inside? Chapter 5: Retrieving and Handling Market Data with Python Chapter 6: Basics of Fundamental Analysis and Its Possible Use in FX Trading Chapter 7: Technical Analysis and Its Implementation in Python Chapter 8: Data Visualization in FX Trading with Python Part 3: Orders, Trading Strategies, and Their Performance
Chapter 9: Trading Strategies and Their Core Elements Chapter 10: Types of Orders and Their Simulation in Python Chapter 11: Backtesting and Theoretical Performance Part 4: Strategies, Performance Analysis, and Vistas
Chapter 12: Sample Strategy – Trend-Following Chapter 13: To Trade or Not to Trade – Performance Analysis Chapter 14: Where to Go Now? Index Other Books You May Enjoy

Money management and multiple entries

To give you an idea about what money management is and how it may affect strategy performance, let me tell you about probably the most famous – or infamous – kind of money management technique, known as martingale.

The origin of martingale is in gambling. Imagine the simplest gambling game of a coin toss. You toss the coin and if it comes up heads, you win; if it comes up tails, you lose. We can use 1 for wins and -1 for losses and the series of tosses can be represented by a sequence as follows:

S = {1, -1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, ...}

If you put at stake an equal amount of money each time you toss the coin, we can multiply the sequence by that amount and write it like so:

S1 = {b, -b, -b, b, -b, b, b, b, -b, -b, b, -b, ...}

Here, b refers to the size of the bet. Obviously, your total win in the game is the sum of the entire series. In an idealistic model, the results of each toss are independent of each...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}