Hi, excuse me, in the classical (Markwowitz) mean-variance portfolio optimization, I'm trying to implement in MATLAB by the portfolio object and related functions... if my portfolio contains also bonds, how should I compute the (total) returns for these, to give them as input in MATLAB?
I mean, I need a series of historical returns to give as input in MATLAB, so it can compute the mean of these (if I want to assume the expected returns and volatilities are simply historical), and the related correlation matrix.
But may I simply download the historical price series for the bonds, then compute the historical returns by ln(price_t/price_(t-1)), and then give them to MATLAB?
I was thinking to give to MATLAB instead directly the historical series of the ytm of the bonds, but I think I may be wrong...
The "total return" for a bond may be thought as its "price return"? If I think to the theoretical price of a bond, as its discounted cash flows, these last should contain also its coupon, and so this would be the end of the story? Or am I missing something?
Thanks a lot