Example notebooks
The Examples tab lists notebooks published for everyone on the platform. They are a quick way to learn ODSL a step at a time, and a starting point for your own notebooks.

The examples
There are 50 examples, from the first steps in ODSL to energy trading analytics. Type a word such as curve, spread or volatility in the filter box to find them. All but the four in Platform data make their own data in the notebook, so they run anywhere; the platform data ones read the public ECB reference rates.
Getting started with ODSL
| Example | What it shows |
|---|---|
Getting started (#notebook-getting-started) | Cells, variables, the value of a cell, functions, lists of objects shown as a table, and min, max and mean |
Strings and text (#notebook-strings-and-text) | Work with text in ODSL: joining, case, parts of a string, searching, replacing and splitting |
Dates and durations (#notebook-dates-and-durations) | Dates in ODSL: making dates, adding durations, business days, parts of a date and formatting |
Lists and filtering (#notebook-lists-and-filtering) | Lists in ODSL: making them, adding to them, looping, totals and filtering a list of objects by a condition |
Objects and json (#notebook-objects-and-json) | Objects in ODSL: properties, reading them by name, listing their keys and turning them into JSON |
Functions (#notebook-functions) | Write your own ODSL functions: parameters, returning a value, calling functions from functions, and recursion |
Control flow (#notebook-control-flow) | Decisions and loops in ODSL: if, elseif and else, for loops over numbers and lists, and while loops |
Custom types (#notebook-custom-types) | Declare your own types in ODSL with properties, calculated properties and functions, and make objects of them |
Precision and rounding (#notebook-precision-and-rounding) | How ODSL shows numbers: the default precision, setting the number of decimals and the rounding method |
Calendars
| Example | What it shows |
|---|---|
Holiday calendars (#notebook-holiday-calendars) | Build a holiday calendar from rules, check whether a day is a working day and list the working days in a period |
Business day counts (#notebook-business-day-counts) | Count the business days in each month of a year with a business calendar, for volume and accrual calculations |
Intraday calendars (#notebook-intraday-calendars) | Hourly and half-hourly calendars, and a peak calendar that only has the peak hours of working days |
Expiry calendars (#notebook-expiry-calendars) | Expiry calendars: rules for when monthly and quarterly contracts expire, and the expiry date of a tenor |