[GSoC-PortA] error in demo_efficient_frontier
Doug Martin
martinrd at comcast.net
Wed Sep 18 18:01:37 CEST 2013
Brian,
Do I recall correctly that this is an old problem from last year that
Theussel, etc., was informed about but never fixed?
Doug
From: gsoc-porta-bounces at lists.r-forge.r-project.org
[mailto:gsoc-porta-bounces at lists.r-forge.r-project.org] On Behalf Of Ross
Bennett
Sent: Wednesday, September 18, 2013 8:07 AM
To: PortfolioAnalytics
Subject: Re: [GSoC-PortA] error in demo_efficient_frontier
Brian,
That is an error with ROI. The ROI.plugin.quadprog version on CRAN is
broken, the version on R-forge works correctly.
Ross
On Wed, Sep 18, 2013 at 7:54 AM, Brian G. Peterson <brian at braverock.com>
wrote:
I see:
> # mean-var efficient frontier
> meanvar.ef <- create.EfficientFrontier(R=R, portfolio=meanvar.portf,
type="mean-StdDev")
Error in (dir == "<=") | (dir = q = "<") :
operations are possible only for numeric, logical or complex types
> traceback()
13: which((dir == "<=") | (dir = q = "<"))
12: .quadprog_solve_QP(Q = terms(objective(x))$Q, L = terms(objective(x))$L,
mat = constraints(x)$L, dir = constraints(x)$dir, rhs =
constraints(x)$rhs,
max = x$maximum)
11: SOLVE(x, control)
10: ROI_solve(x = opt.prob, solver = "quadprog")
9: gmv_opt(R = R, constraints = constraints, moments = moments,
lambda = lambda, target = target, lambda_hhi = lambda_hhi,
conc_groups = conc_groups)
8: optimize.portfolio(R = R, portfolio = portfolio, optimize_method = "ROI")
7: meanvar.efficient.frontier(portfolio = portfolio, R = R, n.portfolios =
n.portfolios,
risk_aversion = risk_aversion)
6: create.EfficientFrontier(R = R, portfolio = meanvar.portf, type =
"mean-StdDev") at demo_efficient_frontier.R#42
5: eval(expr, envir, enclos)
4: eval(ei, envir)
3: withVisible(eval(ei, envir))
2: source(available, echo = echo, max.deparse.length = Inf, keep.source =
TRUE,
encoding = encoding)
1: demo("demo_efficient_frontier", ask = FALSE)
I'm pretty sure this is current code.
Thoughts?
--
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock
_______________________________________________
GSoC-PortA mailing list
GSoC-PortA at lists.r-forge.r-project.org
http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/gsoc-porta/attachments/20130918/a51de872/attachment.html>
More information about the GSoC-PortA
mailing list