[GSoC-PortA] error in demo_efficient_frontier

Brian G. Peterson brian at braverock.com
Wed Sep 18 16:54:33 CEST 2013


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


More information about the GSoC-PortA mailing list