Spread Functions

There are a variety of different functions that can be used to created dynamic expressions that have user defined roll logic.

One of the biggest benefits of using these functions is that you can control roll logic within different commodities within a single expression

 

Rollspread Functions

Function

Syntax

Function Details

ROLLSPREAD

RollSpread(<expr>)

Examples:

RollSpread(Roll(CL,H)-Roll(CL,U)) = March Rolling Calendar Spread

RollSpread(Roll(CL,U)-Roll(CL,H,1)) = September Rolling Calendar Spread

RollSpread(CONT('BRN-ICE')-CONT(CL)) = Brent-WTI Continuation Spread (With Months Align based on Brent Expiration)

RollSpread(ROLL('BRN-ICE',F)-ROLL(CL,F)) = Brent-WTI January Spread (Rolls once a year based on Brent Expiration)

RollSpread(-CONT(CL)+14*CONT(HO)+28*CONT(XRB)) = 3X2X1 Crack Spread Continuation (Note CL listed first to control rolling of HO and XRB)

RollSpread(-Roll(CL,F) + 28 * Roll(XRB,F) + 14 * Roll(HO,F)) = 3X2X1 January Crack Spread Continuation (Rolls once a year based on WTI Expiration)

*NOTE: First Leg in the RollSpread Function will control roll timing

Used to create sub-expressions who's components need to roll together at the same time as specified by first leg of the sub-expression.
 
     

Continuation Functions

Function

Syntax

Function Details

ROLL

Roll(<Root>,<deliveryMonths>,<Optional_Year_Offset)

Examples:

Roll(CL,H) = First March (Similar to %CL 1!;HIN)

Roll (CL,H,1) = First March, Offset by 1 year (Similar to %CL 2!;HIN)

Roll (CL,HMUZ) = Continuation selecting first available month from the list (Similar to %CL 1!;HMUZIN)

ROLL (CL,HMUZ,1) = Continuation selecting Second available month from the list (Similar to %CL 2!;HMUZIN)

This is a rolling month continuation. You can specific months using month letter code. The optional offset will be years when single delivery month is present. When you have multiple delivery months specified, offset will be relative to list of delivery months.

 

 

 

CONT

Cont(<Root>,<Optional_Month_Offet>)                                                           

Examples:

Cont(CL) = Front Month Continuation

Cont(CL,1) = 2nd Month Continuation

*Note: CONT(CL) is Equivalent to Roll(CL,FGHJKMNQUVXZ)

Similar to Roll, but with no delivery argument. Rolls every month instead of once a year. Offset is always years. Since its set of deliveries consists of all 12 months.
     

Forward Functions

Function

Syntax

Function Details

FW

FW(<Root>,<Optional_Delivery_Months>,<Optional__Offset>)  

Examples:

FW(CL) = Front Month Forward (Simiar to CL 1!, unlike CONT(CL) which is similar to %CL 1!)

FW(CL,1) = Second Month Forward (Simiar to CL 2!, unlike CONT(CL,1) which is similar to %CL 2!)

FW(CL,H) = Front March Forward (First Available March Contract)

FW(CL,H,1) = 2nd March Forward

FW(CL,HMUZ) = Forward selecting first available month from the list

FW(CL,HMUZ,1) = Forward selecting second available month from the list

*Note: FW(CL) is Equivalent to FW(CL,FGHJKMNQUVXZ)

Similar to Roll and Cont, but does not roll backwards in time. Gives the same value as Roll and Cont when viewed in a Watchlist, but for Time Series windows it is different for historical values.
     

Single Future Function

Function

Syntax

Function Details

FUT

FUT(<Root>,<DeliveryMonth>,<Year>)

Examples:

FUT(CL,Z,2015) = This returns specific contract, equivalant to CL Z2015.

FUT(CL,Z,2020) = This returns specific contract, equivalant to CL Z20.

Selects individual futures contract so that user does not need to worry about naming convention for active or expired contracts..  
     

Seasonal Future Function

Function

Syntax

Function Details

SFUT

SFUT(<Root>,<DeliveryMonth>,<OptionalOffset>)

Examples:

SFUT(CL,Z) = For every year, it will show data for December contract of that year.

Note: Chart will be blank after December Expires until end of year.

SFUT(CL,Z,1) = For every year, it will show data for December contract of next year.

This rolling function will bring data for futures for consecutive years, in a manner similar to single root futures seasonal charts.