12

Yes, you need Cholesky factorization. You can find the general idea here: http://www.goddardconsulting.ca/option-pricing-monte-carlo-basket.html Plus the implementation in MATLAB here: http://www.goddardconsulting.ca/matlab-monte-carlo-assetpaths-corr.html The code in general should be easily translatable. The only difficulty is the Cholesky factorization ...


9

For years, I performed this brute-force search daily on my universe of tradable stocks and futures. It is a waste of time. If your computer discovers that hog futures and MSFT are cointegrated, for example, do you really care? I would never trade that pair. There is no economic connection between hogs and Microsoft, so I must assume that the reported, small ...


8

Theoretically, the answer to the question is yes, a correlation matrix for potential pairs trades can be computed in $O\left((n^2t)^{(\omega+\epsilon)/3}\right)$ time, for any $\epsilon > 0$, where $\omega < 2.38$ is the so-called exponent of matrix multiplication. However, these algorithms have a reputation for having a very large constant factor ...


7

First of all, I am not sure what you mean by the ratio in your second point. However, I will try to give you a partial answer at least. There is a very comprehensive overview of these by EDHEC, page 4. What is particularly interesting is that they give you conditions under which these diversification portfolios are optimal in a classical/sharpe ratio sense. ...


4

He is forced to use some tricks because Excel can only take average of a rectangular area, but he wants the avg of upper non-diagonal elements of the matrix only. So he subtracts $\frac{1}{n}$ (the average of the 1's on the diagonal), then scales the result by $\frac{n^2}{n(n+1)/2}$ which is the number of total elements divided by on-or-below-diagonal ...


4

For ex-ante tracking error, you need a forecast covariance matrix $C$. Then the quantity you require is $\sqrt{w^{T}Cw}$, where $w$ is a vector of excess weights relative to the benchmark. You can construct a forecast covariance matrix from realized covariances if you think historical relationships will persist, or you use other methods, for example factor ...


4

No, because correlation is a unitless quantity. As you use volatilities to do the scaling, the $\sqrt{252}$ factor should already be taken into account in them. If you take a correlation of 1 between two assets, multiplying your correlation matrix by a factor $C \neq 1$ risks either to underestimate correlations (by hiding perfect (anti)correlations) or have ...


3

I do not understand why t is zero in B(t,t) and 1,2,3,4 in B(i,t). And why did you interprete the value B(i,t) as the inverse of C, but not B(t,t)? I think B(i,t) is the first column of I. An inverse is defined by Matrix^-1. But, B(*) is a value. So, you should divide by B(t,t). Here, you multiplicate it.


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

How about an O(N log(n)) solution ? To be a viable trading strategy, you often expect them variances to be similar, so just calculate ordinary volatility and put it in an ordered array. Of course that's going to be period dependent, so pick a few arbitrary periods and see which instruments end up being together. Then you get clusters of vastly smaller ...


3

I think Cholesky on correlation matrix is better because it makes code apply more generally in case we don't have full rank. For example, suppose we want to simulate three correlated normals with covariance matrix [[a^2,0,0], [0,b^2,0], [0,0,c^2]] i.e. variables are uncorrelated and have vols a, b, and c. Because this is positive definite, we can do ...


3

You can use the either, as both necessarily are symmetric positive definite; covariance is a personal preference. It's really just a matter of scaling, as $\mathcal{N}(0,\Sigma)$ is distributionally $\sqrt{\Sigma} \mathcal{N}(0,1) $. Correlation would require additional scaling (i.e. multiplication of every $\mathcal{N}(0,\rho)$ element by its respective ...


3

There is nothing wrong mathematically (nor ethically) with this objective function. However, this objective is weird in a couple of ways. First, there is no weighting on these which implies you prefer to minimize these terms in accordance with their orders of magnitude. As has been pointed out, the correlation term is likely much larger so your optimization ...


2

I am not an expert in this field, but it would be best to consider a full multivariate GARCH model. This paper by Engle and Sheppard should be a good start. I think the constant correlation matrix approach is covered to a certain extent too. I hope this helps.


2

I had to answer because of your name, and becaue I deal with portfolio optimization often. In my world of equities correlation does matter a lot. If one follows the thoughts e.g. here then it matters most. I deal with minimum-variance construction (no expected return, of course some constraints on the weights) and there I often see positions that come ...


2

See "Some hypothesis tests for the covariance matrix when the dimension is large compared to the sample size" by Ledoit and Wolf. http://projecteuclid.org/DPubS?service=UI&version=1.0&verb=Display&handle=euclid.aos/1031689018


2

Your issue demonstrated in R with interesting solution Equity Risk Model Using PCA. Another useful link in Matlab by Nick Higham himself NCM implementation by Nick Higham written for Matlab. Another good discussion on shrinkage and other aspects of Correlation Adjustment


2

There is a wide knowledge on correlation estimation, see other questions and answers: principal component analysis (PCA) - Equity Risk Model Using PCA random matrix theory (RMT) - Cleansing covariance matrices via Random matrix theory or Random matrix theory (RMT) in finance shrinkage - Portfolio Optimization : Shrinkage of Covariance Matrix when data is ...


2

You have the risk factor $F$ and the asset that it is correlated to $r_m$. You can calculate the variances of each of these, say $\sigma^2_F$ and $\sigma^2_m$. If you do not care about the distribution but just work with variances and correlations then can look at an OLS setting: $$ F = \beta r_m + \epsilon $$ with $\beta = \rho \frac{\sigma_F}{\sigma_m}$ ...


2

If you look at changes of the points on the yield curve, then you probably find something stationary - right? Applying PCA on the covariance of these changes makes sense. E.g. you will find out that on PC describes a parallel shift (a change in the yield curve). Look at this question too: What do eigenvalues/eigenvectors of the yield/forward rates ...


2

There is a vast literature on modelling time-series with periodcities. Rob Hyndman is one of the leading reseaerchers in this area. He has published the R package forecast and a free online text book on this subject (with another package and R code in the book). Your task is covered starting here.


2

I don't know how common this is, but I've seen it done. Many risk model vendors (Northfield, Axioma) allow the blending of different risk models with different periodicity (e.g. a shorter horizon risk model blended with a longer horizon risk model). Here's a Northfield deck about this: https://www.northinfo.com/documents/779.pdf


1

Here are the steps:- 1.First you need to calculate the historical return series for your portfolio from the historical return series for each fund by adding the returns for each fund on a daily basis taking weights into consideration. 2. Calculate the historical return series for your benchmark. 3. Calculate the difference between the returns of your ...


1

As other answers have pointed out, you cannot in general impose any arbitrary correlation structure on your samples. But you can try to rearrange your new sample in such a way that you get as close as possible to the desired correlation. The idea is this: given your existing samples, generate a new one with the desired marginal distribution. Suppose you ...


1

As Richard says, this is really hard to do in a general setting. But if we make extra assumptions about the distribution of the variables, it might be doable. Assume for instance that your variables are following a multivariate normal distribution. This is interesting because The distribution is characterized exclusively by the means, variances and ...


1

I think it is hard to add a random variable $X$ with a predefined correaltion to a whole sample $(X_1, \ldots, X_n)$ because this would mean that you have to define relations to each of the $n$ existing rvs which could be infeasible. A partial answer is the following: For a random variables $X$ and $Y$ uncorrelated with variance $1$ you can do the following....


1

Why you don't just do a least square regression ? It is likely not stable no ?


1

If I understand correctly what you are after is the marginal volatility contribution of a single asset to the portfolio. This is given by $$ \sigma(X_j;X) = \sigma(X_j)\ \rho(X_j, X) $$ See here for details.


1

You will need the covariance matrix to calculate this. Say you have a collection of $n$ assets. The value of asset $i$ is represented by the random variable $X_i$ and the corresponding portfolio weight is are $w_i$, and $v_i$ for the two portfolios. The correlation between the two portfolios is: $$ \frac{\sigma(w^TX,v^TX)}{\sqrt{(w^T\Sigma w)(v^T\Sigma v)...


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