Skip to content

Custom Codes

By Optuma Team · Updated 2024-01-09

Custom Codes allow you to generate a range of chart types, from simple spread charts, to the more exotic types of charts, such as equal-weighted indices.

Once a custom code has been created, it will be added to your system under Custom Codes in the Security Selection window, and you can access it like a normal data file.

This video is pulled from the Optuma 101 course that you can access here. This course takes you through the basics of Optuma and helps you get up and running and using Optuma to its full potential. In this video, Darren Hawkins, MSTA, takes us through how to open, build and edit Custom Codes in Optuma.

The Custom Codes can include tools such as moving averages, or basic scripts. For more complex examples use the Custom Code Builder under the Data menu button.

For example, to create a simple spread chart of Apple relative to the S&P500 index, click the New button and type the tickers and select from the correct exchange from the pop up, ie SPX from World Indices. Type the Code that will be added to your system, along with the Name:

Custom Codes 1

To create the spread chart of the US 10 Year minus 2 Year yield using our global Economic Database:

USGB10Y:EC - USGB2Y:EC

To create an equal-weighted index of a small number of symbols, such as 2023’s so-called ‘Magnificent 7’ stocks use the POWER() function:

POWER(AAPL:US * AMZN:US * GOOGL:US * META:US * MSFT:US * NVDA:US * TSLA:US, POWER=1/7)

You can delete a Custom Code you have previously created by:

  1. Press F3 on your keyboard

  2. The Security Selector window will open. Left-click the Custom Codes folder.

  3. Locate the Custom Code you wish to delete, right-click it and select the Remove Code option.

Custom Codes 2

Choose which categories of cookies you allow. Strictly-necessary cookies are always on. You can change this any time via the "Cookie Settings" link in the footer.

  • Functional

    Remember preferences like dismissed banners and your dark-mode choice.

  • Analytics

    Help us understand how the site is used so we can improve it.

  • Marketing

    Measure our advertising and help us reach people who may be interested in Optuma.