Estimating the stock recovery rate using matrix models