Description Usage Arguments Details Value
View source: R/mean_variance.R
For continuous time market of GBMs, the log optimal portfolio is given by a quadratic programming problem.
1 2 3 4 5 6 7 8 | kelly_portfolio(
log_ret,
rate = 0,
bankroll = 1,
direction = "long",
sample_mean = NULL,
sample_cov = NULL
)
|
log_ret |
the data-set of (daily) arithmetic returns. Assumes it is a matrix with colnames of tickers |
rate |
the rate earned on cash in a money market account, etc |
bankroll |
percentage of wealth to bankroll |
direction |
the direction of the bet: long or short |
sample_mean |
the mean vector, optional |
sample_cov |
the covariance matrix, optional |
The function estimates the entire sample set for mean returns and covariance and then runs the optimization routine by calling solve.qp from quadprog package.
list of growth rate and optimal portfolio
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.