News
Pricing Rainbow Options
Responding to growing client interest, this post highlights the use of TS Imagine’s Monte Carlo Generator to price multi-asset best-of/worst-of options (aka Rainbow Options).
The pricing solution presented here leverages the flexibility of the TS Imagine Financial Platform (IFP). More specifically, the IFP Model Interface and the IFP Monte Carlo Simulation Generator, as described below.
- The IFP Model Interface enables users to register their own pricing models using an app written with our JavaScript API. The interface provides access to security-level information and pricing environment inputs and when directed, passes outputs back to Fair and Greeks columns in the TS Imagine Trading System (ITS). Users have full control over the model calculations performed within the app. Note that any custom model registered via this interface behaves like one of TS Imagine’s native models.
- The IFP Monte Carlo Simulation Generator is a JavaScript API method that gives users access to a simulation generator they can use for Monte Carlo pricing. Users have the ability to define random factors, set the pricing inputs for each factor, set the number of simulations and periods, determine the volatility lookup type, and much more. TS Imagine users can refer to our JavaScript API Programmers Reference for more about this method.
Users can incorporate a vast range of payoff structures into the pricing function defined by the model interface. For rainbow options, the following payoffs are considered:

For each simulation, we calculate the present value of the instrument based on the payoff function. Th e Generator then averages these values to obtain the current Fair price of the instrument.
A correlation function explicitly defined in the IFP Monte Carlo Generator takes into account any correlations between underlying assets.

Sample RBWO Security Window and Output
![]() | Take a Look: Sample rainbowPricer app |
Setting up the IFP Model Interface
Create a Custom Reference Table
Setting up the IFP Model Interface starts with creating a Custom Reference Table, where you’ll store the name of the model, function, and script to be utilized by the holding or security. You can name the CRT whatever you want.
The CRT should have the following columns:
Column | Description |
Key | Enter the security type code to which the model(s) is relevant (e.g. RBWO for Rainbow Options). |
ModelName1 | Specify the name of the model; must be unique within the CRT. |
ModelId1 | Specify a model id number; must be unique within the CRT. |
Script1 | Specify the name of the library app where the model is located. The app can be saved into My Libraries, Shared Libraries, or TS Imagine Libraries; note that the system first checks My Libraries, then Shared Apps, then TS Imagine Libraries. Only specify the library app name; omit the “.js” extension. |
Function1 | Specify the name of the function in the app. |
If you want to provide more than one model for the security type, simply add four additional columns of the same names listed above appended with “2” instead of “1” (e.g., ModelName2, ModelId2, Script2, Function2). You may do this for an unlimited number of models.
Choose the Default IFP Models CRT
Next, specify the Custom Reference Table where your models are defined in your system preferences:
- Select the menu sequence Tools => Preferences => Portfolio => Recalculation.
- In the IFP Model Reference Table field, enter the name of your recently created CRT.
TIP: Look up available CRTs via the magnifying glass icon on the right-hand side of the field. - Right-click and select OK from the menu.
- Click the OK button.
Note: For the system to recognize your updated preferences, you must restart the TS Imagine Trading System.
Designate Models in Your Holdings
Next, link your model to a holding via its environment. To specify a user-created model for an option or placeholder holding:
- Double-click the holding row in the portfolio.
- Click the holding’s Environment button.
- In the Listed Option tab, change the American Model and European Model to Type.
- In the adjacent field, select the name of the model you created and saved.
- Right-click and select Save to exit the Environment window.
- Right-click and select Save to exit the holding window.
- From your portfolio, select the menu sequence Portfolio => Recalc => Fair and Implieds.
The fair and Greeks specified in your model script are recalculated according to the model calculation.
Once the model is referenced by a holding, any calculations on that holding will take this model into account, including Value at Risk, Projections, and custom column calculations.
Related News

Insights from Interns
Our most recent interns, Nicholas and Timur, both joined us from Imperial College London where they are going into the third year of their Mechanical and Aerospace Engineering degrees, respectively. They spent 11 weeks working with TS Imagine’s Professional Services team in London this summer under the supervision of myself and Simarjit Johal (Regional Team Lead).

A New Market Reality: Lessons from a Defining Year in a Turbulent Decade
Future historians will come to see 2022 as a year of extremes and one of the most consequential years for markets in a turbulent decade. Trading desks working across asset classes and around the world have been put to the test, navigating what would once have been described as once-in-a-generation market events.

The Dollar Milkshake Theory – Stress Testing the Potential Impact of a Sovereign Debt and Currency Crisis
Stress Tests play an important role in improving financial stability by enhancing market discipline and transparency. Here we consider the third example of these stresses based on current market conditions and show how the risk factors can be generated along with their relevant shock examples.