Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Best of 2016 Recommended by Editor Recommended by Reviewer Recommended by Reader
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?
Other reviews under "Object-Oriented Programming": Date
Application of ensemble techniques in predicting object-oriented software maintainability
Alsolai H., Roper M.  EASE 2019 (Proceedings of the Evaluation and Assessment on Software Engineering, Copenhagen, Denmark,  Apr 15-17, 2019) 370-373, 2019. Type: Proceedings
Sep 5 2019
Practical C++ design: from programming to architecture
Singer A.,  Apress, New York, NY, 2017. 246 pp. Type: Book (978-1-484230-56-5)
Feb 1 2019
Data science fundamentals for Python and MongoDB
Paper D.,  Apress, New York, NY, 2018. 214 pp. Type: Book (978-1-484235-96-6)
Oct 17 2018

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright © 2000-2020 ThinkLoud, Inc.
Terms of Use
| Privacy Policy