[R-SIG-Finance] PortfolioAnalytics: unused argument error

Jason Hart jasonhart4 at icloud.com
Thu Sep 22 02:25:56 CEST 2016


Brian - Get over yourself!  That was an A++ response in terms of being obnoxious, smug and condescending. I wasn't looking for anyone to do any internet searches high atop their Ivory Tower, it was a simple question that I was hoping someone had a similar experience with.  Trust me, I've done plenty of searches on this topic and my "google fu" skills are on par with yours.  I saw the same inquiry you probably saw w/ your search results, but the user with my problem never confirmed if he figured it out despite asking a couple of times on the thread.  If he's asking the same follow-up question more than once then chances are he never got it working.  

As far as "hijacking the thread" it was a simple post that seemed appropriate for the topic but I am so sorry if I offended you, or anyone else, for breaking the unwritten rules. Look, I've been an R user for 2.5 years but my skills are nowhere near 90%, hell maybe 100% of the people here -- if I were to post this as a standalone question there wouldn't be a single response.  Half the subscribers would be laughing behind their keyboard. Posting here is only a matter of last resort, so sometimes you gotta take your shot.  

PS - I did figure it out though, all of the packages were properly installed so that wasn't the problem....and thankfully I'm not crazy!  But it was a simple fix in hindsight and I'm sure all of you experienced it at one point or another  


On Sep 20, 2016, at 08:33 AM, "Brian G. Peterson" <brian at braverock.com> wrote:

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
solution.

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.

Jason,

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:

https://www.r-project.org/posting-guide.html

At a minimum, please provide the output of 

sessionInfo()

Regards,

Brian


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20160922/e8db02be/attachment.html>


More information about the R-SIG-Finance mailing list