0

When I run this line of code, I get the error message:

chart.RiskReward(maxret, risk.col = "StdDev", return.col = "mean",
                 chart.assets = "False")
chart.EfficientFrontier(maxret, match.col="StdDev", n.portfolios=100, type="l", tangent.line=FALSE)

Error in seq.default(from = minret, to = maxret, length.out = n.portfolios) :
  'from' must be a finite number
camille
  • 16,432
  • 18
  • 38
  • 60
  • [See here](https://stackoverflow.com/q/5963269/5325862) on making a reproducible example that is easier for folks to help with. There's very little information here for us to go on – camille Dec 18 '21 at 23:43
  • Please provide enough code so others can better understand or reproduce the problem. – Community Dec 27 '21 at 10:02
  • errors message occurs when I run a line of code that chart the efficient frontier,original script below: # Run the optimization maxret <- optimize.portfolio(R=returns_data, momentargs=momentargs, portfolio=portf_maxret, optimize_method="ROI", trace=TRUE) #Charts chart.RiskReward(maxret, risk.col = "StdDev", return.col = "mean", chart.assets = "False") chart.EfficientFrontier(maxret, match.col="StdDev", n.portfolios=100, type="l", tangent.line=FALSE) chart.Weights.EF(maxret, match.col="StdDev") chart.Weights.EF(maxret, match.col="StdDev", by.groups=TRUE) – Khumbudzo Ashley Daswa Jan 03 '22 at 11:58

0 Answers0