Description Usage Arguments Details Value Note References Examples
approximates the Universal Portfolio Algorithm by Cover, 1991
1 |
returns |
Matrix of price relatives, i.e. the ratio of the closing
(opening) price today and the day before (use function
|
method |
The method used to calculate UP. " |
... |
further arguments ( |
For the "approx
" method the calculation may require very much
memory dependend on the number of assets and the "step
" argument.
If an error occurs due to memory problems the "rand
" method may work.
Object of class OLP containing
Alg |
Name of the Algorithm |
Names |
vector of asset names in the portfolio |
Weights |
calculated portfolio weights as a vector |
Wealth |
wealth achieved by the portfolio as a vector |
mu |
exponential growth rate |
APY |
annual percantage yield (252 trading days) |
sigma |
standard deviation of exponential growth rate |
ASTDV |
annualized standard deviation (252 trading days) |
MDD |
maximum draw down (downside risk) |
SR |
Sharpe ratio |
CR |
Calmar ratio |
see also print.OLP
, plot.OLP
The print method for OLP
objects prints only a short summary.
Cover & Ordentlich 1991, Universal Portfolios. Mathematical Finance, 1991, 1, 1-29
Ishijima 2001, Numerical Methods for Universal Portfolios http://www.business.uts.edu.au/qfrc/conferences/qmf2001/Ishijima_H.pdf
1 2 3 4 5 6 7 8 9 10 | # load data
data(NYSE)
# select stocks
returns = cbind(comme=NYSE$comme, kinar=NYSE$kinar)
# compute Universal Portfolio algorithm
UP_rnd = alg_UP(returns, method="rand", samplings=1000); UP_rnd
UP_approx = alg_UP(returns, method="approx", step=0.05); UP_approx
plot(UP_rnd, UP_approx)
plot(UP_approx$Weights[,1], type="l")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.