Description Usage Arguments Value Author(s) Examples
Compute the tangency portfolio weight which maximizes sharpe ratio based on Quadratic Programming Algorithm. Short sale constraint could be used. Lower and upper bound for each asset could not be implemented by this function. Please refer to 'TangencySQ' to implement lower and upper boundary for weight.
1 | TangencyQP(ret, covmat, short = TRUE, rf = 0, freq)
|
ret |
a vector stores mean return of assets (N x 1). A vector should store daily, monthly or quarterly return. |
covmat |
a matrix stores covariance matrix of asset returns. A matrix should be scaled by daily, monthly or quarterly return alligned with 'ret' vector. |
short |
a boolean stores TRUE for short sale constraint or FALSE for no constraint |
rf |
a scalar store annualized risk free rate |
freq |
a string stores frequency used by ret and covmat. It should be "daily", "monthly" or "quarterly" |
Return a list with the following slots
TangencyWeight |
A vector of asset weights |
portfolioret |
A scalar of tangency portfolio return (annualized) |
portfoliosd |
A scalar of tangency portfolio standard deviation (annualized) |
sharpeRatio |
A scalar of sharpe ratio of tangency portfolio (annualized) |
Thanh Nguyen Minh
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.