Tag Info

15

Sorry for not being able to give more than one hyperlink, please do some web search for the project pages. Portfolio optimization could be done in python using the cvxopt package which covers convex optimization. This includes quadratic programming as a special case for the risk-return optimization. In this sense, the following example could be of some ...

13

One simple method, based on the principles of mean-variance optimization, is to set the weights proportional to the product of the inverse of the covariance matrix and a vector of standard deviations. This implicitly assumes that the normalized expected return of each stock is equal. If you wish, you can take only the top 5 weights and set the others to ...

9

I would split the question into two sub-questions: Is market beta useful at all? Is market beta useful for high-frequency strategies that are fully hedged EOD? With regards to the first question, I would summarize the hundreds of papers on the subject as: yes, but not as much as it was initially believed. The reason being that multi-factor models are ...

9

It partly depends on the use case. If one is taking multiple strategies and assembling a portfolio that includes multiple different strategies and is mixing this with a heavy weighting to an equity index, then this might be a useful measure. Zero or negative beta does have meaning, in the same way that correlation has meaning. In the more traditional ...

7

The problem of the selecting the best portfolio (according to some risk measure) with a limited number of assets can be formulated as a mixed integer linear or quadratic program and is reviewed in the recent paper "Portfolio selection problems in practice: a comparison between linear and quadratic optimization models". It can be solved for reasonable sizes ...

7

You have the correct approach. (1) The simulation generates sampled portfolio values, $P_1,P_2, \dots, P_n$ at time $t=T$. VaR is specified as a left-tail percentile. Order the sample as $$P_{(1)} \leq P_{(2)} \leq \dots \leq P_{(n)}.$$ If you are considering $VaR_\alpha$ at the $100(1-\alpha) \%$ confidence level , then choose the smallest integer $k$ ...

5

It doesn't make sense to use option price series data for computing option risk anyway. Since they are derivatives (i.e. their value is derived from other securities) it is more basic and reasonable to handle the underlying risks. As hinted by John, the risks to an option portfolio are generally considered in the context of inputs to a pricing model (which ...

5

Specifically, we have a generic conditional claim, $C$, that is a function of the diffusion process for the underlying, $S(t)$, and time $t$ so $C = C(S(t), t)$. As you pointed out, $C$ is an Ito process becuase it is a function of a stochastic process so we use Ito's Lemma to determine how the contingent claim varies as a function of the diffusion process ...

5

Since you are asking for low correlation of the assets, I'm guessing that you are really trying to get a low (or minimum) volatility portfolio. If that is the case, then the steps for one approach are: estimate the variance matrix of the universe of assets use a portfolio optimizer to select the minimum variance portfolio given your constraints This ...

4

By William Bernstein, source: In June of 1992 academicians Eugene Fama and Kenneth French ("F/F") rocked the investing world with a study published in the Journal of Finance, innocuously entitled "The Cross-Section of Expected Stock Returns." The piece is the cognitive equivalent of an enormous hunk of marzipan cake which sits in your ...

4

Unless I'm missing something, your question simply boils down to arithmetic as you have the portfolio allocation and sector returns explicitly identified: Portfolio Return = (Sector 1 Allocation) * (Sector 1 Return) + (Sector 2 Allocation) * (Sector 2 Return) + ... + (Sector n Allocation) * (Sector n Return) Where the allocations among n sectors add up to ...

4

The question is somewhat vague (lacking a well-defined objective), so this advice may not apply. Be mindful that you may be simultaneously considering multiple futures contracts that contain overlapping underlying constituents (e.g. futures that track the EuroStoxx 600 and DAX). If you are using a risk model, the idiosyncratic risk may not, in fact, be ...

4

7 years ago I had to solve the problem of a efficiency frontier under linear constraints on the asset weights and also stumbled upon Markowitz Critial Line Algorithm. I still have a directory with some resources in it. Since Bryce already gave a practical implementation with R code by Eric Zivot, I will concentrate on some papers which might help. I ...

4

You can use empirical distribution and use Mean-CVaR as a target function. CVar ("Expected shortfall") is considered a better risk metrics than VaR if we depart from the light-tailed normal distribution. The code below is in R and is taken from the book "Portfolio Optimization with R/Rmetrics" By Diethelm Wuertz, Yohan Chalabi, William Chen, Andrew Ellis. ...

4

If $\Sigma$ is the covariance matrix of all assets and $w$ is the column vector of weightings of the asset in a certain portfolio. Then $$w^T \Sigma w = VAR$$ is the variance of the portfolio. The contribution to volatility of asset $i$ is given by $$w_i (\Sigma w)_i/\sqrt{VAR},$$ where $(\Sigma w)_i$ is the $i_{th}$ entry in the vector $\Sigma w$. Note ...

4

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 ...

3

You should be able to do this with the fitdistr function in the MASS package. You will certainly be able to hold the mean and variance constant, but I'm less sure about skewness and kurtosis (they would need to be arguments to the density function). The actuar package may also be useful, as it contains additional density functions.

3

I reproduced Ledoit and Wolf's experiment outlined in their paper "Honey I Shrunk the Covariance Matrix" in Python which includes an implementation of their method to shrink the covariance matrix (can be found here see the get_shrunk_covariance_matrix() method on line 417). All the code for the entire thing is on Github here. I make use of the cvxopt module ...

3

I know this is an old question, but Wes McKinney, the developer of pandas (mentioned in another answer) is releasing a new Python package called RapidQuant that I think might meet the OP's stated needs. It appears to include both non-standard risk definitions and portfolio optimization. However, it is not open source. While the OP didn't specifically mention ...

3

Mean-Variance optimization is the standard finance answer to this question. However, solutions can be costly since the weights will likely be dispersed across many instruments raising fixed transactions costs. I would consider Sparse PCA as another solution where you can specify cardinality constraints on the number of securities in your basket to better ...

3

Here is a link to a paper with concrete details of calculating the hedge ratio for your position: http://quanttrader.info/public/betterHedgeRatios.pdf. Certainly, you want to check that it is reasonable to hedge one position with the other, as Freddy warns. But assuming it is, the paper suggests that using total least squares is better than using ordinary ...

3

The Portfolio Analytics package of R is an excellent package that can perform non-parametric portfolio optimization: https://r-forge.r-project.org/R/?group_id=579

3

You can use Michaud's Resampled Efficient Frontier as a technique, or Atillio Meucci's Entropy Pooling. In Michaud's approach you can sample returns with replacement for each of your assets. Based on these draws you can calculate the expectations, variances, and covariances for each simulation. You can then construct, say, a 1,000 efficient frontiers and ...

3

Have a look at fPortfolioBacktest. An example can be found here: https://r-forge.r-project.org/scm/viewvc.php/pkg/fPortfolioBacktest/man/portfolioBacktesting.Rd?view=markup&revision=4086&root=rmetrics Edit: you may want to try backtestPlot(smoothedPortfolios) to visualise the strategy performance.

3

I did not look at the data, but recall that beta is a parameter in the following equation: $$r_A = \alpha + \beta r_B + \epsilon$$ relating two returns (random variables, samples) $r_A$ and $r_B$. To calculate beta you peform $$\beta = \frac{cov(r_A,r_B)}{var(r_B)}.$$ Thus if assets $A$ and $B$ exchange roles, then only the denominator changes. In your ...

3

It's probably easiest to think about it in terms of a covariance matrix and then convert it to a correlation matrix after. If instead of the first matrix you have some covariance matrix of the assets $\Sigma$, then you could get the portfolio variance, for one portfolio, as $w' \Sigma w$, where you could have $w\equiv\left(w_{1},w_{2},w_{3}\right)'$. ...

3

First the easy solution: Define the continuous weights of each asset: $w_i \in [0,1],i=1,\ldots,N$ and choose some meaningful lower bound for each weight. Then you have the objective $$w\mu - \lambda w^T \Sigma w \rightarrow Max,$$ all your constraints that you already apply and the additional (linear/box) constraint $$w_i \ge l, i=1,\ldots,N.$$ ...

3

Black Litterman might be a good solution to your problem, since it suffers less from corner solutions (concentrated portfolios). You already have active views in the form of return expectations, and you can control the confidence in your views explicitly; see for example Meucci's Risk and Asset Allocation chapter 9.2 for a description. Since you have a ...

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