What's the difference between the ROC() and CHANGE() functions?

The Rate of Change ROC() and CHANGE() functions are essentially the same (ie they calculate the % change over a user-defined lookback period). For example, the following columns on a daily watchlist will give the same values using the different functions. (Note that ROC(BARS=5) will only be the same as CHANGE(INT_TYPE=Week) in a 5 day trading week.)

Capture

However, the results will be different when changing timeframes.

For example, ROC(Week(PERIODAMOUNT=1), BARS=1) uses weekly data, so will use the previous week’s (Friday) close to calculate the percentage change, whereas CHANGE(INT_TYPE=Week) will be a rolling weekly change, ie, Monday to Monday, Wednesday to Wednesday, etc.

As such, when viewed on a Friday both will have the same values - as long as the markets were open on Friday - but on a Wednesday the ROC(Week(PERIODAMOUNT=1), BARS=1) function will show the performance of just the current week (since Friday) and the CHANGE(INT_TYPE=Week) will calculate Wednesday to Wednesday.

Here’s an example comparing the two in a watchlist column and Time Price Measure tool on the chart of XIJ (notice the Bars and Days counts).

Capture

 

 

Following up on this thread, here’s how to calculate a rolling week’s performance, this week’s performance, last week’s performance, and the week before that.

Rolling week (eg Tuesday to Tuesday): CHANGE(INT_TYPE=Week)

This week (since last Friday): ROC(Week(PERIODAMOUNT=1), BARS=1)

Last week: CHANGE(Week(PERIODAMOUNT=1), INT_TYPE=Week)[1]

Two weeks ago: CHANGE(Week(PERIODAMOUNT=1), INT_TYPE=Week)[2]

Note that to display as a percentage in a watchlist column divide each of the above by 100 (ie CHANGE(INT_TYPE=Week) / 100) and then right-click on the column heading and change the Column Type to Percentage. The cells can also be conditionally coloured under Custom Labels:

The above watchlist can be opened by Optuma clients with access to our World Indices database by downloading the attached file.

Performance.owb (25.5 KB)