Generic Scripted Products

Table of Contents

ORE's product catalogue describes one module that prices an open family of payoffs from user-defined scripts: the Scripted Trade module. ORE calls the section Generic Scripted Products. Many products in the catalogue run on this module under the surface. This note records the domain grounding, as ORE documents it in its product catalogue.

1. Identifiers

What a trader books it as, and what to grep for. The codes are the trade type catalogue's, which is what the database enforces.

Field Value
Full name Generic Scripted Products
Short name Generic Scripted Products
ORE Studio product code ScriptedTrade
Asset class determined per trade by the underlyings
Family none; see below
ORE trade data node ScriptedTradeData
ORE documentation genericscriptedproducts.tex

2. Summary

A scripted trade defines its payoff in a small script language instead of picking one product from a fixed list. The script reads the trade's data node and writes the option legs. The payoff script can ride inside the trade XML or sit in a script library. The module covers five of the six ORE asset classes. ORE wraps the module inside classic-looking trade types in several product sections, and shows the raw scripted input format in the rainbow option and exotic variance sections.

3. Detail

3.1. What it is

ORE describes the module as follows:

The Scripted Trade module allows flexible definition of new payoffs across five of the six asset classes covered in ORE, just by way of defining the payoff script.

Source: ORE User Guide, Products catalogue, genericscriptedproducts.tex.

ORE states where the script lives:

The payoff script can be embedded into the trade XML or can be placed into a separate script library.

Source: ORE User Guide, Products catalogue, genericscriptedproducts.tex.

3.2. In plain terms

A scripted trade is a payoff written as a program. The program names the market quantities it needs and produces the payments. A new product is a new script. No C++ code and no new trade type is needed. The rest of the ORE machinery, the pricing, the curves, the sensitivities, treats the result as a normal trade.

3.3. How it works in ORE

The catalogue text explains where the two input formats appear. The products in the catalogue sections from the double digital option to the target redemption forward are internally scripted trades. ORE wraps them in their own trade types and data containers, so the trade XML looks classic. The rainbow option section and the exotic variance and volatility section show the generic scripted trade input format in full. ORE prices each variation with its own payoff script, and the catalogue lists the scripts. The two families are documented as separate knowledge notes: Rainbow Options and Exotic Variance and Volatility Derivatives.

3.4. Mathematical notes

There are no formulas in this section of the catalogue. Each scripted product carries its own mathematics inside its payoff script. The scripts compute prices and returns from the data node fields, combine them, and write option legs. The script language handles conditions, loops, schedules and payoffs. See the knowledge notes for the two scripted families for their payoff mathematics.

3.5. What moves its value (static sensitivities)

A scripted payoff's value follows its script inputs: the market levels it reads, the volatilities of its underlyings, the correlations between them, and the rates that discount the payout. The concrete drivers differ per product.

3.6. How the profile ages (dynamic sensitivities)

A scripted payoff ages by its schedule. Observation dates fix the levels the script reads. Barrier and trigger conditions are checked on their dates. The payoff settles on the settlement date the script writes. The concrete timing differs per product.

3.7. Why a customer would want it

The module lets a desk express a new payoff without waiting for a software release. In ORE Studio a customer books scripted products to value them and run sensitivities on the ORE engine, with the same support the fixed product set gets.

3.8. Example

This catalogue section holds no trade listing of its own. It points at the scripted examples in the two family sections. The rainbow option section shows the best of asset or cash option on the S&P 500 and the Euro Stoxx 50, in the traditional container and as a scripted trade with its full payoff script. The exotic variance section shows a long call on the realised variance of the S&P 500 as a scripted variance option trade with its VarianceOption script. Both listings are reproduced in the corresponding knowledge notes.

Source: ORE User Guide, Products catalogue, genericscriptedproducts.tex, which points at the sections Rainbow Option and Exotic Variance and Volatility Derivatives.

4. See also

  • Knowledge — the hub of all knowledge notes, with the alphabetical product run.
  • ORE User Guide, Product catalogue: products.tex, which inputs genericscriptedproducts.tex. The upstream project is OpenSourceRisk/Engine.
  • Knowledge notes Rainbow Options and Exotic Variance and Volatility Derivatives, the two scripted families this section introduces.

Emacs 29.3 (Org mode 9.6.15)