# Understanding Cover's Universal Portfolio Algorithm

I am trying to implement the Universal Portfolio algorithm strategy inspired by the paper by Professor Cover from Stanford.

At the moment I am trying to understand the underlying logic of the algorithm. My goal is to implement the algorithm using 8 ETFs (classified into 3 categories: Equities, Fixed Income and Commodities), to represent the "market".

My understanding is that the strategy, based on historical returns, evaluates every possible portfolio with every possible combination of weights and calculates the return of each.

Then the universal portfolio is the portfolio that is the weighted average of all these possible portfolios, weighted by their performance.

To implement this, here is a summary of my steps:

• Gather 1-year worth (252 trading days) worth of historical prices
• Calculate percentage returns
• At this stage, I would compute the integral of wealth across all portfolios to generate the weight

At this stage, I am a bit lost - How would I derive the weights for each asset for rebalancing the portfolio?

Is there any statight forward shortcut to compute the weights? (For reference, I am planning on implementing this in Python

Thanks :)

Paper for reference:

• Interesting question. Another, related, question is "how much data do you need". I suspect (though I have never seen it discussed) that 1 year is far too little. – Alex C Apr 1 '18 at 22:04
• @AlexC Per my understanding, the algorithm uses the past years data to select the initial asset weights. After that, it periodically rebalanced based on the new price movements. So I think one year's worth of data might be enough for initial set up – Guest Apr 1 '18 at 22:10