<div dir="ltr">I'm glad to report that I found the source of the error with the help of a classmate. He was trying to build the package and was getting the same error we were seeing on R-Forge. The error was coming from Return.rebalancing. He was using PerformanceAnalytics 1.1.0 from CRAN and I was using the development version from R-Forge which is why I wasn't seeing the error. It is good to know this has been fixed in the most recent version of PerformanceAnalytics.<div>
<br></div><div>I'll make the proper updates to the DESCRIPTION file and vignette.</div><div><br></div><div>Ross</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 11, 2014 at 3:28 PM, Joshua Ulrich <span dir="ltr"><<a href="mailto:josh.m.ulrich@gmail.com" target="_blank">josh.m.ulrich@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for following up with this Ross!<br>
--<br>
Joshua Ulrich | <a href="http://about.me/joshuaulrich" target="_blank">about.me/joshuaulrich</a><br>
FOSS Trading | <a href="http://www.fosstrading.com" target="_blank">www.fosstrading.com</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Fri, Apr 11, 2014 at 3:51 PM, Ross Bennett <<a href="mailto:rossbennett34@gmail.com">rossbennett34@gmail.com</a>> wrote:<br>
> A brief update.<br>
><br>
> I've been in communication with Martin Pacala and Stefan Theussl at R-Forge<br>
> regarding this error and we were not able to find out exactly where the<br>
> error is coming from or how to fix it. Stefan added PortfolioAnalytics to<br>
> the Windows and Linux stop list only for the building vignettes part and the<br>
> build status is now current on R-Forge.<br>
><br>
> Ross<br>
><br>
><br>
> On Wed, Apr 2, 2014 at 9:00 AM, Ross Bennett <<a href="mailto:rossbennett34@gmail.com">rossbennett34@gmail.com</a>><br>
> wrote:<br>
>><br>
>> I sent an email to R-Forge@R-Project.org in the beginning of March and<br>
>> have yet to hear back so I sent a follow up email on Monday. I spent some<br>
>> time earlier in the week trying to figure out where this error is coming<br>
>> from and still am unable to replicate the error we are getting on R-Forge. I<br>
>> heard back from someone yesterday, so hopefully we can get this taken care<br>
>> of.<br>
>><br>
>> I suppose an option is to leave the .Rnw files in the vignettes/ folder,<br>
>> move the .pdf files to inst/doc/ and add 'BuildVignettes: false' to the<br>
>> DESCRIPTION file.<br>
>><br>
>> Ross<br>
>><br>
>><br>
>> On Mon, Feb 24, 2014 at 11:16 AM, Brian G. Peterson <<a href="mailto:brian@braverock.com">brian@braverock.com</a>><br>
>> wrote:<br>
>>><br>
>>> I'm guessing the vignettes might just take too long for R-Forge. We<br>
>>> should ask them to see if they have any other data. I had no trouble<br>
>>> building it here from the command line and RStudio.<br>
>>><br>
>>> Brian<br>
>>><br>
>>><br>
>>> On 02/24/2014 11:23 AM, Ross Bennett wrote:<br>
>>>><br>
>>>> All,<br>
>>>><br>
>>>> PortfolioAnalytics is not building on R-forge and part of the error<br>
>>>> message is shown below.<br>
>>>><br>
>>>> Error: processing vignette 'risk_budget_optimization.Rnw' failed with<br>
>>>> diagnostics:<br>
>>>> subscript out of bounds<br>
>>>> Execution halted<br>
>>>> Run time: 437.89 seconds.<br>
>>>><br>
>>>> However, when I run R CMD Check, the R code in the vignettes runs<br>
>>>> successfully so I am not sure how to address this error or if there is<br>
>>>> something else I am missing. I also tried building the vignette in<br>
>>>> Rstudio with the 'compile pdf' button and it compiled successfully. For<br>
>>>> your reference, I am attaching the 00check.log file.<br>
>>>><br>
>>>> Ross<br>
>>>><br>
>>>><br>
>>>><br>
>>>> On Thu, Feb 20, 2014 at 10:48 AM, Doug Martin <<a href="mailto:martinrd@comcast.net">martinrd@comcast.net</a><br>
>>>> <mailto:<a href="mailto:martinrd@comcast.net">martinrd@comcast.net</a>>> wrote:<br>
>>>><br>
>>>> Got it and will take a look tomorrow or on the weekend.____<br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>> Thanks,____<br>
>>>><br>
>>>> Doug____<br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>> *From:*<a href="mailto:gsoc-porta-bounces@lists.r-forge.r-project.org">gsoc-porta-bounces@lists.r-forge.r-project.org</a><br>
>>>> <mailto:<a href="mailto:gsoc-porta-bounces@lists.r-forge.r-project.org">gsoc-porta-bounces@lists.r-forge.r-project.org</a>><br>
>>>> [mailto:<a href="mailto:gsoc-porta-bounces@lists.r-forge.r-project.org">gsoc-porta-bounces@lists.r-forge.r-project.org</a><br>
>>>> <mailto:<a href="mailto:gsoc-porta-bounces@lists.r-forge.r-project.org">gsoc-porta-bounces@lists.r-forge.r-project.org</a>>] *On Behalf<br>
>>>> Of *Ross Bennett<br>
>>>> *Sent:* Thursday, February 20, 2014 11:27 AM<br>
>>>> *To:* PortfolioAnalytics<br>
>>>> *Subject:* Re: [GSoC-PortA] Finishing Touches to<br>
>>>> PortfolioAnalytics____<br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>> All,____<br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>><br>
>>>> I am working on adding functionality to accept a list of portfolio<br>
>>>> objects for optimize.portfolio and<br>
>>>> optimize.portfolio.rebalancing.____<br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>><br>
>>>> I added a block of code at the beginning of optimize.portfolio and<br>
>>>> optimize.portfolio.rebalancing to detect a list of portfolio objects<br>
>>>> and then loop through each portfolio in the list of portfolios and<br>
>>>> recursively call optimize.portfolio or<br>
>>>> optimize.portfolio.rebalancing. I have a return statement at the end<br>
>>>> of that block of code. Some frown upon multiple return statements in<br>
>>>> a function, is it ok that I do this here or is there a different<br>
>>>> approach I should follow.____<br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>><br>
>>>> I also added demo/multiple_portfolio_optimization.R so you can test<br>
>>>> out the functionality.____<br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>> I just committed my changes with r3318.____<br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>> Ross____<br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>><br>
>>>> On Wed, Feb 5, 2014 at 6:54 AM, Ross Bennett<br>
>>>> <<a href="mailto:rossbennett34@gmail.com">rossbennett34@gmail.com</a> <mailto:<a href="mailto:rossbennett34@gmail.com">rossbennett34@gmail.com</a>>><br>
>>>> wrote:____<br>
>>>><br>
>>>><br>
>>>> Makes a lot more sense from that perspective to avoid making<br>
>>>> optimize.portfolio and optimize.portfolio.rebalancing S3 generic<br>
>>>> methods. I'll proceed as you have outlined.____<br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>> Thanks for the clarification and guidance.____<br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>> Ross____<br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>><br>
>>>> On Tue, Feb 4, 2014 at 11:29 PM, Brian G. Peterson<br>
>>>> <<a href="mailto:brian@braverock.com">brian@braverock.com</a> <mailto:<a href="mailto:brian@braverock.com">brian@braverock.com</a>>> wrote:____<br>
>>>><br>
>>>> On 02/02/2014 10:25 PM, Ross Bennett wrote:____<br>
>>>><br>
>>>><br>
>>>> Enhance the print and summary methods for<br>
>>>> optimize.portfolio.rebalancing. Currently, a list of____<br>
>>>><br>
>>>><br>
>>>> optimize.portfolio objects at each rebalance period is<br>
>>>> returned.____<br>
>>>><br>
>>>> */[Doug] So does that imply one can now input a list of<br>
>>>> portfolio____<br>
>>>><br>
>>>><br>
>>>><br>
>>>> optimization strategy objects to<br>
>>>> "optimize.portfolio.rebalancing",<br>
>>>> e.g., each with different constraints and different<br>
>>>> objectives?____<br>
>>>><br>
>>>> (this would be very useful)/*____<br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>> No, that is currently not possible, but should not be too hard<br>
>>>> to<br>
>>>> implement. I could do this for optimize.portfolio as well. I<br>
>>>> think the<br>
>>>> most robust way to implement this would be to make<br>
>>>> optimize.portfolio()<br>
>>>> and optimize.portfolio.rebalancing() generic methods.<br>
>>>><br>
>>>> This would require a few minor design changes and I don't think<br>
>>>> it would<br>
>>>> break backwards compatibility. We would have to change the order<br>
>>>> of<br>
>>>> arguments for optimize.portfolio() and<br>
>>>> optimize.portfolio.rebalancing()<br>
>>>> so that 'portfolio' is the first argument, currently 'R' is the<br>
>>>> first<br>
>>>> argument.____<br>
>>>><br>
>>>><br>
>>>><br>
>>>> I think the desired functionality (take a list of portfolio objects)<br>
>>>> is a good idea.<br>
>>>><br>
>>>> I don't think relying on S3 dispatch and making optimize.portfolio.*<br>
>>>> into S3 generics makes sense though.<br>
>>>><br>
>>>> I say this because there's far too much shared code. The<br>
>>>> sub-functions for the different optimizer methods and special cases<br>
>>>> are far less code than the wrapper/framework function. I wouldn't<br>
>>>> want to duplicate all that code, or add a bunch of extra function<br>
>>>> calls in code that's called lots and lots of times.<br>
>>>><br>
>>>> Also, I *really* hate breaking backwards compatibility by<br>
>>>> rearranging arguments unless there's a compelling reason. For R<br>
>>>> generics like print/plot/summary, using S3 dispatch is the obvious<br>
>>>> and only answer, but for optimize.portfolio.*, I'd say leaving the<br>
>>>> arguments list alone makes the most sense.<br>
>>>><br>
>>>> I think you could add the loop over portfolio specification list<br>
>>>> elements (if it is a list) and collection of the results into a list<br>
>>>> of optimization results into the optimize.portfolio.* functions<br>
>>>> without too much work, and without breaking existing code.<br>
>>>><br>
>>>> Regards,<br>
>>>><br>
>>>> Brian<br>
>>>><br>
>>>> --<br>
>>>> Brian G. Peterson<br>
>>>> <a href="http://braverock.com/brian/" target="_blank">http://braverock.com/brian/</a><br>
>>>> Ph: <a href="tel:773-459-4973" value="+17734594973">773-459-4973</a> <tel:<a href="tel:773-459-4973" value="+17734594973">773-459-4973</a>><br>
>>>> IM: bgpbraverock____<br>
>>>><br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> GSoC-PortA mailing list<br>
>>>> <a href="mailto:GSoC-PortA@lists.r-forge.r-project.org">GSoC-PortA@lists.r-forge.r-project.org</a><br>
>>>> <mailto:<a href="mailto:GSoC-PortA@lists.r-forge.r-project.org">GSoC-PortA@lists.r-forge.r-project.org</a>><br>
>>>><br>
>>>> <a href="http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta____" target="_blank">http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta____</a><br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>> __ __<br>
>>>><br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> GSoC-PortA mailing list<br>
>>>> <a href="mailto:GSoC-PortA@lists.r-forge.r-project.org">GSoC-PortA@lists.r-forge.r-project.org</a><br>
>>>> <mailto:<a href="mailto:GSoC-PortA@lists.r-forge.r-project.org">GSoC-PortA@lists.r-forge.r-project.org</a>><br>
>>>><br>
>>>><br>
>>>> <a href="http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta" target="_blank">http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> GSoC-PortA mailing list<br>
>>>> <a href="mailto:GSoC-PortA@lists.r-forge.r-project.org">GSoC-PortA@lists.r-forge.r-project.org</a><br>
>>>> <a href="http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta" target="_blank">http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta</a><br>
>>>><br>
>>><br>
>>> --<br>
>>> Brian G. Peterson<br>
>>> <a href="http://braverock.com/brian/" target="_blank">http://braverock.com/brian/</a><br>
>>> Ph: <a href="tel:773-459-4973" value="+17734594973">773-459-4973</a><br>
>>> IM: bgpbraverock<br>
>>> _______________________________________________<br>
>>> GSoC-PortA mailing list<br>
>>> <a href="mailto:GSoC-PortA@lists.r-forge.r-project.org">GSoC-PortA@lists.r-forge.r-project.org</a><br>
>>> <a href="http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta" target="_blank">http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta</a><br>
>><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> GSoC-PortA mailing list<br>
> <a href="mailto:GSoC-PortA@lists.r-forge.r-project.org">GSoC-PortA@lists.r-forge.r-project.org</a><br>
> <a href="http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta" target="_blank">http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta</a><br>
><br>
_______________________________________________<br>
GSoC-PortA mailing list<br>
<a href="mailto:GSoC-PortA@lists.r-forge.r-project.org">GSoC-PortA@lists.r-forge.r-project.org</a><br>
<a href="http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta" target="_blank">http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta</a><br>
</div></div></blockquote></div><br></div>