Google Answers Logo
View Question
 
Q: An Algorithm for Maximizing Expected Log Investment Return by Prof T Cover ( No Answer,   6 Comments )
Question  
Subject: An Algorithm for Maximizing Expected Log Investment Return by Prof T Cover
Category: Science > Math
Asked by: erdman-ga
List Price: $25.00
Posted: 25 Jan 2006 15:39 PST
Expires: 31 Jan 2006 15:03 PST
Question ID: 437639
I am trying to understand and employ the practical usage of the
algorithm described in Prof Thomas M. Cover's paper from March 1984
entitled "An Algorithm for Maximizing Expected Log Investment Return."
 That paper is here: 
http://yreka.stanford.edu/~cover/papers/transIT/0369cove.pdf

While this is a finance concept, I have posted to Science->Math
because virtually no MBA (like me) is smart enough to understand what
the heck this paper is saying.  I am hoping a math guru can provide a
lay explanation of the implications of the paper.  I am not
particularly interested in the proofs ... I am interested in
implementing his algorithm.

My understanding from the reading of the paper is that it is an
iterative, recursive algorithm.  This suggests to me that an Excel
spreadsheet could easily be created to implement the algorithm,
row-by-row for each iteration, until the portfolio weightings
converge.  I tried creating such a spreadsheet for the two-"stock"
(one of them is cash) example he gives on p. 370, but I could not get
the weightings to converge, especially if I start with any non-zero
weightings other than 50/50.  I must be doing something wrong.

So, the Question is ... how do I create an Excel spreadsheet to
implement the algorithm?  A description would suffice; a sample
spreadsheet would be better.  In answering this question, please also
describe what information re each stock available to the portfolio is
required -- expected return, std deviation, covariance matrix?

As a start, I would like to have a spreadsheet showing how his
algorithm converges the portfolio weightings to 50/50 for the
two-stock example portfolio referenced above, where the initial
weightings are NOT 50/50.  I would also like to understand how this
could then be generalized to an n stock portfolio.

Thank you very much.

Clarification of Question by erdman-ga on 25 Jan 2006 15:42 PST
If my pre-supposition that the algorithm could be implemented in Excel
is incorrect, what would be the most expeditious way to implement it?
Answer  
There is no answer at this time.

Comments  
Subject: Re: An Algorithm for Maximizing Expected Log Investment Return by Prof T Cover
From: devils_workshop-ga on 26 Jan 2006 01:32 PST
 
What the algorithm does is maximise the objective function, which is
the profit in this case.

I will assume that you just want to know how to implement the
algorithm in excel and don't want to know the theory. The data that
you will need are

The cost function W(f). In the example, W(f) is written out as a
function of b1 and b2. Of this b1 can be evaluated from b1 as b1 + b2
= 1. So the whole function is replaced in terms of b2 and the
derivative is found as alpha(f). This value of alpha is then used to
evaluate the next guess for b2 (and hence b1 as it is just 1 - b2).
This goes on till it converges.

How to do this in excel:
Lets name the 4 columns b1 b2 W alpha.
Fill in some initial value for b2
Put b1 as 1 - b2
Plug in the equations of W and alpha.

b1                      b2               W              alpha
(1-b2) = 0.75         0.25            0.044806079       0.971428571

For the next step evaluate b2 as b2(previous)*alpha(previous)
Put b1 as 1 - b2.
Evaluate W and alpha and so on
b1              b2              W               alpha
0.25	        0.75	        0.044806079	0.971428571
0.271428571	0.728571429	0.047144625	0.971770824
0.291995543	0.708004457	0.04918324	0.972476805
0.311482088	0.688517912	0.050930925	0.973483411
0.329739234	0.670260766	0.05240772	0.974722481
0.346681764	0.653318236	0.053640377	0.976127199
0.3622783	0.6377217	0.054658703	0.977636552
0.376539956	0.623460044	0.055492797	0.979197905
0.38950923	0.61049077	0.056171195	0.980768017
0.401250179	0.598749821	0.056719802	0.982312951
0.411840296	0.588159704	0.057161387	0.983807302
0.421364188	0.578635812	0.057515495	0.985233054
0.429908872	0.570091128	0.057798598	0.98657834
0.437560441	0.562439559	0.058024389	0.987836221

So b1 and b2 converge exponentially, and W is maximised.
Subject: Re: An Algorithm for Maximizing Expected Log Investment Return by Prof T Cover
From: devils_workshop-ga on 26 Jan 2006 01:34 PST
 
If you want the excel file or have other questions just add them here
and I will get back to you.
Subject: Re: An Algorithm for Maximizing Expected Log Investment Return by Prof T Cover
From: erdman-ga on 26 Jan 2006 10:34 PST
 
Devil?s, that is Progress, thanks.  I was able to reproduce exactly
what you have done here.  What I had done previously was to create a
long random string of ½?s and 2?s, with each equally likely occurring.
 At each iteration, I generated the ?expected portfolio induced by one
play of the market X? as he describes at the top of p. 370.  This did
not cause b1 and b2 to converge on anything.

However, what I was really hoping to come away with was how I could
use his algorithm on a real set of stocks.  Unfortunately, his example
is over-stylized.  In reality, I think the wealth function would look
like this:

W(b) = ln(b1*X1 + b2*X2 + ? + bn*Xn)

where b1 + b2 + ? + bn = 1 and where X1, X2, ? Xn are normally
distributed random variables with known means, std dev?s, and
covariances.  (I think this is approximately what Cover?s paper says
in the first paragraph of the introduction.)

Any ideas how to solve for the b?s with a given set of X?s using his algorithm?
Subject: Re: An Algorithm for Maximizing Expected Log Investment Return by Prof T Cover
From: devils_workshop-ga on 26 Jan 2006 17:14 PST
 
If you assume that the stocks vary like a standard normal distribution
with a known mean and sd, then you should be able to write out an
analytical expression for W(b1,b2...bn) which you can evaluate for a
particular b. From this the gradient, alpha can be obtained
numerically by a small perturbation.

for eg. to get the first component of alpha you can use
 (W(b1+h,b2,...bn) - W(b1,b2,...bn))/h. You can take a very small h
(0.001 for example), to get a reasonable value of each compenent of
alpha. The the new b1(n+1) = b1(n)*alpha(1) = b1(n)*(W(b1+h,b2,...bn)
- W(b1,b2,...bn))/h.

As long as the profile of the stocks, (the mean, sd and co-variance)
are fixed, the iteration scheme will converge (mostly) to the same
optimum portfolio. The toughest and most time consuming part would be
to sit and write out an analytical expression for W and is definitely
take more that $25 ;-). I suppose you would need something other than
excel, but still the problem isn't too daunting.

(You also have to note that in any optimisation algorithm, the
starting points will determine if you will converge or it will
diverge. But I am assuming that for a physically well defined problem,
all starting points should converge to the same optimum profile)
Subject: Re: An Algorithm for Maximizing Expected Log Investment Return by Prof T Cover
From: erdman-ga on 26 Jan 2006 23:57 PST
 
At the end of p.369, he discusses "when we ran this algorithm on
actual stock market data ..."  I don't see how one could express the
Wealth function W(b) in anything but either actual historical stock
data or one containing random variables as in my previous comment
(except in the stylized example he used.)  Even though I don't know
what I'm talking about, I strongly suspect there is an easier/better
way to use the algorithm than to have a mathematician derive a new
formula for W and alpha for each specific use.  Would Monte Carlo
simulation be useful for finding the b's?
Subject: Re: An Algorithm for Maximizing Expected Log Investment Return by Prof T Cover
From: devils_workshop-ga on 28 Jan 2006 09:06 PST
 
hmm...You could use the previous history of the stock values to form a
random variable. In fact, I assume that it would have been done for
most market stocks and the correlations with other stocks in related
areas also evaluated. Once you have this, it isn' that tough to create
an analytical W(x). When I meant that you need to construct the
function, I assumed you would know where to get the mean and SD and
corelation factors (from some mutual fund company) which would
definitely be obtained using the history of the stock.

I don't know enough of Monte Carlo methods to tell you if they would work or not.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy