Compute a Tracking Portfolio
Computes a portfolio similar to a benchmark, e.g. for tracking the benchmark's performance or identifying factors.
trackingPortfolio(var, wmin = 0, wmax = 1, method = "qp", objective = "variance", R)
var |
the covariance matrix: a numeric (real), symmetric matrix. The first asset is the benchmark. |
R |
a matrix of returns: each colums holds the returns of one asset; each rows holds the returns for one observation. The first asset is the benchmark. |
wmin |
numeric: a lower bound on weights. May also be a vector that holds specific bounds for each asset. |
wmax |
numeric: an upper bound on weights. May also be a vector that holds specific bounds for each asset. |
method |
character. Currently, |
objective |
character. Currently,
|
a numeric vector (the portfolio weights)
Enrico Schumann
Gilli, M., Maringer, D. and Schumann, E. (2019) Numerical Methods and Optimization in Finance, 2nd edition. Elsevier. https://www.elsevier.com/books/numerical-methods-and-optimization-in-finance/gilli/978-0-12-815065-8
Schumann, E. (2020) Financial Optimisation with R (NMOF Manual). http://enricoschumann.net/NMOF.htm#NMOFmanual
Sharpe, W. F. (1992) Asset Allocation: Management Style and Performance Measurement. Journal of Portfolio Management. 18 (2), 7–19. https://web.stanford.edu/~wfsharpe/art/sa/sa.htm
ns <- 120 R <- randomReturns(na = 1 + 20, ns = ns, sd = 0.03, mean = 0.005, rho = 0.7) var <- cov(R) sol.qp <- trackingPortfolio(var, wmax = 0.4) sol.ls <- trackingPortfolio(var = var, R = R, wmax = 0.4, method = "ls") data.frame(QP = round(100*sol.qp, 1), LS = round(100*sol.ls, 1)) sol.qp <- trackingPortfolio(var, R = R, wmax = 0.4, objective = "sum.of.squares") sol.ls <- trackingPortfolio(var = var, R = R, wmax = 0.4, method = "ls", objective = "sum.of.squares") data.frame(QP = round(100*sol.qp, 1), LS = round(100*sol.ls, 1))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.