As the previous post shows, it all starts with…

In order get close to bare-metal access to your compute hardware, use C. In order to utilize powerful, tested, convex optimization methods use CVXGEN. You can start with this CVXGEN code, but you’ll have to retool it…

- Discard the (m,m) matrix for an (n,n) matrix. I prefer to still call it
**V**, but**Sigma**is fine too. Just note that there is a major difference between**Sigma**(the covariance-variance matrix) and**sigma**(*individual*asset-return variances matrix; the diagonal of**Sigma**). - Go meta for the efficient frontier (EF). We’re going to iteratively generate/call CVXGEN with multiple scripts. The differences will be w.r.t the E(R
_{p}). - Computing Max: E(R
_{p}) is easy, given α. [I’d strongly recommend renaming this to something like**expect_ret**comprised of (r_{1}, r_{2}, … r_{n}). Alpha has too much overloaded meaning in finance]. - [Rmax] The first computation is simple. Maximize E(R
_{p}) s.tThis is trivial and can be done w/o CVXGEN.*constraints.* - [Rmin] The first CVXGEN call is the simplest. Minimize σ
_{p}^{2}s.t., but ignoring E(R*constraints*_{p}) - Using Rmin and Rmax, iteratively call CVXGEN q times (i=1 to q) using the additional constraint s.t. R
_{p_i}= Rmin + (i/(q+1)*(Rmax-Rmin). This will produce q+2 portfolios on the EF [including Rmin and Rmax]. [Think of each step (1/(q+1))*(Rmax-Rmin) as a quantization of intermediate returns.] - Present, as you see fit, the following data…
- (
**w**_{0}, w_{1, }…w_{q+1}) - [ E(R
_{p_0}), …E(R_{p_(q+1)}) ] - [ σ(R
_{p_0}), …σ(R_{p_(q+1)}) ]

- (

My point is that — in two short blog posts — I’ve hopefully shown how easily-accessible advanced MVO portfolio optimization has become. In essence, you can do it for “free”… and stop paying for simple MVO optimization… so long as you “roll your own” in house.

I do this for the following reasons:

- To spread MVO to the “masses”
- To highlight that if “anyone with a master’s in finance and computer can do
*MVO for free*” to consider their quantitative portfolio-optimization differentiation (AKA portfolio risk management differentiation), if any - To emphasize that this and the previous blog will not greatly help with semi-variance portfolio optimization

I ask you to consider that you, as one of the few that read this blog, have a potential advantage. You know who to contact for advanced, relatively-inexpensive SVO software. Will you use that advantage?