I am trying to understand some code somebody has written.
I have a y vector which is a factor say book to price for 500 companies.
Then I also have a x vector of the same shape which is just ones.
A OLS regression is performed. The beta of the x variable is saved and called coeff.
The residual is then calculate as
residual = y - (x * coeff)
The residuals are then sorted and then ranked be being passed into a normal inverse function which gives us our final factor.
I do not follow what is going on here? Why is a factor being regressed against a vector of ones?