@maratikus
Sorry for the (relatively) late reply. I’m not sure what you mean by high condition number.
I assume that since the risk-free rate has a standard deviation of 0 and 0 correlation with the rest of the portfolio that the covariance matrix is the same whether you have the risk-free rates in there or not. Assuming you use standard MVO with weights constrained to 1, the optimal portfolio is wmin+(1/lambda)*sig-1*(I-1*wmin’)*u, where lambda is a risk aversion coefficient, sig-1 is the inverse of the covariance matrix, I is a nxn idenity matrix, 1 is a vector of 1s, u is the expected return vector, and wmin is the minimum variance portfolio (sig-1*1/1’*sig-1*1). I know it may seem counter-intuitive, but because (1wmin’)*rf=rf, then (I-1*wmin’)*u=(I-1*wmin’)*(u-rf), and it doesn’t matter what the risk-free rate is or whether you subtract it out. The portfolio weights are the same regardless.