5.5 SUMMARY

Like all large-scale applications, the trading platform also demands that we make sound choices in the beginning and design it wisely. The main difference between the trading platform and any other standard program is that the former is designed to evolve and assimilate new products and pricing models gracefully. This feature of planned growth places additional constraints on the design.

Because of its power and flexibility, an object-oriented language may present itself as the ideal development environment, and an in-house trading platform is likely to be deployed using an object-oriented language. The powerful features of OOP that are attractive include polymorphism (which allows us to handle disparate products on an equal footing), encapsulation (helping us maintain modularity and maintainability), inheritance (hierarchical structuring of the design), function overloading (reuse of intuitive function names and compile-time function lookup), etc.

For all its power, OOP suffers from certain handicaps that are, in fact, the basis of some of its features. Among them are statefulness (the property that the output from a piece of code depends on the state of the program, which is inherent in constructing an object and then using its methods) and the associated lack of functional purity (the inability to guarantee that the operation in one part of the program will not have undesired, global side effects). The ability to avoid statefulness and side effects has implications ...

Get Principles of Quantitative Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.