Total return

Is it possible to code total return on a year to date format to use in a watchlist?
Thanks Peter

Hi Peter,

For the Year to Date calculation use this:

//Get the DiffPct between the current close and the close of the previous year;
//Divided by 100 for formatting into %
DIFFPCT(CLOSE(),YEAR()[1])/100

Then in the watchlist properties change the Price Adjustment to Total Returns:

To have Total Returns YTD with the Price Adjustment set to Price Returns, use the Total Returns TRET() function to convert the previous year end to TR data:

//Get TR data;
TR=TRET(YEAR());
DIFFPCT(CLOSE(),TR[1])/100;