17
$\begingroup$

I need to calculate the skewness of a portfolio consisting of 6 assets. I know that for that I would need the co-skewness matrix between the assets. Does anybody know the formula for co-skewness or any simple software to calculate a co-skewness matrix?

Any useful information would be highly appreciated.

$\endgroup$
3
  • $\begingroup$ please, anyone, can anyone tell me where can I find derivation of formula for portfolio skewness and kurtosis? I can find formulas everywhere, but how did they get like that? $\endgroup$
    – user2571
    Jun 17, 2012 at 18:06
  • 2
    $\begingroup$ @mary you should really add a new question if you think it is on topic. $\endgroup$
    – Bob Jansen
    Jun 18, 2012 at 8:10
  • 1
    $\begingroup$ For an Excel and VBA implementation with open source code see here $\endgroup$
    – purbani
    Mar 2, 2014 at 23:03

4 Answers 4

14
$\begingroup$

Actually, co-skewness is represented by a rank 3 tensor, rather than a matrix.

I'm going to reproduce the formulation from Bhandari and Das, Options on portfolios with higher-order moments, but I'll add and omit some details.

The co-skewness tensor is $$ S_{ijk} = E \left[ r_i \times r_j \times r_k \right] = \frac{1}{T} \sum_{t=1}^T r_i(t) \times r_j(t) \times r_k(t) $$ where $r$ are asset returns over $T$ time periods.

Then, given portfolio weights $w$, mean asset returns $\mu$, covariance matrix $\Sigma$, and portfolio variance $\sigma_p^2(w) = w\prime \Sigma w$, we calculate moments: $$\begin{eqnarray*} m_1 & = & w\prime \mu \\ m_2 & = & \sigma_p^2 + m_1^2 \\ m_3 & = & \sum_{i=1}^N \sum_{j=1}^N \sum_{k=1}^N w_i w_j w_k S_{ijk} \end{eqnarray*}$$

The portfolio skewness is then $$ S_p = \frac{1}{\sigma_p^3} \left[ m_3 - 3m_2 m_1 + 2m_1^3 \right] $$

In the case of a 6-asset portfolio, the co-skewness tensor will contain 216 components; however, due to symmetry, it only contains 56 independent components.

Therefore, it can be helpful to reformulate the portfolio skewness equation for computational efficiency. To do this, we can start with the definition of skewness for portfolio returns, $$ S_p = \frac{1}{\sigma_p^3} E [ \left( \sum_{i=1}^N w_i r_i \right)^3 ] \quad , $$

and then apply the multinomial theorem to obtain the portfolio skewness in terms of only the independent components.

Update

  • Especially for longer time series, the return moments should be centered on the means, i.e., $r_i = R_i - \bar{R}_i$
  • In the case of daily returns, $R_i(t) = \frac{P(t) - P(t-1)}{P(t-1)}$, where $P(t)$ is the closing price at time $t$.
  • Be sure the prices for returns are comparable from period to period. For example, stock prices may need adjustments to account for dividend payments. See this Q & A on return measurement for more discussion.

note: I edited the equation for the co-skewness tensor above.

$\endgroup$
6
  • $\begingroup$ Thank you it is really useful.. One difference in return calculation I calculated returns as R(t)= Ln(P(t)-ln(P(t-1)).. hope this will not affect overall result.. Thank you for your detailed explanation.. $\endgroup$
    – Pasha
    Aug 8, 2011 at 15:30
  • $\begingroup$ One more thing what about correlations between assets? should they be considered in skewness of portfolio?? $\endgroup$
    – Pasha
    Aug 9, 2011 at 13:47
  • $\begingroup$ Correlations aren't needed explicitly, but come into play in calculating the m_2 moment. A covariance matrix is used to calculate the portfolio variance, sigma_p^2. Covariance_ij = Correlation_ij * sigma_i * sigma_j $\endgroup$ Aug 9, 2011 at 14:58
  • $\begingroup$ Thank you for your quick reply in this paper "improved estimates of higher-order comoments and implications for portfolio selection" by Lionel Martellini, Volker Ziemann as I understand they use correlations and calculate them differently...( if you just search the name of the paper in google it is second one offered by the google, sorry I don't now hot to cite paper in the comment. Regards, Pasha $\endgroup$
    – Pasha
    Aug 9, 2011 at 17:46
  • $\begingroup$ I've just taken a quick look. The differences in the correlations (co-moments) in that paper are that it presents an estimator that uses constant co-moments, which greatly reduces the dimensionality of the problem for large portfolios. $\endgroup$ Aug 9, 2011 at 23:53
2
$\begingroup$

Have a look at PortfolioAnalytics in R.

> library(PerformanceAnalytics)
> data(managers)
> CoSkewness(managers, managers)
$\endgroup$
2
$\begingroup$

Maybe you like working with coskewness. But it is not needed if you just want to estimate the skewness of the portfolio. If you have retunr times serise $(r^i_t)_{t=1}^T$ for each asset $i$ and the weights $w_i$ that these assets have in your portfolio then you can form $$ r_t = \sum_{i=1}^6 w_i r^i_t \quad \text{for each } t, $$ and you simple estimate all moments on $(r_t)_{t_1}^T$. The solution will be the same as any matrix operation. Eg the variance is either $$ VAR(r_t) $$ or equivalently (!) $$ w^T \Sigma w $$ where $\Sigma$ is the covariance matrix of those 6 assets. The numbers will be the same. If you need comoments then you do so by using expressions of the form $$ E[r_t^k*(r_t^i)^m], $$ for some integer $k$ and $m$.

$\endgroup$
0
$\begingroup$

Happened to get stuck in this problem years ago. Don't need to use co-skewness or any co-moments to calculate the variance, skewness, and kurtosis of a portfolio. Just use the raw returns of the assets and the weights. This optimization can be implemented in Excel, R (using nonlinear) and Python (nonlinear or minimize with scipy).

$\endgroup$
1
  • 1
    $\begingroup$ please deal your answer (or send it as a comment), the "reach out if needed" is not needed. $\endgroup$
    – lehalle
    Jan 21 at 4:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.