Lag() function is not working

System.out.println("ts  :" + adjustedMHTS.getTimeSeries().toString());
LocalDateDoubleTimeSeries ts = adjustedMHTS.getTimeSeries().lag(1);
System.out.println("lag :" + ts.toString());

I get same result for both ts and lag…

Yes, I’ve confirmed the issue you’re seeing - I can’t see an obvious reason why it’s happening and when I stepped through the code I can see a reasonable result being computed, but seems to be discarded somehow. I’ve opened a JIRA issue (PLAT-3023) and I’ll try and get someone to look at it shortly.

This is fixed now in the develop branch. Sorry about that!