Tag Info

Hot answers tagged

14

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


12

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


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

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


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

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

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)'$. ...


2

This blog post just came out: http://www.portfolioprobe.com/2011/02/08/4-and-a-half-myths-about-beta-in-finance/


2

In response to your last question, "how do you use beta?" - I'd say try to as little as possible. Your use seems to be a bit out of the realm of what I'm used to, but whatever beta you get is so prone to observational error, that it may not be meaningful.


2

The plot function is smoothing the plot. You should show the distribution of eigenvalues via a bar chart. Because a bar chart is discrete you can better discern the separation of the top-most eigenvaules. The top-most eigenvalue (representing the market factor) should be substantially greater than bulk of the eigenvalue distribution. I assume by ...


2

I would concur with Chrisaycock if the volatility between two assets is constant, but because it never is I find there are way better approaches. Generally correlations fly all over the map once things start to become interesting in the market, even for generally highly correlating assets. I would look to generate an algorithm that can determine a range of ...


2

There is of course no closed-form formula for this. However, the community has long since worked out what all the distributional moments are. A common use is to get the equivalent lognormal (or sometimes shifted lognormal) distribution to a portfolio (such as your difference). Here's a recent moments paper in which they go so far as to run a binomial tree ...



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