[GSoC-PortA] RP issue?
Peter Carl
peter at braverock.com
Mon Sep 23 04:18:56 CEST 2013
Ok, I'm now up to revision 3170.
### Construct BUOY 5: Constrained Equal Variance Contribution Portfolio -
using RP
EqSD.portf <- add.objective(portfolio=init.portf,
type="risk_budget",
name="StdDev",
enabled=TRUE,
min_concentration=TRUE,
arguments = list(p=(1-1/12), clean=clean)
)
# Without a sub-objective, we get a somewhat undefined result, since there
are (potentially) many Equal SD contribution portfolios.
EqSD.portf <- add.objective(portfolio=EqSD.portf,
type="risk",
name="StdDev"
)
EqSD.portf$constraints[[1]]$min_sum = 0.99 # set to speed up RP
EqSD.portf$constraints[[1]]$max_sum = 1.01
Now I'm evaluating it:
> EqSD.RND<-optimize.portfolio(R=R,
+ portfolio=EqSD.portf,
+ optimize_method='random',
+ search_size=1000, trace=TRUE
+ )
Warning message:
In constrained_objective(w = min_objective_weights, R = R, portfolio =
portfolio, :
some arguments stored for StdDev do not match
I'm not sure why I'd get that warning... or maybe I'm not understanding
the meaning of the message.
> plot(EqSD.RND, risk.col="StdDev", return.col="mean", rp=permutations,
chart.assets=TRUE, main="Equal Volatility Contribution Portfolio")
There were 13 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: In chart.Scatter.RP(object = RP, risk.col = risk.col, ... :
mean or StdDev do not match extractStats output of $objective_measures
slot
That's probably a repeat of the above message.
Then this chart broke:
> chart.RiskBudget(EqSD.RND)
Error in contrib[[idx[ii]]] : attempt to select less than one element
Thanks,
pcc
--
Peter Carl
http://www.braverock.com/peter
More information about the GSoC-PortA
mailing list