Preface xi
Acknowledgments xiii
Potential Profit as a Measure of Market Performance 1
Profit and Potential Profit 1
Price Flow and C++ 4
Why C++? 4
Why Skip Date and Time Classes? 4
Vector for Price Flow 5
Classes for Prices 5
Procedural Programming 7
Object-Based and Generic Programming 8
Example Test1.cpp 11
Object-Oriented Programming 12
Exception Safety 16
Production of Concrete Objects 16
Pardo's Potential Profit 17
Simple Algorithm for a True Reverse System 17
The Program Computing Pardo's Potential Profit 18
Conclusions 20
Potential Profit and Transaction Costs 21
What Is a Trading Strategy? 21
Properties of Potential Profit Strategy 24
"Do Nothing" Strategy 24
Property 1 24
Property 2 24
Property 3 24
Property 4 25
Property 5 27
Property 6 28
Transaction Costs 28
Commissions 28
Slippage 28
The Bid/Asked Spread 30
The Total Transaction Cost 31
Transaction Costs and C++ 32
Profit-and-Loss Function 34
The Main Equations 34
C++ Implementation 35
Example Test2.cpp 36
Conclusions 38
R- and L-Algorithms for Maximum Profit Strategy 39
S-Function and S-Matrix 39
S-Function 39
S-Matrix 40
S-Interval and Its Boundaries 40
S-Interval 40
S-Interval with the Right-most Boundary 40
S-Interval with the Left-most Boundary 40
S-Interval with the Left-most and Right-most Boundaries 40
The Best Buying and Selling Points on the S-Interval 41
Polarity of S-Intervals 41
Right Polarity 41
Theorem 3.1 41
Left Polarity 42
Theorem 3.2 42
R-Algorithm 42
L-Algorithm 44
C++ Implementation 44
Coding The R- and L-Algorithms 44
Example Test3.cpp 48
C++ Program Evaluating Potential Profit 51
Conclusions 54
Money Management and Discrete Nature of Trading 55
Denominations 55
Induction and Trading Account Size 58
Growth Function and Optimal B 59
Discrete Nature of Trading 62
Evolution of Account with Constant A[subscript w], A[subscript l], M, b 62
Evolution of Account with Nonconstant A[subscript w], A[subscript l] 71
Conclusions 79
Money Management for Potential Profit Strategy 81
The Best Allocation Fraction for Potential Profit Strategy 81
Self-Financing Restriction 83
Minimal A[subscript 0] 83
Actions and Positions Test4.cpp 87
The First and Second P&L Reserves 89
Rules for Offsetting Positions 92
Classes Trade and Trades 92
Class Position 95
Using Position and Trades Test5.cpp 100
Conclusions 104
Best to Better 103
Algorithm for the First Profit-and-Loss Reserve Strategy 105
Algorithm for the Second P&L Reserve Strategy 109
Program Applying Three Algorithms 118
Conclusions 122
Direct Applications 123
Only in the Past 123
What Are Traders Actually Doing and How Are They Doing It? 123
A Word on Human Intuition 124
What and How Are Academicians Doing? 125
The Bridge 127
Collapse of the Theory? 128
A Word on Potential Profit and Strategy 130
Sleeping Beauty 130
Application to Tick Price Data 130
Application to Daily Price Data 144
War and Peace 147
Conclusions 149
Indicators Based on Potential Profit 151
Performance Measures and indicators 151
Profit Performance of a System 151
Performance of a System Defined as Return on Capital 152
Comparing Single-Market Performance 152
Comparing Markets 153
Moving Versions of Strategies 153
Relationship to Trend and Volatility 153
Reversal Points and Events Filter 154
Increasing Position Points 155
Options on Potential Profit 155
Strategy Evaluation 156
The Evaluation Algorithm 156
Example Test8.cpp 160
Class Distribution 162
Conclusions 169
Statistics of Trades and Potential Profit 171
Statistical Properties of Trades 171
Selection 171
Implementing One by One 174
Program Evaluating Strategy and Trades 183
Input Format 183
The Program Evaluate.cpp 184
Application of Evaluate.cpp to SK05 189
Conclusions 193
Comparing Markets 195
Time Frame and Prices 195
Selected Contracts 195
Data File Format 196
Results of Applications of Maxprof3 and Evaluate 196
CH06 196
SH06 199
WH06 201
LCG06 202
GCG06 204
HGH06 206
CCH06 207
KCH06 209
SBH06 211
CTH06 213
LBH06 214
CLH06 216
USH06 218
SPH06 220
Multimarket Potential Profit Algorithms 222
Epilogue 223
Conclusions 223
Bibliography and Sources 225
About the CD-ROM 229
Index 233 |