Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default How to compute SD of portfolio of asset classes?

According to literature, the std dev of a portfolio of asset classes is
computed by:
Sqrt(Sum(Sum(w[i]*w[j]*Covar(X[i],X[j]), j=1,...,N), i=1,...,N)), where
w[i] is the allocation weight factor and X[i] is the historical
%returns for each of N asset classes.

But I believe I can also compute a std dev of the balanced porfolio by:
Stdev(Sum(w[i]*X[i,t], i=1,...,N), t=1,...,M), where X[i,t] is the
%return for each of N asset classes in each of M time periods.

The two results are different, at least empirically. Which one is the
correct one to use? Or when should I use each one for the purpose of
determining the std dev of a portfolio?

That is not really an Excel question. But I know there are a few sharp
folks in this forum who are schooled in statistics and financial
mathematics. I hope to hear from them.

And here __is__ a related Excel question: what is the best way to
formulate the first expression, namely Sqrt(Sum,(Sum(...)...))?

Here is what I did....

Assume that X[i,t] is in C5:L11. That is, C5:L5 is the 10-year
%returns for Class 1; C6:L6 for Class 2; etc for each of 7 asset
classes. Also assume that w[i] is in A5:A11 -- the allocation weight
factors for each asset class. (Of course, Sum(w[i]) = 100%.)

First, in B15:H21, I compute the matrix Covar(X[i],X[j]). Thus,
B15:B21 is Covar(X[1],X[j]), the covariance between the 1st class and
each of the classes; C15:C21 is Covar(X[2],X[j]), the covariance among
the 2nd class and all classes; etc. For example, the following
computes Covar(X[1],X[2]):

=COVAR(C5:L5,$C$6:$L$6)

Then in B23:H23, I compute the array Sumproduct(w[j],Covar(X[i],X[j]),
j=1,...,7) for i=1,...,7. For example, the following computes
Sumproduct(w[j],Covar(X[1],X[j])):

=SUMPRODUCT($A$5:$A$11,B15:B21)

Finally, I compute
Sqrt(Sumproduct(w[i],Sumproduct(w[j],Covar(X[i],X[j], j=1,...,7),
i=1,...,7)) with the following array formula:

={SQRT(SUMPRODUCT(A5:A11,TRANSPOSE(B23:H23)))}

Is all that necessary? Or am I missing another way to perform the
computations that would obviate the need for one or more intermediate
maxtrices?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 837
Default How to compute SD of portfolio of asset classes?

1. The two approaches are mathematically equivalent, provided the variances
and covariances are estimated compatibly in the two approaches. All else
being equal, your empirical difference is likely due to Excel's COVAR()
function being misnamed--in the naming convention of the VAR(), VARP(),
STDEV(), and STDEVP() functions, COVAR() should be called COVARP(); Excel
provides no covariance analog for VAR() and STDEV().

In particular, =COVAR(data,data) gives the same value as =VARP(data), rather
than =VAR(data)

To calculate a covariance analog of VAR() and STDEV(), use either
=COVAR(xdata,ydata)/(1-1/COUNT(ydata))
or
=CORREL(xdata,ydata)*STDEV(xdata)*STDEV(ydata)
The first approach is simpler for your application, since the correction
factor would be the same for all covariances.

2. A simpler approach would be
=SQRT(SUMPRODUCT(A5:A11*TRANSPOSE(A5:A11)*B15:B21) )
It doesn't avoid calculating the variance covariance matrix, but it does
avoid the other intermediates.

Jerry

" wrote:
[i]
According to literature, the std dev of a portfolio of asset classes is
computed by:
Sqrt(Sum(Sum(w[i]*w[j]*Covar(X[i],X[j]), j=1,...,N), i=1,...,N)), where
w[i] is the allocation weight factor and X[i] is the historical
%returns for each of N asset classes.

But I believe I can also compute a std dev of the balanced porfolio by:
Stdev(Sum(w[i]*X[i,t], i=1,...,N), t=1,...,M), where X[i,t] is the
%return for each of N asset classes in each of M time periods.

The two results are different, at least empirically. Which one is the
correct one to use? Or when should I use each one for the purpose of
determining the std dev of a portfolio?

That is not really an Excel question. But I know there are a few sharp
folks in this forum who are schooled in statistics and financial
mathematics. I hope to hear from them.

And here __is__ a related Excel question: what is the best way to
formulate the first expression, namely Sqrt(Sum,(Sum(...)...))?

Here is what I did....

Assume that X[i,t] is in C5:L11. That is, C5:L5 is the 10-year
%returns for Class 1; C6:L6 for Class 2; etc for each of 7 asset
classes. Also assume that w[i] is in A5:A11 -- the allocation weight
factors for each asset class. (Of course, Sum(w[i]) = 100%.)

First, in B15:H21, I compute the matrix Covar(X[i],X[j]). Thus,
B15:B21 is Covar(X[1],X[j]), the covariance between the 1st class and
each of the classes; C15:C21 is Covar(X[2],X[j]), the covariance among
the 2nd class and all classes; etc. For example, the following
computes Covar(X[1],X[2]):

=COVAR(C5:L5,$C$6:$L$6)

Then in B23:H23, I compute the array Sumproduct(w[j],Covar(X[i],X[j]),
j=1,...,7) for i=1,...,7. For example, the following computes
Sumproduct(w[j],Covar(X[1],X[j])):

=SUMPRODUCT($A$5:$A$11,B15:B21)

Finally, I compute
Sqrt(Sumproduct(w[i],Sumproduct(w[j],Covar(X,X[j], j=1,...,7),
i=1,...,7)) with the following array formula:

={SQRT(SUMPRODUCT(A5:A11,TRANSPOSE(B23:H23)))}

Is all that necessary? Or am I missing another way to perform the
computations that would obviate the need for one or more intermediate
maxtrices?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 837
Default How to compute SD of portfolio of asset classes?

"Jerry W. Lewis" wrote:
....
=SQRT(SUMPRODUCT(A5:A11*TRANSPOSE(A5:A11)*B15:B21) )

....

This formula must be array entered despite using SUMPRODUCT(), so you might
as well use SUM() to reduce it to
=SQRT(SUM(A5:A11*TRANSPOSE(A5:A11)*B15:B21))
which also must be array entered.

Jerry
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default How to compute SD of portfolio of asset classes?

Jerry W. Lewis wrote:
1. The two approaches are mathematically equivalent, provided the variances
and covariances are estimated compatibly in the two approaches.


I would never have guessed. (Well, perhaps I should have.) But....

your empirical difference is likely due to Excel's COVAR()
function being misnamed--in the naming convention of the VAR(), VARP(),
STDEV(), and STDEVP() functions, COVAR() should be called COVARP()


Bingo! When I switch to using STDEVP(), just for "proof", the results
are indeed identical. Thank you very much!

To calculate a covariance analog of VAR() and STDEV(), use either
=COVAR(xdata,ydata)/(1-1/COUNT(ydata))
or
=CORREL(xdata,ydata)*STDEV(xdata)*STDEV(ydata)
The first approach is simpler for your application, since the correction
factor would be the same for all covariances.


Yes, but the latter is similar to an alternative mathematical
formulation; and I do have the SDs of the individual asset classes.
Ironically, the Correl() formula is what appears in the literature.
Perhaps now I know why ;-). I shot myself in the foot by "simplifying"
the equation, reducing it to Covar().

2. A simpler approach would be
=SQRT(SUMPRODUCT(A5:A11*TRANSPOSE(A5:A11)*B15:B21) )


After correcting the last term to B15:H21, it works great. Thanks
again! And I was able to do the Correl() formulation similarly,
namely:

=SQRT(SUMPRODUCT(A5:A11*TRANSPOSE(A5:A11), N5:N11*TRANSPOSE(N5:N11),
K15:Q21))

where N5:N11 are the SDs, and K15:Q21 are the CORRELs.

Thanks again for your insights. And Happy New Year!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formulae created from text strings will not compute. Bart Wolf Excel Worksheet Functions 6 November 21st 06 03:01 PM
Need to graph weekly shipments of 3 classes of freight versus plan Paterico Charts and Charting in Excel 0 October 4th 06 05:31 AM
Excel Sorting help [email protected] Excel Discussion (Misc queries) 22 September 9th 06 01:04 AM
Creating a dynamic asset allocation chart humble_t Charts and Charting in Excel 1 July 17th 06 02:41 PM
How to return the Number of shares for a given stock code for a given portfolio aray Excel Discussion (Misc queries) 1 May 18th 06 04:50 AM


All times are GMT +1. The time now is 01:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"