Contents

Preface

Acknowledgments

Chapter 1 Potential Profit as a Measure of Market Performance

Profit and Potential Profit

Price Flow and C++

Why C++?

Why Skip Date and Time Classes?

Vector for Price Flow

Classes for Prices

Procedural Programming

Object-Based and Generic Programming

Example Test1.cpp

Object-Oriented Programming

Exception Safety

Production of Concrete Objects

Pardo's Potential Profit

Simple Algorithm for a True Reverse System

The Program Computing Pardo's Potential Profit

Conclusions

Chapter 2 Potential Profit and Transaction Costs

What Is a Trading Strategy?

Properties of Potential Profit Strategy

“Do Nothing” Strategy

Property 1

Property 2

Property 3

Property 4

Property 5

Property 6

Transaction Costs

Commissions

Slippage

The Bid/Asked Spread

The Total Transaction Cost

Transaction Costs and C++

Profit-and-Loss Function

The Main Equations

C++ Implementation

Example Test2.cpp

Conclusions

Chapter 3 R- and L-Algorithms for Maximum Profit Strategy

S-Function and S-Matrix

Definition 3.1: S-Function

Definition 3.2: S-Matrix

S-Interval and Its Boundaries

Definition 3.3: S-Interval

Definition 3.4: S-Interval with the Right-most Boundary

Definition 3.5: S-Interval with the Left-most Boundary

Definition 3.6: S-Interval with the Left-most and Right-most Boundaries

The Best Buying and Selling Points on the S-Interval

Polarity of S-Intervals

Definition 3.7: Right Polarity

Theorem 3.1

Definition 3.8: Left Polarity

Theorem 3.2

R-Algorithm

L-Algorithm

C++ Implementation

Coding ...

Get Modeling Maximum Trading Profits with C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.