drawFigure {RcmdrPlugin.RiskDemo} | R Documentation |
Efficient frontier and return distribution figures
Description
Plots the efficient frontiers of risky investments and all investments. The optimum points corresponding to the risk aversion coefficient are indicated by dots. Further, the function plots a predictive return distribution figure.
Usage
drawFigure(symbol, yield, vol, beta, r = 1,
total = 1, indexVol = 20, nStocks = 7, balanceInt = 12, A = 10,
riskfree = FALSE, bor = FALSE)
Arguments
symbol |
character vector of the symbols of the risky investments |
yield |
vector of yields (%) |
vol |
vector of volatilities (%) |
beta |
vector of betas (%) |
r |
risk-free interest rate (%) |
total |
total investment (for example in euros) |
indexVol |
volatility of market portfolio (%) |
nStocks |
number of risky investments in the portfolio |
balanceInt |
balancing interval of the portfolio in months |
A |
risk aversion coefficient (see details) |
riskfree |
is risk-free investment included in the portfolio (logical) |
bor |
is borrowing (negative risk-free investment) allowed (logical) |
Details
The function uses the single-index model and Markovitz portfolio optimization model to find the optimum risky portfolio. The returns are assumed to be log-normally distributed. The maximized function is mu - 0.5*A*var where mu is expected return, A is risk aversion coefficient, and var is return variance.
Value
portfolio |
allocation of the total investment (in euros) |
returnExpectation |
expected portfolio return |
returnDeviation |
standard deviation of the portfolio |
Author(s)
Arto Luoma <arto.luoma@wippies.com>
References
Bodie, Kane, and Marcus (2014) Investments, 10th Global Edition, McGraw-Hill Education, (see Section 7.4 The Markowitz Portfolio Optimization Model and Section 8.2 The Single-Index Model).
See Also
Examples
data(stockData, package="RcmdrPlugin.RiskDemo")
with(stockData,drawFigure(symbol=rownames(stockData),yield=divYield,
vol=vol,beta=beta,r=1,total=100,indexVol=10,
nStocks=5,balanceInt=12,A=10,riskfree=TRUE,bor=FALSE))