8.3 USER INTERFACE

Since the pricing tool is a graphical user interface (GUI), the program flow we choose to follow is not predetermined and we have a plethora of choices. In Figure 8.1, we illustrate a typical sequence where we define a new product, add a model to it and process it (price it, visualize it, compute its Greeks, etc.), saving the product/model definitions along the way.

When we launch the program, it reads in an init file called PricingTool.ini. This file contains a list of product/model definitions, which are XML files themselves describing the names, types and default values or function names of the product and model parameters. They also specify the DLL implementing the model. Once the pricing tool reads in these XML files, it populates its list of products in its main control interface titled ‘Product Pricing/Plotting/Analyzing Tool’. We have the option of editing an existing product or creating a new one. Either way, we move on to the ‘Create/Edit Product’ window.

Editing a product is an interactive and intuitive way of modifying its parameters and saving the product definition back to its XML file. We can change the number and types of its the parameters as well as their default values. Note that we can use any XML or plain text editor to make the product modifications directly on the saved file as well, although the pricing tool interface is more natural.

image

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.