In line 38, the dimensions of r is differnt to the dimensions of repmat(rf, 1, 25).
The data for matrix r comes from the4 columns of the factor file, while the data of the rd comes from the data of 5 portfoliios and their intersectation to generate 25 portfolios.
How can I resolve this issue so the dimensions of r are the same as repmat(rf,1,25) and the code can work?
Thank you very much,
Patrick O’Rourke
]]>