Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Practical C++ financial programming
Oliveira C., Apress, New York, NY, 2015. 396 pp. Type: Book (978-1-430267-15-7)
Date Reviewed: Nov 11 2015

Financial programs form a large percentage of C++ applications in the software industry. Starting from tracking fixed income investments and equities, up to option pricing and portfolio optimization, the problems in the domain, and the models used to solve them, span a vast range, and C++ continues to be an attractive language with its rich feature set that combines abstractions and high performance.

In this well-organized book, we find a practical introduction to the scope of the challenges in this area, spread across 17 chapters. All chapters of the book have problem descriptions, suggested solutions, and full C++ implementations. There is also an appendix that gives a summary of the latest changes to the C++ standard. The chapters contain mostly independent material and cover separate problems.

Perhaps the simplest application can be fixed income investment. Interest rate calculations, determination of present values of cash flows, and modeling bonds are the problems in this field that are discussed in chapter 1.

Moving average is one indicator for evaluating a stock and can be calculated by maintaining a sequence of prices. Volatility is another characteristic that is useful in comparing investment options. Three strategies are presented in chapter 2 for computing volatility, including the method based on standard deviation. Correlation between equity instruments is another important consideration for portfolio diversification, which is also covered here.

Chapters 3 and 4 introduce certain features of C++ like templates and shared pointers, along with example applications. Numerical classes, packages, and methods are the topics covered in chapters 5 through 10.

For pricing derivatives, the Black-Scholes equation is a popular method. This involves a partial differential equation over two variables that are the underlying price and time. For solving such an equation, a forward difference method is presented in chapter 11.

By interfacing with a linear programming solver, chapter 12 introduces a solution for the investment optimization problem. A quadratic model for capital asset pricing is introduced in chapter 13. Using an approximate linearization scheme with additional variables, the problem gets mapped to linear programming solvers.

Monte Carlo methods use a random process that is repeated several times. By observing a collection of those results, solutions can be estimated. In chapter 14, these methods are demonstrated for numerical integration, for simulating asset prices, and for determining option probabilities. In chapters 15 and 16, interfacing C++ code with Python, Lua, R, and Maxima is discussed. Issues related to multithreading along with POSIX threads are addressed in chapter 17.

The implementations in this book are too simple and lack the rigor and efficiency expected in production-quality code. The text moves rapidly from a brief presentation to coding, and no considerations of algorithmic complexities are given.

Most of the code follows older C++ style and does not take advantage of the newer features offered in C++11. It could be that parts of the book were already written by the time the new C++ standard had emerged. For example, threads and atomic operations are now part of the language, but the book does not mention those. Though the pitfalls of the auto pointers are mentioned, several examples still contain them.

Overall, the breadth of the material is impressive, but the book limits the discussion to elementary ideas and does not explore them in depth.

Reviewer:  Paparao Kavalipati Review #: CR143934 (1601-0015)
Bookmark and Share
  Reviewer Selected
Featured Reviewer
 
 
C++ (D.3.2 ... )
 
 
Financial (J.1 ... )
 
 
Object-Oriented Programming (D.1.5 )
 
Would you recommend this review?
yes
no
Other reviews under "C++": Date
A C++ toolkit
Shapiro J., Prentice-Hall, Inc., Upper Saddle River, NJ, 1991. Type: Book (9780131276635)
Dec 1 1991
Borland C++ handbook
Pappas C., William H. I., McGraw-Hill, Inc., New York, NY, 1991. Type: Book (9780078810152)
Feb 1 1993
Going from C to C++
Traister R., Academic Press Prof., Inc., San Diego, CA, 1993. Type: Book (9780126974126)
Apr 1 1994
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