Code covered by the BSD License  

Highlights from
Factors on Demand

image thumbnail
from Factors on Demand by Attilio Meucci
Proper implementation of factor models: bottom-up estimation, top-down attribution

X=MergeMargCop(W,F,U)
function X=MergeMargCop(W,F,U)

[J,K]=size(W);
X=0*U;
for k=1:K
    dd = interp1(F(:,k),W(:,k),U(:,k),'linear','extrap');
    X(:,k) = dd;
end

Contact us at files@mathworks.com