Description Usage Arguments Details Value Author(s) References See Also Examples
Input an object of class "stockReturns"
and select a model. Available choices are "none"
, "SIM"
(single index model), "CCM"
(constant correlation model), and "MGM"
(multigroup model).
1 2 3 4 5 |
stockReturns |
An object of class |
drop |
Declare any stocks to be dropped. For instance, if the model |
Rf |
The risk free rate of return, which must be standardized for the period (e.g. a 2% yearly rate for monthly data would imply |
shortSelling |
Either |
model |
Either no model ( |
industry |
A character or factor vector containing the industries corresponding to stockReturns. This argument is optional except when |
index |
When using |
get |
|
freq |
The time period between each stock return. Default is |
start |
Start date in the format |
end |
End date in the format |
recentLast |
Set this argument to |
rawStockPrices |
Set to |
The multigroup model is the least known of the models presented here. It is similar to the constant correlation model, except that instead of assuming a constant correlation across all stocks, correlations are only dependent on the industry of a stock.
If stocks are dropped using the argument drop
, then index
must correspond to the position of the index AFTER those stocks are dropped. For instance, if there are seven stocks, the index is in position six, and the fourth stock is dropped, then we should use index=5
.
stockModel
outputs an object of class "stockModel"
, which is a list of the following items, many of which might be NA
:
model |
The model selected. |
ticker |
A vector of the tickers of the stocks included in the model. |
index |
The index number, if provided by the user. |
theIndex |
Ticker of the index. |
industry |
Industries associated with the stocks. |
returns |
Return data used to build the model. |
marketReturns |
Return data of the index. |
n |
Number of observations per stock. |
start |
The oldest date for which stock returns are included. |
end |
The most recent date for which stock returns are included. |
period |
How frequently stock returns are included in the data. |
R |
Average returns of the stocks. |
COV |
Variance-covariance matrix of the stock returns. |
sigma |
Standard deviation of the returns of the stocks (square root of the diagonal of |
shorts |
Whether short sales are allowed. |
Rf |
Risk free return rate. |
alpha |
Vector of intercepts in the linear model for the single index model. |
vAlpha |
The square of the standard errors of |
beta |
Vector of coefficients in the linear model for the single index model. |
vBeta |
The square of the standard errors of |
betaAdj |
Whether the model was adjusted via |
MSE |
Variance of error term associated with single index model for each stock. |
RM |
Mean market return. |
VM |
Variance of the market return. |
rho |
Mean correlation or, if using |
David Diez and Nicolas Christou
Markowitz, Harry. "Portfolio Selection Efficient Diversification of Investments." New York: John Wiley and Sons, 1959.
Elton, Edwin, J., Gruber, Martin, J., Padberg, Manfred, W. "Simple Criteria for Optimal Portfolio Selection," Journal of Finance, XI, No. 5 (Dec. 1976), pp. 1341-1357.
Elton, Edwin, J., Gruber, Martin, J., Padberg, Manfred, W. "Simple Rules for Optimal Portfolio Selection: The Multi Group Case," Journal of Financial and Quantitative Analysis, XII, No. 3 (Sept. 1977), pp. 329-345.
Elton, Edwin, J., Gruber, Martin, J., Padberg, Manfred, W. "Simple Criteria for Optimal Portfolio Selection: Tracing Out the Efficient Frontier," Journal of Finance, XIII, No. 1 (March 1978), pp. 296-302.
getReturns
, adjustBeta
, optimalPort
, testPort
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #===> build four models <===#
data(stock99)
data(stock94Info)
non <- stockModel(stock99, drop=25, model='none', industry=stock94Info$industry)
sim <- stockModel(stock99, model='SIM', industry=stock94Info$industry, index=25)
ccm <- stockModel(stock99, drop=25, model='CCM', industry=stock94Info$industry)
mgm <- stockModel(stock99, drop=25, model='MGM', industry=stock94Info$industry)
#===> build optimal portfolios <===#
opNon <- optimalPort(non)
opSim <- optimalPort(sim)
opCcm <- optimalPort(ccm)
opMgm <- optimalPort(mgm)
#===> test portfolios on 2004-9 <===#
data(stock04)
tpNon <- testPort(stock04, opNon)
tpSim <- testPort(stock04, opSim)
tpCcm <- testPort(stock04, opCcm)
tpMgm <- testPort(stock04, opMgm)
#===> compare performances <===#
plot(tpNon)
lines(tpSim, col=2, lty=2)
lines(tpCcm, col=3, lty=3)
lines(tpMgm, col=4, lty=4)
legend('topleft', col=1:4, lty=1:4, legend=c('none', 'SIM', 'CCM', 'MGM'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.