From: Mohammad Sharik on
Hi,

I have several assets and I'm trying to calculate weights that would maximise the portfolio return while taking into account the risk involved. This involves creating portfilios based on mean variance utility, s-shaped utility and the kinked utility function. Would u have MATLAB codes for any of these functions or any MATLAB codes that are closely related to these ones.



Thanks,



Sharik Essa
From: Steven_Lord on


"Mohammad Sharik " <fe09me(a)mail.wbs.ac.uk> wrote in message
news:i39s4s$2ff$1(a)fred.mathworks.com...
> Hi,
>
> I have several assets and I'm trying to calculate weights that would
> maximise the portfolio return while taking into account the risk involved.
> This involves creating portfilios based on mean variance utility, s-shaped
> utility and the kinked utility function. Would u have MATLAB codes for any
> of these functions or any MATLAB codes that are closely related to these
> ones.

Look at Financial Toolbox, in particular functions like PORTOPT.

http://www.mathworks.com/access/helpdesk/help/toolbox/finance/portopt.html

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

From: Bob Taylor on
"Mohammad Sharik " <fe09me(a)mail.wbs.ac.uk> wrote in message <i39s4s$2ff$1(a)fred.mathworks.com>...
> Hi,
>
> I have several assets and I'm trying to calculate weights that would maximise the portfolio return while taking into account the risk involved. This involves creating portfilios based on mean variance utility, s-shaped utility and the kinked utility function. Would u have MATLAB codes for any of these functions or any MATLAB codes that are closely related to these ones.
>
>
>
> Thanks,
>
>
>
> Sharik Essa

Steve's comment about portopt is correct for mean-variance portfolio optimization (the utility function is negative exponential in this case). The other types of utility functions you are interested in such as s-shaped and kinked utility functions are not supported directly in MATLAB and would require some coding.

With regard to the other types of utility functions, I am assuming that your interest is in descriptions of utility by Kahneman & Tversky and, much earlier, by Friedman and the Chicago School. One of the problems with such utility functions is that they are either first- or second-order non-differentiable and that expected utilities (over some assumed distribution of asset returns) may not have closed-form solutions so that the portfolio optimization problem becomes a much more complex stochastic and/or nonlinear optimization problem. In addition, it is not always clear how you would characterize or calibrate such utility functions. To my knowledge, these are wide open areas of research and, given the tools in MATLAB, you ought to be able to make some progress on this type of problem with some degree of success.