On Mon, 2016-09-19 at 23:08 +0000, Jason Hart wrote:
> I've never been able to get portfolioanalytics to work for me. It
> looks like a nice little addition to the R arsenal but we just weren't
> meant to work together. I figured what the heck I'll try this code
> and I got the same error message I usually get:
> Error in optimize.portfolio(R = returns, portfolio = pspec,
> optimize_method = "pso", :
> unused arguments (R = returns, portfolio = pspec, optimize_method =
> "pso", trace = TRUE)
> I've installed all the dependent (or at least I think I have) but to
> no avail. I installed pso, all the different ROI packages, Rcmdr.
> I've seen other people with the same issue but did not see a
Really? Which "other people"? Link?
My Google-fu only turned up one other instance of this error, and the
error was reportedly resolved by installing the dependencies.
> Any help is much appreciated.
Please don't hijack the thread. People who use threaded mail readers
will have difficulty following or finding your question.
Assuming you used the script from the prior thread, I had no problem
running that code on multiple machines and R versions.
The error itself suggests that something is masking objects like
optimize.portfolio in your .GlobalEnv, but without more information
there's nothing to diagnose.
Please try to follow the posting guide:
At a minimum, please provide the output of
R-SIG-Finance@r-project.org mailing list
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should