function X = mydatarequest(THIS,D,RANGE)

nx = sum(THIS.nametype == 1);
RANGE = RANGE(1) : RANGE(end);
xrange = RANGE(1)-THIS.maxlag : RANGE(end)+THIS.maxlead;
nxper = length(xrange);
X = nan(nx,nxper);

for i = find(THIS.nametype == 1)
    name = THIS.name{i};
    if isfield(D,name)
        if isa(D.(name),'tseries')
            x = D.(name)(xrange);
            X(i,:) = x.';
        elseif isnumericscalar(D.(name))
            X(i,:) = double(D.(name));
        end
    end
end

end