Help with script code

hi all,

im a newbie to Optuma - need some help with creating a script please

What i want to do is to create 2 columns in my watchlist

  1. Calculate and display the price change for an investment over 6 months
  2. Calculate and display the price change for an investment using the formula: average of 1,3,6 and 12 month price change

Hi Zac,

Use the CHANGE() function and set the interval parameters as required:

Capture

If you want to display as a percentage in a watchlist divide by 100 and change the watchlist Column Type to Percentage. More details here - including how to colour the cells for positive/negative values:

https://help.optuma.com/kb/faq.php?id=1185

The second query will require four change formulas which need to be added together and divided by four to get the average:

//Calculate the returns over the 4 periods;
R1=CHANGE(INT_TYPE=Month, INT_COUNT=1); 
R3=CHANGE(INT_TYPE=Month, INT_COUNT=3); 
R6=CHANGE(INT_TYPE=Month, INT_COUNT=6); 
R12=CHANGE(INT_TYPE=Month, INT_COUNT=12);
//Calculate the average; 
(R1+R3+R6+R12)/4

To learn more about scripting don’t forget our free tutorial videos.

[postquote quote=68689]
Thanks Darren - youre a legend!