function [ssrn na]=ssrnul_trun(y,zz)

% This code modifies ssrnul.m in Bai Perron (1998) code to accomodate the
% band spectral regression approach suggested by Yamamoto and Perron (2013)

l=size(y,1);
[omega na]=selectmatreal_trun(l);
delta=olsqr(omega*y,omega*zz);
ssrn=(y-zz*delta)'*(y-zz*delta);

