Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Testing and tuning market trading systems : algorithms in C++
Masters T., Apress, New York, NY, 2018. 332 pp. Type: Book (978-1-484241-72-1)
Date Reviewed: Sep 5 2019

Financial markets have become increasingly dominated by automated systems. A computer program can be used to decide when to buy and sell things such as shares or currencies, with the aim of making a profit. The automated use of this means no human involvement, so the decision on when to buy and when to sell will be based purely on an attempt to make use of common patterns in prices rising or falling. A system that makes a good profit would be able to identify, through its knowledge of patterns, when the price of something is likely to rise and to buy it then, and to sell it when the knowledge of patterns suggests the price will be likely to decrease.

The effect on the world of this happening, when most trades are done without any consideration of what the things being bought or sold actually are, is a big issue. In fact, the book illustrates this very well by not mentioning it at all and being completely abstract. Although at its core the book is about buying and selling things, it is based purely on the concept of price changes. So this is the first thing for readers to be aware of: the book is completely about abstract algorithms and does not mention any wider aspects of trading. I don’t mean this as a criticism--the widespread use of automated trading systems means there is a role for books that are just about the algorithms used in them.

In fact, the book is not about the actual algorithms used in trade systems to decide when to buy and sell things. Rather, it is about algorithms to test such algorithms. It is based on the assumption that a trading system being tested will buy or sell something based purely on market prices. The point: if we have data giving the price changes over a period of time, how can we test whether a trade system is a good one in terms of maximizing the profit made and minimizing the possibility of a loss?

It may seem that this can be done easily, just by running the trade system using past price data as if it is current data, and seeing how it would work as prices change in the way they actually did. The strength of the book is to illustrate that it is a much more complex issue, requiring the careful use of testing algorithms to properly test trading systems. In particular, what does one need to do to make sure the trading system really is working better, in terms of making profit, than a system that makes purely random decisions on when to buy and sell?

A key issue is the extent to which a trading system that seems to be identifying patterns in price changes is in reality linked just to random aspects. Testing could involve splitting price data randomly into separate sets and seeing if it works consistently well in all sets. The book contains various algorithms that involve techniques such as this.

The algorithms used for testing trading systems in this book are given as C++ code. In fact, it is code that has been developed and used by the author over many years. My concern with the book is that, because it is based so much on just illustrating the concepts with this code, it is quite hard to follow, particularly if you are not already familiar with the general statistics concepts being used. I feel it would have been useful to include more general descriptions, as well as more actual examples to show how the code works in practice.

The code is simple in the sense that it is almost all just going through arrays of numerical values using loops. However, this also makes it complex to follow. I could see many cases where the code would be easier to follow via a more extensive use of named methods to perform tasks, such as v=max(a) rather than a loop (v is set to the maximum value in the array a). Also, in many cases, more careful use of meaningful variable names would have helped to make the algorithm given by the code easier to pick up quickly.

Another aspect of the book that concerns me is that it has almost no references to any other work. At least some references to relevant books and papers dealing with similar issues would help readers more quickly gain a better understanding of the technical issues.

Reviewer:  M. Huntbach Review #: CR146683 (1912-0412)
Bookmark and Share
  Editor Recommended
 
 
Object-Oriented Programming (D.1.5 )
 
 
Algorithm Design And Analysis (G.4 ... )
 
 
C++ (D.3.2 ... )
 
 
Economics (J.4 ... )
 
Would you recommend this review?
yes
no
Other reviews under "Object-Oriented Programming": Date
Object-oriented programming systems, languages, and applications
Paepcke A.  Object-oriented programming systems, languages, and applications,Phoenix, AZ,Oct 6-Oct 11, 1991,1991. Type: Whole Proceedings
Oct 1 1992
Object lifecycles
Shlaer S., Mellor S., Yourdon Press, Upper Saddle River, NJ, 1992. Type: Book (9780136299400)
Apr 1 1993
Object-oriented programming
Voss G., Osborne/McGraw-Hill, Berkeley, CA, 1991. Type: Book (9780078816826)
Oct 1 1992
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy