[Returnanalytics-commits] r3583 - in pkg/PortfolioAnalytics: . R man vignettes
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jan 27 04:29:59 CET 2015
Author: rossbennett34
Date: 2015-01-27 04:29:58 +0100 (Tue, 27 Jan 2015)
New Revision: 3583
Added:
pkg/PortfolioAnalytics/man/constraint_ROI.Rd
pkg/PortfolioAnalytics/man/gmv_opt_leverage.Rd
pkg/PortfolioAnalytics/man/pHist.Rd
Modified:
pkg/PortfolioAnalytics/NAMESPACE
pkg/PortfolioAnalytics/R/applyFUN.R
pkg/PortfolioAnalytics/R/charts.DE.R
pkg/PortfolioAnalytics/R/charts.PSO.R
pkg/PortfolioAnalytics/R/charts.RP.R
pkg/PortfolioAnalytics/R/charts.efficient.frontier.R
pkg/PortfolioAnalytics/R/extractstats.R
pkg/PortfolioAnalytics/R/moment.functions.R
pkg/PortfolioAnalytics/R/mult.layer.portfolio.R
pkg/PortfolioAnalytics/R/stat.factor.model.R
pkg/PortfolioAnalytics/man/BlackLittermanFormula.Rd
pkg/PortfolioAnalytics/man/CCCgarch.MM.Rd
pkg/PortfolioAnalytics/man/EntropyProg.Rd
pkg/PortfolioAnalytics/man/HHI.Rd
pkg/PortfolioAnalytics/man/ac.ranking.Rd
pkg/PortfolioAnalytics/man/add.constraint.Rd
pkg/PortfolioAnalytics/man/add.objective.Rd
pkg/PortfolioAnalytics/man/add.sub.portfolio.Rd
pkg/PortfolioAnalytics/man/applyFUN.Rd
pkg/PortfolioAnalytics/man/barplotGroupWeights.Rd
pkg/PortfolioAnalytics/man/black.litterman.Rd
pkg/PortfolioAnalytics/man/box_constraint.Rd
pkg/PortfolioAnalytics/man/center.Rd
pkg/PortfolioAnalytics/man/centroid.buckets.Rd
pkg/PortfolioAnalytics/man/centroid.complete.mc.Rd
pkg/PortfolioAnalytics/man/centroid.sectors.Rd
pkg/PortfolioAnalytics/man/centroid.sign.Rd
pkg/PortfolioAnalytics/man/chart.Concentration.Rd
pkg/PortfolioAnalytics/man/chart.EfficientFrontier.Rd
pkg/PortfolioAnalytics/man/chart.EfficientFrontierOverlay.Rd
pkg/PortfolioAnalytics/man/chart.GroupWeights.Rd
pkg/PortfolioAnalytics/man/chart.RiskBudget.Rd
pkg/PortfolioAnalytics/man/chart.RiskReward.Rd
pkg/PortfolioAnalytics/man/chart.Weights.EF.Rd
pkg/PortfolioAnalytics/man/chart.Weights.Rd
pkg/PortfolioAnalytics/man/check_constraints.Rd
pkg/PortfolioAnalytics/man/cokurtosisMF.Rd
pkg/PortfolioAnalytics/man/cokurtosisSF.Rd
pkg/PortfolioAnalytics/man/combine.optimizations.Rd
pkg/PortfolioAnalytics/man/combine.portfolios.Rd
pkg/PortfolioAnalytics/man/constrained_objective.Rd
pkg/PortfolioAnalytics/man/constraint.Rd
pkg/PortfolioAnalytics/man/constraint_v2.Rd
pkg/PortfolioAnalytics/man/coskewnessMF.Rd
pkg/PortfolioAnalytics/man/coskewnessSF.Rd
pkg/PortfolioAnalytics/man/covarianceMF.Rd
pkg/PortfolioAnalytics/man/covarianceSF.Rd
pkg/PortfolioAnalytics/man/create.EfficientFrontier.Rd
pkg/PortfolioAnalytics/man/diversification.Rd
pkg/PortfolioAnalytics/man/diversification_constraint.Rd
pkg/PortfolioAnalytics/man/equal.weight.Rd
pkg/PortfolioAnalytics/man/etl_milp_opt.Rd
pkg/PortfolioAnalytics/man/etl_opt.Rd
pkg/PortfolioAnalytics/man/extractCokurtosis.Rd
pkg/PortfolioAnalytics/man/extractCoskewness.Rd
pkg/PortfolioAnalytics/man/extractCovariance.Rd
pkg/PortfolioAnalytics/man/extractEfficientFrontier.Rd
pkg/PortfolioAnalytics/man/extractGroups.Rd
pkg/PortfolioAnalytics/man/extractObjectiveMeasures.Rd
pkg/PortfolioAnalytics/man/extractStats.Rd
pkg/PortfolioAnalytics/man/extractWeights.Rd
pkg/PortfolioAnalytics/man/factor_exposure_constraint.Rd
pkg/PortfolioAnalytics/man/fn_map.Rd
pkg/PortfolioAnalytics/man/generatesequence.Rd
pkg/PortfolioAnalytics/man/get_constraints.Rd
pkg/PortfolioAnalytics/man/gmv_opt.Rd
pkg/PortfolioAnalytics/man/gmv_opt_ptc.Rd
pkg/PortfolioAnalytics/man/gmv_opt_toc.Rd
pkg/PortfolioAnalytics/man/group_constraint.Rd
pkg/PortfolioAnalytics/man/group_fail.Rd
pkg/PortfolioAnalytics/man/insert_constraints.Rd
pkg/PortfolioAnalytics/man/insert_objectives.Rd
pkg/PortfolioAnalytics/man/inverse.volatility.weight.Rd
pkg/PortfolioAnalytics/man/is.constraint.Rd
pkg/PortfolioAnalytics/man/is.objective.Rd
pkg/PortfolioAnalytics/man/is.portfolio.Rd
pkg/PortfolioAnalytics/man/leverage_exposure_constraint.Rd
pkg/PortfolioAnalytics/man/maxret_milp_opt.Rd
pkg/PortfolioAnalytics/man/maxret_opt.Rd
pkg/PortfolioAnalytics/man/meanetl.efficient.frontier.Rd
pkg/PortfolioAnalytics/man/meanvar.efficient.frontier.Rd
pkg/PortfolioAnalytics/man/meucci.moments.Rd
pkg/PortfolioAnalytics/man/meucci.ranking.Rd
pkg/PortfolioAnalytics/man/minmax_objective.Rd
pkg/PortfolioAnalytics/man/mult.portfolio.spec.Rd
pkg/PortfolioAnalytics/man/name.replace.Rd
pkg/PortfolioAnalytics/man/objective.Rd
pkg/PortfolioAnalytics/man/optimize.portfolio.Rd
pkg/PortfolioAnalytics/man/optimize.portfolio.parallel.Rd
pkg/PortfolioAnalytics/man/optimize.portfolio.rebalancing.Rd
pkg/PortfolioAnalytics/man/plot.Rd
pkg/PortfolioAnalytics/man/portfolio.moments.bl.Rd
pkg/PortfolioAnalytics/man/portfolio.moments.boudt.Rd
pkg/PortfolioAnalytics/man/portfolio.spec.Rd
pkg/PortfolioAnalytics/man/portfolio_risk_objective.Rd
pkg/PortfolioAnalytics/man/pos_limit_fail.Rd
pkg/PortfolioAnalytics/man/position_limit_constraint.Rd
pkg/PortfolioAnalytics/man/print.constraint.Rd
pkg/PortfolioAnalytics/man/print.efficient.frontier.Rd
pkg/PortfolioAnalytics/man/print.optimize.portfolio.Rd
pkg/PortfolioAnalytics/man/print.optimize.portfolio.rebalancing.Rd
pkg/PortfolioAnalytics/man/print.portfolio.Rd
pkg/PortfolioAnalytics/man/print.summary.optimize.portfolio.Rd
pkg/PortfolioAnalytics/man/print.summary.optimize.portfolio.rebalancing.Rd
pkg/PortfolioAnalytics/man/quadratic_utility_objective.Rd
pkg/PortfolioAnalytics/man/random_portfolios.Rd
pkg/PortfolioAnalytics/man/random_portfolios_v1.Rd
pkg/PortfolioAnalytics/man/random_walk_portfolios.Rd
pkg/PortfolioAnalytics/man/randomize_portfolio.Rd
pkg/PortfolioAnalytics/man/randomize_portfolio_v1.Rd
pkg/PortfolioAnalytics/man/regime.portfolios.Rd
pkg/PortfolioAnalytics/man/return_constraint.Rd
pkg/PortfolioAnalytics/man/return_objective.Rd
pkg/PortfolioAnalytics/man/risk_budget_objective.Rd
pkg/PortfolioAnalytics/man/rp_grid.Rd
pkg/PortfolioAnalytics/man/rp_sample.Rd
pkg/PortfolioAnalytics/man/rp_simplex.Rd
pkg/PortfolioAnalytics/man/rp_transform.Rd
pkg/PortfolioAnalytics/man/scatterFUN.Rd
pkg/PortfolioAnalytics/man/set.portfolio.moments.Rd
pkg/PortfolioAnalytics/man/set.portfolio.moments_v1.Rd
pkg/PortfolioAnalytics/man/statistical.factor.model.Rd
pkg/PortfolioAnalytics/man/summary.efficient.frontier.Rd
pkg/PortfolioAnalytics/man/summary.optimize.portfolio.Rd
pkg/PortfolioAnalytics/man/summary.optimize.portfolio.rebalancing.Rd
pkg/PortfolioAnalytics/man/summary.portfolio.Rd
pkg/PortfolioAnalytics/man/trailingFUN.Rd
pkg/PortfolioAnalytics/man/transaction_cost_constraint.Rd
pkg/PortfolioAnalytics/man/turnover.Rd
pkg/PortfolioAnalytics/man/turnover_constraint.Rd
pkg/PortfolioAnalytics/man/turnover_objective.Rd
pkg/PortfolioAnalytics/man/update.constraint.Rd
pkg/PortfolioAnalytics/man/update_constraint_v1tov2.Rd
pkg/PortfolioAnalytics/man/var.portfolio.Rd
pkg/PortfolioAnalytics/man/weight_concentration_objective.Rd
pkg/PortfolioAnalytics/man/weight_sum_constraint.Rd
pkg/PortfolioAnalytics/vignettes/custom_moments_objectives.Rnw
Log:
more code and documentation cleanup for R CMD check
Modified: pkg/PortfolioAnalytics/NAMESPACE
===================================================================
--- pkg/PortfolioAnalytics/NAMESPACE 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/NAMESPACE 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,4 @@
-# Generated by roxygen2 (4.0.1): do not edit by hand
+# Generated by roxygen2 (4.1.0): do not edit by hand
S3method(chart.EfficientFrontier,efficient.frontier)
S3method(chart.EfficientFrontier,optimize.portfolio)
Modified: pkg/PortfolioAnalytics/R/applyFUN.R
===================================================================
--- pkg/PortfolioAnalytics/R/applyFUN.R 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/R/applyFUN.R 2015-01-27 03:29:58 UTC (rev 3583)
@@ -16,8 +16,8 @@
momentargs <- list()
momentargs$mu <- matrix(as.vector(apply(R, 2, "mean")), ncol = 1)
momentargs$sigma <- cov(R)
- momentargs$m3 <- PerformanceAnalytics:::M3.MM(R)
- momentargs$m4 <- PerformanceAnalytics:::M4.MM(R)
+ momentargs$m3 <- PerformanceAnalytics::M3.MM(R)
+ momentargs$m4 <- PerformanceAnalytics::M4.MM(R)
return(momentargs)
}
Modified: pkg/PortfolioAnalytics/R/charts.DE.R
===================================================================
--- pkg/PortfolioAnalytics/R/charts.DE.R 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/R/charts.DE.R 2015-01-27 03:29:58 UTC (rev 3583)
@@ -236,7 +236,7 @@
w = w.traj[i,]
x = unlist(constrained_objective(w=w, R=R, portfolio=portfolio, trace=TRUE))
- names(x)<-PortfolioAnalytics:::name.replace(names(x))
+ names(x)<-name.replace(names(x))
if(is.null(trajnames)) trajnames<-names(x)
if(is.null(rsc)){
rtc = pmatch(return.col,trajnames)
@@ -273,7 +273,7 @@
result.slot<-'objective_measures'
}
objcols<-unlist(object[[result.slot]])
- names(objcols)<-PortfolioAnalytics:::name.replace(names(objcols))
+ names(objcols)<-name.replace(names(objcols))
return.column = pmatch(return.col,names(objcols))
if(is.na(return.column)) {
return.col = paste(return.col,return.col,sep='.')
Modified: pkg/PortfolioAnalytics/R/charts.PSO.R
===================================================================
--- pkg/PortfolioAnalytics/R/charts.PSO.R 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/R/charts.PSO.R 2015-01-27 03:29:58 UTC (rev 3583)
@@ -165,7 +165,7 @@
result.slot<-'objective_measures'
}
objcols<-unlist(object[[result.slot]])
- names(objcols)<-PortfolioAnalytics:::name.replace(names(objcols))
+ names(objcols)<-name.replace(names(objcols))
return.column = pmatch(return.col,names(objcols))
if(is.na(return.column)) {
return.col = paste(return.col,return.col,sep='.')
Modified: pkg/PortfolioAnalytics/R/charts.RP.R
===================================================================
--- pkg/PortfolioAnalytics/R/charts.RP.R 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/R/charts.RP.R 2015-01-27 03:29:58 UTC (rev 3583)
@@ -225,7 +225,7 @@
result.slot<-'objective_measures'
}
objcols<-unlist(object[[result.slot]])
- names(objcols)<-PortfolioAnalytics:::name.replace(names(objcols))
+ names(objcols)<-name.replace(names(objcols))
return.column = pmatch(return.col,names(objcols))
if(is.na(return.column)) {
return.col = paste(return.col,return.col,sep='.')
Modified: pkg/PortfolioAnalytics/R/charts.efficient.frontier.R
===================================================================
--- pkg/PortfolioAnalytics/R/charts.efficient.frontier.R 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/R/charts.efficient.frontier.R 2015-01-27 03:29:58 UTC (rev 3583)
@@ -427,11 +427,11 @@
if(!inherits(object, "optimize.portfolio")) stop("object must be of class optimize.portfolio")
frontier <- extractEfficientFrontier(object=object, match.col=match.col, n.portfolios=n.portfolios)
- PortfolioAnalytics:::chart.Weights.EF(object=frontier, colorset=colorset, ...,
- match.col=match.col, by.groups=by.groups, main=main, cex.lab=cex.lab,
- cex.axis=cex.axis, cex.legend=cex.legend,
- legend.labels=legend.labels, element.color=element.color,
- legend.loc=legend.loc)
+ chart.Weights.EF(object=frontier, colorset=colorset, ...,
+ match.col=match.col, by.groups=by.groups, main=main, cex.lab=cex.lab,
+ cex.axis=cex.axis, cex.legend=cex.legend,
+ legend.labels=legend.labels, element.color=element.color,
+ legend.loc=legend.loc)
}
#' @rdname chart.EfficientFrontier
Modified: pkg/PortfolioAnalytics/R/extractstats.R
===================================================================
--- pkg/PortfolioAnalytics/R/extractstats.R 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/R/extractstats.R 2015-01-27 03:29:58 UTC (rev 3583)
@@ -544,7 +544,7 @@
# rbind the objective measures and convert to an xts object
#obj <- xts(do.call(rbind, tmp), as.Date(names(tmp.idx)))
obj <- do.call(rbind, tmp)
- colnames(obj) <- PortfolioAnalytics:::name.replace(colnames(obj))
+ colnames(obj) <- name.replace(colnames(obj))
obj <- xts(obj, as.Date(names(tmp.idx)))
# insert the objective measures into the list
out.list[[unique.regimes[i]]] <- obj
@@ -590,7 +590,7 @@
# Get the objective_measures from each element
for(i in 1:length(object)){
tmp <- unlist(object[[i]]$objective_measures)
- names(tmp) <- PortfolioAnalytics:::name.replace(names(tmp))
+ names(tmp) <- name.replace(names(tmp))
obj_list[[opt.names[i]]] <- tmp
}
obj_names <- unique(unlist(lapply(obj_list, names)))
@@ -651,7 +651,7 @@
tmp.R <- object[[i]]$R
tmp.portf <- object[[i]]$portfolio
tmp <- unlist(constrained_objective(w=tmp.weights, R=tmp.R, portfolio=tmp.portf, trace=TRUE)$objective_measures)
- names(tmp) <- PortfolioAnalytics:::name.replace(names(tmp))
+ names(tmp) <- name.replace(names(tmp))
out[[opt.names[i]]] <- tmp
}
out <- do.call(rbind, out)
Modified: pkg/PortfolioAnalytics/R/moment.functions.R
===================================================================
--- pkg/PortfolioAnalytics/R/moment.functions.R 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/R/moment.functions.R 2015-01-27 03:29:58 UTC (rev 3583)
@@ -55,8 +55,8 @@
# set volatility of all U to last observation, such that cov(rescaled U)=sigma
uncS = sqrt(diag( cov(U) ))
U = U*matrix( rep(nextS/uncS,T ) , ncol = cAssets , byrow = T )
- momentargs$m3 = PerformanceAnalytics:::M3.MM(U)
- momentargs$m4 = PerformanceAnalytics:::M4.MM(U)
+ momentargs$m3 = PerformanceAnalytics::M3.MM(U)
+ momentargs$m4 = PerformanceAnalytics::M4.MM(U)
return(momentargs)
}
@@ -101,8 +101,8 @@
if(!inherits(cleanR,"try-error")) {
momentargs$mu = matrix( as.vector(apply(cleanR,2,'mean')),ncol=1);
momentargs$sigma = cov(cleanR);
- momentargs$m3 = PerformanceAnalytics:::M3.MM(cleanR)
- momentargs$m4 = PerformanceAnalytics:::M4.MM(cleanR)
+ momentargs$m3 = PerformanceAnalytics::M3.MM(cleanR)
+ momentargs$m4 = PerformanceAnalytics::M4.MM(cleanR)
#' FIXME NOTE: this isn't perfect as it overwrites the moments for all objectives, not just one with clean='boudt'
}
}
@@ -121,8 +121,8 @@
VaR = {
if(is.null(momentargs$mu)) momentargs$mu = matrix( as.vector(apply(R,2,'mean')),ncol=1);
if(is.null(momentargs$sigma)) momentargs$sigma = cov(R)
- if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics:::M3.MM(R)
- if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics:::M4.MM(R)
+ if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics::M3.MM(R)
+ if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics::M4.MM(R)
},
es =,
mES =,
@@ -131,8 +131,8 @@
ES = {
if(is.null(momentargs$mu)) momentargs$mu = matrix( as.vector(apply(R,2,'mean')),ncol=1);
if(is.null(momentargs$sigma)) momentargs$sigma = cov(R)
- if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics:::M3.MM(R)
- if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics:::M4.MM(R)
+ if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics::M3.MM(R)
+ if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics::M4.MM(R)
}
) # end switch on objectives
}
@@ -286,8 +286,8 @@
sample = {
if(is.null(momentargs$mu)) momentargs$mu = matrix( as.vector(apply(tmpR, 2, 'mean')), ncol=1);
if(is.null(momentargs$sigma)) momentargs$sigma = cov(tmpR)
- if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics:::M3.MM(tmpR)
- if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics:::M4.MM(tmpR)
+ if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics::M3.MM(tmpR)
+ if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics::M4.MM(tmpR)
},
boudt = {
if(is.null(momentargs$mu)) momentargs$mu = matrix( as.vector(apply(tmpR, 2, 'mean')), ncol=1);
@@ -298,14 +298,14 @@
black_litterman = {
if(is.null(momentargs$mu)) momentargs$mu = B$BLMu
if(is.null(momentargs$sigma)) momentargs$sigma = B$BLSigma
- if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics:::M3.MM(tmpR)
- if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics:::M4.MM(tmpR)
+ if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics::M3.MM(tmpR)
+ if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics::M4.MM(tmpR)
},
meucci = {
if(is.null(momentargs$mu)) momentargs$mu = meucci.model$mu
if(is.null(momentargs$sigma)) momentargs$sigma = meucci.model$sigma
- if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics:::M3.MM(tmpR)
- if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics:::M4.MM(tmpR)
+ if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics::M3.MM(tmpR)
+ if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics::M4.MM(tmpR)
}
) # end nested switch on method
}, # end switch on mVaR, VaR
@@ -324,8 +324,8 @@
sample = {
if(is.null(momentargs$mu)) momentargs$mu = matrix( as.vector(apply(tmpR, 2, 'mean')), ncol=1);
if(is.null(momentargs$sigma)) momentargs$sigma = cov(tmpR)
- if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics:::M3.MM(tmpR)
- if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics:::M4.MM(tmpR)
+ if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics::M3.MM(tmpR)
+ if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics::M4.MM(tmpR)
},
boudt = {
if(is.null(momentargs$mu)) momentargs$mu = matrix( as.vector(apply(tmpR, 2, 'mean')), ncol=1);
@@ -336,14 +336,14 @@
black_litterman = {
if(is.null(momentargs$mu)) momentargs$mu = B$BLMu
if(is.null(momentargs$sigma)) momentargs$sigma = B$BLSigma
- if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics:::M3.MM(tmpR)
- if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics:::M4.MM(tmpR)
+ if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics::M3.MM(tmpR)
+ if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics::M4.MM(tmpR)
},
meucci = {
if(is.null(momentargs$mu)) momentargs$mu = meucci.model$mu
if(is.null(momentargs$sigma)) momentargs$sigma = meucci.model$sigma
- if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics:::M3.MM(tmpR)
- if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics:::M4.MM(tmpR)
+ if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics::M3.MM(tmpR)
+ if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics::M4.MM(tmpR)
}
) # end nested switch on method
}
@@ -364,8 +364,8 @@
momentargs$mu<-mu_ts[last(index(R)),]
momentargs$sigma<-covlist[as.character(last(index(R)))]
- if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics:::M3.MM(R)
- if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics:::M4.MM(R)
+ if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics::M3.MM(R)
+ if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics::M4.MM(R)
return(momentargs)
}
@@ -509,8 +509,8 @@
VaR = {
if(is.null(momentargs$mu)) momentargs$mu = B$BLMu
if(is.null(momentargs$sigma)) momentargs$sigma = B$BLSigma
- if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics:::M3.MM(R)
- if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics:::M4.MM(R)
+ if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics::M3.MM(R)
+ if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics::M4.MM(R)
},
es =,
mES =,
@@ -525,8 +525,8 @@
if(!ROI){
if(is.null(momentargs$mu)) momentargs$mu = B$BLMu
if(is.null(momentargs$sigma)) momentargs$sigma = B$BLSigma
- if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics:::M3.MM(R)
- if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics:::M4.MM(R)
+ if(is.null(momentargs$m3)) momentargs$m3 = PerformanceAnalytics::M3.MM(R)
+ if(is.null(momentargs$m4)) momentargs$m4 = PerformanceAnalytics::M4.MM(R)
}
}
) # end switch on objectives
Modified: pkg/PortfolioAnalytics/R/mult.layer.portfolio.R
===================================================================
--- pkg/PortfolioAnalytics/R/mult.layer.portfolio.R 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/R/mult.layer.portfolio.R 2015-01-27 03:29:58 UTC (rev 3583)
@@ -147,8 +147,8 @@
}
# This needs to support anything in ... that could be passed to optimize.portfolio
.formals <- formals(optimize.portfolio.rebalancing)
- .formals <- PortfolioAnalytics:::modify.args(formals=.formals, arglist=NULL, R=R, dots=TRUE)
- .formals <- PortfolioAnalytics:::modify.args(formals=.formals, arglist=tmp, dots=TRUE)
+ .formals <- modify.args(formals=.formals, arglist=NULL, R=R, dots=TRUE)
+ .formals <- modify.args(formals=.formals, arglist=tmp, dots=TRUE)
.formals$... <- NULL
#print(.formals)
opt <- try(do.call(optimize.portfolio.rebalancing, .formals), silent=TRUE)
Modified: pkg/PortfolioAnalytics/R/stat.factor.model.R
===================================================================
--- pkg/PortfolioAnalytics/R/stat.factor.model.R 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/R/stat.factor.model.R 2015-01-27 03:29:58 UTC (rev 3583)
@@ -514,7 +514,7 @@
# Factor moments
# f.centered <- center(f)
# factorM3 <- M3.MM(f.centered)
- factorM3 <- PerformanceAnalytics:::M3.MM(f)
+ factorM3 <- PerformanceAnalytics::M3.MM(f)
# Compute covariance estimate
if(k == 1){
@@ -562,7 +562,7 @@
factorM2 <- cov(f)
# f.centered <- center(f)
# factorM4 <- M4.MM(f.centered)
- factorM4 <- PerformanceAnalytics:::M4.MM(f)
+ factorM4 <- PerformanceAnalytics::M4.MM(f)
# Compute covariance estimate
if(k == 1){
Modified: pkg/PortfolioAnalytics/man/BlackLittermanFormula.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/BlackLittermanFormula.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/BlackLittermanFormula.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/black_litterman.R
\name{BlackLittermanFormula}
\alias{BlackLittermanFormula}
\title{Computes the Black-Litterman formula for the moments of the posterior normal.}
Modified: pkg/PortfolioAnalytics/man/CCCgarch.MM.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/CCCgarch.MM.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/CCCgarch.MM.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/moment.functions.R
\name{CCCgarch.MM}
\alias{CCCgarch.MM}
\title{compute comoments for use by lower level optimization functions when the conditional covariance matrix is a CCC GARCH model}
Modified: pkg/PortfolioAnalytics/man/EntropyProg.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/EntropyProg.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/EntropyProg.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/EntropyProg.R
\name{EntropyProg}
\alias{EntropyProg}
\title{Entropy pooling program for blending views on scenarios with a prior scenario-probability distribution}
@@ -8,14 +9,14 @@
\arguments{
\item{p}{a vector of initial probabilities based on prior (reference model, empirical distribution, etc.). Sum of 'p' must be 1}
+\item{A}{matrix consisting of inequality constraints (paired with argument 'b'). Denoted as 'F' in the Meucci paper}
+
+\item{b}{vector consisting of inequality constraints (paired with matrix A). Denoted as 'f' in the Meucci paper}
+
\item{Aeq}{matrix consisting of equality constraints (paired with argument 'beq'). Denoted as 'H' in the Meucci paper. (denoted as 'H' in the "Meucci - Flexible Views Theory & Practice" paper formlua 86 on page 22)}
\item{beq}{vector corresponding to the matrix of equality constraints (paired with argument 'Aeq'). Denoted as 'h' in the Meucci paper}
-\item{A}{matrix consisting of inequality constraints (paired with argument 'b'). Denoted as 'F' in the Meucci paper}
-
-\item{b}{vector consisting of inequality constraints (paired with matrix A). Denoted as 'f' in the Meucci paper}
-
\item{verbose}{If TRUE, prints out additional information. Default FALSE.
' \deqn{ \tilde{p} \equiv argmin_{Fx \leq f, Hx \equiv h} \big\{ \sum_1^J x_{j} \big(ln \big( x_{j} \big) - ln \big( p_{j} \big) \big) \big\}
Modified: pkg/PortfolioAnalytics/man/HHI.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/HHI.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/HHI.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/objectiveFUN.R
\name{HHI}
\alias{HHI}
\title{Concentration of weights}
Modified: pkg/PortfolioAnalytics/man/ac.ranking.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/ac.ranking.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/ac.ranking.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/ac_ranking.R
\name{ac.ranking}
\alias{ac.ranking}
\title{Asset Ranking}
Modified: pkg/PortfolioAnalytics/man/add.constraint.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/add.constraint.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/add.constraint.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/constraints.R
\name{add.constraint}
\alias{add.constraint}
\title{General interface for adding and/or updating optimization constraints.}
@@ -15,9 +16,9 @@
\item{message}{TRUE/FALSE. The default is message=FALSE. Display messages if TRUE.}
+\item{indexnum}{if you are updating a specific constraint, the index number in the $constraints list to update}
+
\item{\dots}{any other passthru parameters to specify constraints}
-
-\item{indexnum}{if you are updating a specific constraint, the index number in the $constraints list to update}
}
\description{
This is the main function for adding and/or updating constraints to the \code{\link{portfolio.spec}} object.
@@ -58,16 +59,20 @@
pspec <- add.constraint(portfolio=pspec, type="box", min=0.05, max=0.4)
# min and max can also be specified per asset
-pspec <- add.constraint(portfolio=pspec, type="box", min=c(0.05, 0, 0.08, 0.1), max=c(0.4, 0.3, 0.7, 0.55))
+pspec <- add.constraint(portfolio=pspec, type="box", min=c(0.05, 0, 0.08, 0.1),
+ max=c(0.4, 0.3, 0.7, 0.55))
# A special case of box constraints is long only where min=0 and max=1
# The default action is long only if min and max are not specified
pspec <- add.constraint(portfolio=pspec, type="box")
pspec <- add.constraint(portfolio=pspec, type="long_only")
# Add group constraints
-pspec <- add.constraint(portfolio=pspec, type="group", groups=list(c(1, 2, 1), 4), group_min=c(0.1, 0.15), group_max=c(0.85, 0.55), group_labels=c("GroupA", "GroupB"), group_pos=c(2, 1))
+pspec <- add.constraint(portfolio=pspec, type="group", groups=list(c(1, 2, 1), 4),
+ group_min=c(0.1, 0.15), group_max=c(0.85, 0.55),
+ group_labels=c("GroupA", "GroupB"), group_pos=c(2, 1))
-# Add position limit constraint such that we have a maximum number of three assets with non-zero weights.
+# Add position limit constraint such that we have a maximum number of three
+# assets with non-zero weights.
pspec <- add.constraint(portfolio=pspec, type="position_limit", max_pos=3)
# Add diversification constraint
Modified: pkg/PortfolioAnalytics/man/add.objective.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/add.objective.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/add.objective.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/objective.R
\name{add.objective}
\alias{add.objective}
\alias{add.objective_v1}
@@ -15,8 +16,6 @@
enabled = TRUE, ..., indexnum = NULL)
}
\arguments{
-\item{portfolio}{an object of type 'portfolio' to add the objective to, specifying the portfolio for the optimization, see \code{\link{portfolio}}}
-
\item{constraints}{a 'v1_constraint' object for backwards compatibility, see \code{\link{constraint}}}
\item{type}{character type of the objective to add or update, currently 'return','risk', 'risk_budget', 'quadratic_utility', or 'weight_concentration'}
@@ -27,9 +26,11 @@
\item{enabled}{TRUE/FALSE}
+\item{indexnum}{if you are updating a specific objective, the index number in the $objectives list to update}
+
+\item{portfolio}{an object of type 'portfolio' to add the objective to, specifying the portfolio for the optimization, see \code{\link{portfolio}}}
+
\item{\dots}{any other passthru parameters}
-
-\item{indexnum}{if you are updating a specific objective, the index number in the $objectives list to update}
}
\description{
This function is the main function for adding and updating business objectives in an object of type \code{\link{portfolio.spec}}.
Modified: pkg/PortfolioAnalytics/man/add.sub.portfolio.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/add.sub.portfolio.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/add.sub.portfolio.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/mult.layer.portfolio.R
\name{add.sub.portfolio}
\alias{add.sub.portfolio}
\title{Add sub-portfolio}
@@ -29,12 +30,12 @@
(i.e. width of the moving or rolling window), the default is NULL will
run using the returns data from inception}
-\item{\dots}{additonal passthrough parameters to \code{\link{optimize.portfolio.rebalancing}}}
-
\item{indexnum}{the index number of the sub portfolio. If \code{indexnum=NULL}
(the default), then the sub portfolio object is appended to the list of
sub portfolios in the \code{mult.portfolio} object. If \code{indexnum} is
specified, the portfolio in that index number is overwritten.}
+
+\item{\dots}{additonal passthrough parameters to \code{\link{optimize.portfolio.rebalancing}}}
}
\description{
Add a sub-portfolio to a multiple layer portfolio specification object
Modified: pkg/PortfolioAnalytics/man/applyFUN.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/applyFUN.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/applyFUN.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/applyFUN.R
\name{applyFUN}
\alias{applyFUN}
\title{Apply a risk or return function to a set of weights}
Modified: pkg/PortfolioAnalytics/man/barplotGroupWeights.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/barplotGroupWeights.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/barplotGroupWeights.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/charts.groups.R
\name{barplotGroupWeights}
\alias{barplotGroupWeights}
\title{barplot of group weights by group or category}
Modified: pkg/PortfolioAnalytics/man/black.litterman.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/black.litterman.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/black.litterman.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/black_litterman.R
\name{black.litterman}
\alias{black.litterman}
\title{Black Litterman Estimates}
Modified: pkg/PortfolioAnalytics/man/box_constraint.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/box_constraint.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/box_constraint.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/constraints.R
\name{box_constraint}
\alias{box_constraint}
\title{constructor for box_constraint.}
@@ -45,7 +46,8 @@
pspec <- add.constraint(pspec, type="box", min=0.05, max=0.45)
# specify box constraints per asset
-pspec <- add.constraint(pspec, type="box", min=c(0.05, 0.10, 0.08, 0.06), max=c(0.45, 0.55, 0.35, 0.65))
+pspec <- add.constraint(pspec, type="box", min=c(0.05, 0.10, 0.08, 0.06),
+ max=c(0.45, 0.55, 0.35, 0.65))
}
\author{
Ross Bennett
Modified: pkg/PortfolioAnalytics/man/center.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/center.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/center.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/stat.factor.model.R
\name{center}
\alias{center}
\title{Center}
Modified: pkg/PortfolioAnalytics/man/centroid.buckets.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/centroid.buckets.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/centroid.buckets.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/ac_ranking.R
\name{centroid.buckets}
\alias{centroid.buckets}
\title{Buckets Centroid}
Modified: pkg/PortfolioAnalytics/man/centroid.complete.mc.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/centroid.complete.mc.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/centroid.complete.mc.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/ac_ranking.R
\name{centroid.complete.mc}
\alias{centroid.complete.mc}
\title{Complete Cases Centroid}
Modified: pkg/PortfolioAnalytics/man/centroid.sectors.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/centroid.sectors.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/centroid.sectors.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/ac_ranking.R
\name{centroid.sectors}
\alias{centroid.sectors}
\title{Multiple Sectors Centroid}
Modified: pkg/PortfolioAnalytics/man/centroid.sign.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/centroid.sign.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/centroid.sign.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/ac_ranking.R
\name{centroid.sign}
\alias{centroid.sign}
\title{Positive and Negative View Centroid}
Modified: pkg/PortfolioAnalytics/man/chart.Concentration.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/chart.Concentration.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/chart.Concentration.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
+% Generated by roxygen2 (4.1.0): do not edit by hand
+% Please edit documentation in R/chart.concentration.R
\name{chart.Concentration}
\alias{chart.Concentration}
\title{Classic risk reward scatter and concentration}
@@ -11,8 +12,6 @@
\arguments{
\item{object}{optimal portfolio created by \code{\link{optimize.portfolio}}.}
-\item{\dots}{any other passthru parameters.}
-
\item{return.col}{string matching the objective of a 'return' objective, on vertical axis.}
\item{risk.col}{string matching the objective of a 'risk' objective, on horizontal axis.}
@@ -32,6 +31,8 @@
\item{xlim}{set the x-axis limit, same as in \code{\link{plot}}.}
\item{ylim}{set the y-axis limit, same as in \code{\link{plot}}.}
+
+\item{\dots}{any other passthru parameters.}
}
\description{
This function charts the \code{optimize.portfolio} object in risk-return space
Modified: pkg/PortfolioAnalytics/man/chart.EfficientFrontier.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/chart.EfficientFrontier.Rd 2015-01-25 21:38:09 UTC (rev 3582)
+++ pkg/PortfolioAnalytics/man/chart.EfficientFrontier.Rd 2015-01-27 03:29:58 UTC (rev 3583)
@@ -1,4 +1,5 @@
-% Generated by roxygen2 (4.0.1): do not edit by hand
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/returnanalytics -r 3583
More information about the Returnanalytics-commits
mailing list