Cover image for Modeling maximum trading profits with C++ : new trading and money management concepts
Title:
Modeling maximum trading profits with C++ : new trading and money management concepts
Personal Author:
Publication Information:
Hoboken, NJ : J. Wiley & Sons, Inc., 2007
Physical Description:
1v + 1 CD-ROM
ISBN:
9780470086230
General Note:
Accompanied by compact disc : CP 8994

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010123790 HG4515.5 S24 2007 Open Access Book Book
Searching...

On Order

Summary

Summary

"Mr. Salov has taken one of my favorite creations - Perfect Profit - and provided an expanded description of his interpretation of it and put it in your hands with the included software. Like I said fifteen years ago, Perfect Profit is an important tool for the trading system developer. See for yourself."
-- Robert Pardo , President, Pardo Capital Limited

"A very in-depth reference for programmers that should serve well into the future. The code herein lends itself well to other syntactically similar programming languages such as Java, PHP, and C#."
-- Ralph Vince

The goal of trading is to make money, and for many, profits are the best way to measure that success. Author Valerii Salov knows how to calculate potential profit, and in Modeling Maximum Trading Profits with C++, he outlines an original and thought-provoking approach to trading that will help you do the same.

This detailed guide will show you how to effectively calculate the potential profit in a market under conditions of variable transaction costs, and provide you with the tools needed to compute those values from real prices. You'll be introduced to new notions of s-function, s-matrix, s-interval, and polarities of s-intervals, and discover how they can be used to build the r- and l-algorithms as well as the first and second profit and loss reserve algorithms. Optimal money management techniques are also illustrated throughout the book, so you can make the most informed trading decisions possible.

Filled with in-depth insight and expert advice, Modeling Maximum Trading Profits with C++ contains a comprehensive overview of trading, money management, and C++. A companion website is also included to help you test the concepts described throughout the book before you attempt to use them in real-world situations.


Author Notes

Valerii Salov, PhD, is Vice President and Director of Financial Product Development for Toolkit at NumeriX LLC


Table of Contents

Prefacep. xi
Acknowledgmentsp. xiii
Chapter 1 Potential Profit as a Measure of Market Performancep. 1
Profit and Potential Profitp. 1
Price Flow and C++p. 4
Why C++?p. 4
Why Skip Date and Time Classes?p. 4
Vector for Price Flowp. 5
Classes for Pricesp. 5
Procedural Programmingp. 7
Object-Based and Generic Programmingp. 8
Example Test1.cppp. 11
Object-Oriented Programmingp. 12
Exception Safetyp. 16
Production of Concrete Objectsp. 16
Pardo's Potential Profitp. 17
Simple Algorithm for a True Reverse Systemp. 17
The Program Computing Pardo's Potential Profitp. 18
Conclusionsp. 20
Chapter 2 Potential Profit and Transaction Costsp. 21
What Is a Trading Strategy?p. 21
Properties of Potential Profit Strategyp. 24
"Do Nothing" Strategyp. 24
Property 1

p. 24

Property 2

p. 24

Property 3

p. 24

Property 4

p. 25

Property 5

p. 27

Property 6

p. 28

Transaction Costsp. 28
Commissionsp. 28
Slippagep. 28
The Bid/Asked Spreadp. 30
The Total Transaction Costp. 31
Transaction Costs and C++p. 32
Profit-and-Loss Functionp. 34
The Main Equationsp. 34
C++ Implementationp. 35
Example Test2.cppp. 36
Conclusionsp. 38
Chapter 3 R- and L-Algorithms for Maximum Profit Strategyp. 39
S-Function and S-Matrixp. 39
Definition 3.1 S-Functionp. 39
Definition 3.2 S-Matrixp. 40
S-Interval and Its Boundariesp. 40
Definition 3.3 S-Intervalp. 40
Definition 3.4 S-Interval with the Right-most Boundaryp. 40
Definition 3.5 S-Interval with the Left-most Boundaryp. 40
Definition 3.6 S-Interval with the Left-most and Right-most Boundariesp. 40
The Best Buying and Selling Points on the S-Intervalp. 41
Polarity of S-Intervalsp. 41
Definition 3.7 Right Polarityp. 41
Theorem 3.1

p. 41

Definition 3.8 Left Polarityp. 42
Theorem 3.2

p. 42

R-Algorithmp. 42
L-Algorithmp. 44
C++ Implementationp. 44
Coding The R- and L-Algorithmsp. 44
Example Test3.cppp. 48
C++ Program Evaluating Potential Profitp. 51
Conclusionsp. 54
Chapter 4 Money Management and Discrete Nature of Tradingp. 55
Denominationsp. 55
Induction and Trading Account Sizep. 58
Growth Function and Optimal Bp. 59
Discrete Nature of Tradingp. 62
Evolution of Account with Constant A[subscript w], A[subscript l], M, bp. 62
Evolution of Account with Nonconstant A[subscript w], A[subscript l]p. 71
Conclusionsp. 79
Chapter 5 Money Management for Potential Profit Strategyp. 81
The Best Allocation Fraction for Potential Profit Strategyp. 81
Self-Financing Restrictionp. 83
Minimal A[subscript 0]p. 83
Actions and Positions Test4.cppp. 87
The First and Second P&L Reservesp. 89
Rules for Offsetting Positionsp. 92
Classes Trade and Tradesp. 92
Class Positionp. 95
Using Position and Trades Test5.cppp. 100
Conclusionsp. 104
Chapter 6 Best to Betterp. 103
Algorithm for the First Profit-and-Loss Reserve Strategyp. 105
Algorithm for the Second P&L Reserve Strategyp. 109
Program Applying Three Algorithmsp. 118
Conclusionsp. 122
Chapter 7 Direct Applicationsp. 123
Only in the Pastp. 123
What Are Traders Actually Doing and How Are They Doing It?p. 123
A Word on Human Intuitionp. 124
What and How Are Academicians Doing?p. 125
The Bridgep. 127
Collapse of the Theory?p. 128
A Word on Potential Profit and Strategyp. 130
Sleeping Beautyp. 130
Application to Tick Price Datap. 130
Application to Daily Price Datap. 144
War and Peacep. 147
Conclusionsp. 149
Chapter 8 Indicators Based on Potential Profitp. 151
Performance Measures and indicatorsp. 151
Profit Performance of a Systemp. 151
Performance of a System Defined as Return on Capitalp. 152
Comparing Single-Market Performancep. 152
Comparing Marketsp. 153
Moving Versions of Strategiesp. 153
Relationship to Trend and Volatilityp. 153
Reversal Points and Events Filterp. 154
Increasing Position Pointsp. 155
Options on Potential Profitp. 155
Strategy Evaluationp. 156
The Evaluation Algorithmp. 156
Example Test8.cppp. 160
Class Distributionp. 162
Conclusionsp. 169
Chapter 9 Statistics of Trades and Potential Profitp. 171
Statistical Properties of Tradesp. 171
Selectionp. 171
Implementing One by Onep. 174
Program Evaluating Strategy and Tradesp. 183
Input Formatp. 183
The Program Evaluate.cppp. 184
Application of Evaluate.cpp to SK05p. 189
Conclusionsp. 193
Chapter 10 Comparing Marketsp. 195
Time Frame and Pricesp. 195
Selected Contractsp. 195
Data File Formatp. 196
Results of Applications of Maxprof3 and Evaluatep. 196
CH06p. 196
SH06p. 199
WH06p. 201
LCG06p. 202
GCG06p. 204
HGH06p. 206
CCH06p. 207
KCH06p. 209
SBH06p. 211
CTH06p. 213
LBH06p. 214
CLH06p. 216
USH06p. 218
SPH06p. 220
Multimarket Potential Profit Algorithmsp. 222
Epiloguep. 223
Conclusionsp. 223
Bibliography and Sourcesp. 225
About the CD-ROMp. 229
Indexp. 233