The LinReg TPL for MC has a bug - it doesn't correctly translate Shift.
Code in TPL is (note the end hard-coded 1):
<@compress_single_line>
(Open[0]<@printInput block /> > SQ_LinearRegression(<@printComputedFromParam block /><@printInput block />, <@printParam block "#Period#" />)[1])
</@compress_single_line>
Should be:
<@compress_single_line>
(Open[0]<@printInput block /> > SQ_LinearRegression(<@printComputedFromParam block /><@printInput block />, <@printParam block "#Period#" />)[<@printShift block shift />])
</@compress_single_line>
Most likely the hard-coded Open[0] is also not right.