We’re rewarding the question askers & reputations are being recalculated! Read more.
19

Markowitz's concepts attracted a great deal of interest from theorists (and still do), but never had much application in practice. The results from practical application were always disappointing (starting in the 1970's, well before DeMiguel, Garlappi, and Uppal (2007) study of $\frac{1}{N}$ portfolios), mainly because it is so difficult to provide accurate ...


12

I am a professor of finance who has spent his life working in the capital markets in operations, sales, compliance, and research. I would love to tell you about the existence of industry standards, but they do not exist. There is little improvement in the state of the art since the 1970's. As a disclosure note, I am a strong critic of mean-variance ...


10

You seem to have two distinct problems: How to generate random portfolios How optimal portfolios are structured Ad 1) A straightforward way to simulate the weights of random portfolios is to use the Dirichlet distribution $Dir(\alpha_1,\ldots,\alpha_n)$. This is a distribution on the Simplex (i.e. on $S=\{x\in\mathbb{R}^n | \sum x_i =1, x_i\geq 0\}$, ...


9

If $Q$ is your covariance matrix, and $r$ is a vector of your expected returns, then the maximum Sharpe ratio is given by the following math program. $${\rm maximize} \frac{r^t x}{\sqrt{0.5 x^t Q x}}$$ subject to $$ 1^t x = m$$ $$ x \in \{0,1\}^n$$ Where $x$ is a vector of indicators of which of the $n$ assets are part of the $m$ selected assets. While the ...


9

There has been a split in the community ever since Mandelbrot published his paper "On the Variation of Certain Speculative Prices." See: Mandelbrot, B. (1963). The variation of certain speculative prices. The Journal of Business, 36(4):394–419. To understand why this is so important, you must first realize what economists are trying to do. When you ...


8

Have a look at this classic paper: Honey, I Shrunk the Sample Covariance Matrix by O. Ledoit and M. Wolf The abstract answers your question already: The central message of this article is that no one should use the sample covariance matrix for portfolio optimization. It is subject to estimation error of the kind most likely to perturb a mean-...


8

The estimation of a covariance matrix is unstable unless the number of historical observations $T$ is greater than the number of securities $N$ (5000 in your example). Consider that 10 years of data represents only 120 monthly observations and about 2500 daily observations. Depending on the application, using data dating farther back than 10 years may be ...


8

It is more complicated than that: It is not the optimization per se that leads to inferior results but the data you use. Kritzman et al. makes a strong case in defense of optimization vs. 1/N in this popular paper: In Defense of Optimization: The Fallacy of 1/N, Financial Analysts Journal, Vol. 66, No. 2, 2010 by Mark Kritzman, Sebastien Page and David ...


8

The underlying problem: your ACTR constraints aren't convex The $i$th constraint on your risk contribution can be written: $$ w_i \sum_j \sigma_{ij} w_j \leq c_i s$$ And this isn't a convex constraint because of the $w_j w_i$ terms (a function $g(x,y)=xy$ isn't convex in $x$ and $y$). They're not convex constraints, so you won't be able to write them as ...


7

The Kelly criterion is just one approach to portfolio construction (or bet sizing) that considers the risk-return tradeoff. There are many possible strategies (static or dynamic) that incorporate other criteria such as the maximum drawdown, probability of ruin, etc. As pointed out by @John, Kelly is maximizing the log of wealth, which is equivalent to ...


7

Transaction costs - even for banks, funds etc, every trade has an associated cost, so if you would be buying a small number of shares, it's probably cheaper to carry the risk and not make those small trades. The source data is imperfect, and contains noise. A lot of the smaller components are simply artefacts of that noise so it would be both an unnecessary ...


7

Of course, optimal control is at the core of math finance. Take few applications: Option Pricing: you have an exposure to a time dependent combination of market factors; you have some knowledge of their dynamics. They are partly deterministic, partly stochastic (i.e. random). At each "time step" you can adjust your portfolio at a given cost. Your goal is to ...


7

Well there are two main things to consider here. Many implementation of Black-Litterman use the market portfolio and the ex post volatility and correlation structure to back out implied returns to use as prior. As far as I know, there is no standard way to reverse-engineer the optimization problem in the presence of nonnormal markets. (the first guess is ...


6

Without the discrete constraints, the minimum tracking error/variance problem is a quadratic program. If you constrain the tracking error, you have a convex quadratically-constrained problem which is solved as an SOCP by modern commercial solvers. SOCP does not address discrete constraints like cardinality of assets or minimum investment levels. SOCP ...


6

Mean-variance (MV) is a framework rather than a prescription. This framework allows one to make, discuss, and defend his investment decision. In practice, there are many ways to make adjustments to this framework, if you believe they will improve performance. E.g. you can adjust the framework by stating "I will MV-optimize weights subject to "0" if the ...


6

That's a pretty heavy question for this forum, and its answer is worthy of a semester-long discussion in a university course. The short answer is that (for convex optimization) the dual problem can give you a lower bound on your objective function (for minimization). In addition, the values of the dual variables are related to the sensitivity of your ...


6

Let $s$ be a $N\times1$ vector of standard deviations and $C$ be an $N\times N$ correlation matrix. The covariance matrix is equal to $$\Sigma=\text{diag}(s) \ C \ \text{diag}(s)$$ where $\text{diag}(x)$ is a function that takes an $N\times1$ vector and puts it on the diagonal of a $N\times N$ matrix. If you get some better standard deviation estimates, ...


6

To complement @skoestimeier's answer on the shortselling-allowed case, I provide a vectorised version. Using the original notation in my post (you may change $r$ to something like $r-r_f$, but this doesn't affect the algebraic structure). Our goal is to find the maximiser for the problem $$\max_{w}f(w):=\frac{w^T r}{(w^T\Sigma w)^{1/2}}.$$ Let $$\phi: w\...


6

Let $R$ be a random vector of risky returns and let $r_f$ denote the risk free rate. Let vector of expected returns $\boldsymbol{\mu} = \operatorname{E}[R]$ and covariance matrix $\Sigma = \operatorname{Cov}(R)$. The maximum Sharpe ratio portfolio among risky assets is called the tangency portfolio. Quick method to tangency portfolio Let's find the ...


5

There are plenty of books on portfolio issues built according to formula "some theory + some R code (or Matlab, or S - which is very similar to R)". See for example Pfaff B. Financial Risk Modelling and Portfolio Optimization with R.// 2013. Best M.J. Portfolio Optimization. Chapman & Hall, 2010. Würtz D. et al. Portfolio Optimization with R/Rmetrics. ...


5

Go ahead and compute a sample covariance matrix with 5,000 stocks on a few years (or less) of daily or monthly returns data. This can be done almost instantly on a modern computer. There is a very good chance that this matrix will not be a covariance matrix. You can check by inspecting the eigenvalues. If any are negative then you don't have a covariance ...


5

This optimization is trivial $$ w^{T,J}_i = \begin{cases} 1 \quad \text{if } i=\arg \max_i R^{T,J}(S_i) \\0 \quad \text{otherwise} \end{cases} $$ That is to say, when you optimize only one weight will be nonzero. That's because these ratios incorporate no notion of distributional width, and therefore do not reward diversification. With no concentration ...


5

The general optimization problem for portfolio management is the following: $$ \min x Q x $$ where $x$ is the allocation vector of your problem, and $Q$ is the covariance matrix of all your possible investments. In your example, you can compute the expectation $E[x]$, the variance $Var[x]=E[x^2]-E[x]^2$ and the covariane $cov[x,y]=E[xy]-E[x]E[y]$ pretty ...


5

There's more than one way to shrink a covariance matrix. You can think of shrinking a covariance matrix as part of general class of estimators that limit the norms of a matrix. You could alternately think of shrinkage as a form of Bayesian analysis. Given the broad set of techniques one could use, it can be more helpful to think in terms of techniques to ...


5

This is the well known Euler's equation for optimality. The trick here is to setup the budget constraint correctly. Your initial wealth $W_0$ is irrelevant. The terminal (risky) wealth is, $$W = W_0( 1 + \pi_1 (R_1 - r_f) + \ldots + \pi_n (R_n - r_f) )$$ (Check that this can be written this way), where $\pi_i \in \mathbf{R}$ is the weight allocated to ...


5

Of course estimating expected returns is the very core of portfolio management. Finding a useful covariance matrix too. To find both fills a book. So I first thought about closing the question. But it is a chance to discuss today's approaches. A nice approach that is very up-to-date where mementum investing seems very fashionable is the following: Momentum ...


5

Seems like a small mistake in the last equation. It should read $\Delta^* = A^{-1} \left[\mu-\gamma \Sigma \omega_c - \frac{1}{\iota'A^{-1}\iota} \iota' A^{-1}(\mu-\gamma \Sigma \omega_c )\iota\right]$, which is not equivalent to your result.


5

There are very powerful software solutions out there, so you should not reinvent the wheel. One notable R package is PortfolioAnalytics. You can find a very good introduction here, where your concrete constraints requirement is addressed in section 3.3, p. 6: Benett, R.: Introduction to PortfolioAnalytics (2015)


5

To solve this constraint minimization problem, first form the Lagrangian Function \begin{align} L(w,\lambda_1,\lambda_2)=w'\Sigma w + \lambda_1(w'\boldsymbol{\mu}-m) + \lambda_2 (w'\boldsymbol{1}-1). \end{align} The first order conditions for a minimum are then given by \begin{align} \frac{\delta L(w,\lambda_1,\lambda_2)}{\delta w}&=2 \Sigma w + \...


5

This answer will try and outline all the different possibilities I came across over the last couple of years, including drawbacks. But first, let me outline the problem a little. To appreciate the problem, a first simplistic starting point is here. What the authors observe is similar to what you observed. "Optimization is Error-Maximization" is an often ...


Only top voted, non community-wiki answers of a minimum length are eligible