O'Reilly logo

Modeling Maximum Trading Profits with C++ by Valerii Salov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 9

Statistics of Trades and Potential Profit

The importance of having complete distributions of profitable and losing trades was first mentioned in Chapter 4. A potential profit strategy by definition cannot lose. In addition, it has no breakeven trades (profit and loss [P&L] = 0). However, winning trades are normally different; therefore, the maximum winning trade, average winning trade, and in general the distribution of profitable trades is also important for potential profit strategies. These statistics are market characteristics. It is also interesting to know the absolute maximum of the winning trades observed in historic testing. All this information helps to better understand the potential profit and its statistical properties.

STATISTICAL PROPERTIES OF TRADES

Selection

An object of the class Trades contains information about each individual trade produced by a strategy. Additionally, information about the current cash balance and open position equity is used to produce the total equity fluctuations. The operations of the class Trade (an element of Trades) Trade::entryIndex() and Trade::exitIndex() provide access to the entries in the vectors of prices, costs, strategy, and the vectors of cash balance and open position equity. All together, this is sufficient to get a comprehensive understanding of the characteristics of a strategy and to evaluate many interesting properties.

All transactions in the strategy are split and combined into a set of trades collected by ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required