<div>Brian,</div><div><br></div>I modified the code where v1 vs. v2 has an effect in an effort to maintain backwards compatibility. With the revisions, we are actually supporting backwards compatibility in two ways.<div><br>
</div><div>1. The user can specify the v1 constraint object using the old way and add objectives with add.objective_v1. Then all that is needed is to run the optimization with the old interface is use optimize.portfolio_v1. </div>
<div><br></div><div>2. The user can specify the v1 constraint object using the old way and add objectives with add.objective_v1. Then the user can use optimize.portfolio and pass the v1_constraint object as the constraints argument. The one minor drawback is that the user still needs to specify a portfolio object so that I can update it with the constraints and objectives from the v1_constraint object. The portfolio object does not need to have any constraints or objectives, so the user only has to add one line of code (in most cases). The major upside is that this will work with the new utility functions (print, summary, plot) that work with the v2 specification.</div>
<div><br></div><div>I also added a testing script with examples of backwards compatibility.</div><div><br></div><div>Let me know if you have any other suggestions regarding backwards compatibility or if the portfolio manager that reached out to you has any questions or feedback with the latest revisions.</div>
<div><br></div><div>Thanks,</div><div>Ross<br><br><div class="gmail_quote">On Wed, Jul 31, 2013 at 8:25 AM, Brian G. Peterson <span dir="ltr"><<a href="mailto:brian@braverock.com" target="_blank">brian@braverock.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes, a warning to the effect of:<br>
<br>
"v1 constraints object detected, converting to v2 portfolio specification"<br>
<br>
seems to be in order. At least that should tell the user that they might want to update some code.<br>
<br>
Regards,<br>
<br>
Brian<div class="im"><br>
<br>
<br>
On 07/31/2013 08:24 AM, Ross Bennett wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Brian,<br>
<br>
I think that makes a lot of sense and can be done. It should be pretty<br>
straightforward to do. Should I also include a message warning the user<br>
about using the v1 constraint object?<br>
<br>
Thanks,<br>
Ross<br>
<br>
On Jul 30, 2013 8:05 PM, "Brian G. Peterson" <<a href="mailto:brian@braverock.com" target="_blank">brian@braverock.com</a><br></div><div class="im">
<mailto:<a href="mailto:brian@braverock.com" target="_blank">brian@braverock.com</a>>> wrote:<br>
<br>
I got an IM from a portfolio manager in Canada today.<br>
<br>
He said:<br>
<br>
"I had a fun time exploring new portfolio object on the weekend as I<br>
had to svn it to my newly formatted laptop. the concept of the<br>
portfolio object is really powerful, but a lot of code had to be<br>
modified for backwards compatibility"<br>
<br>
Which raises the topic of the subject line.<br>
<br>
It seems that we should detect when the user has passed a v1<br>
'constraints' object into optimize.portfolio, and upgrade it to the<br>
v2 specification.<br>
<br>
Thoughts?<br>
<br>
Brian<br>
<br>
--<br>
Brian G. Peterson<br>
<a href="http://braverock.com/brian/" target="_blank">http://braverock.com/brian/</a><br></div>
Ph: <a href="tel:773-459-4973" value="+17734594973" target="_blank">773-459-4973</a> <tel:<a href="tel:773-459-4973" value="+17734594973" target="_blank">773-459-4973</a>><br>
IM: bgpbraverock<br>
______________________________<u></u>___________________<br>
GSoC-PortA mailing list<br>
<a href="mailto:GSoC-PortA@lists.r-forge.r-__project.org" target="_blank">GSoC-PortA@lists.r-forge.r-__<u></u>project.org</a><br>
<mailto:<a href="mailto:GSoC-PortA@lists.r-forge.r-project.org" target="_blank">GSoC-PortA@lists.r-<u></u>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-__<u></u>project.org/cgi-bin/mailman/__<u></u>listinfo/gsoc-porta</a><br>
<<a href="http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta" target="_blank">http://lists.r-forge.r-<u></u>project.org/cgi-bin/mailman/<u></u>listinfo/gsoc-porta</a>><div class="im"><br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
GSoC-PortA mailing list<br>
<a href="mailto:GSoC-PortA@lists.r-forge.r-project.org" target="_blank">GSoC-PortA@lists.r-forge.r-<u></u>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-<u></u>project.org/cgi-bin/mailman/<u></u>listinfo/gsoc-porta</a><br>
<br>
</div></blockquote><div class="HOEnZb"><div class="h5">
<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" target="_blank">773-459-4973</a><br>
IM: bgpbraverock<br>
______________________________<u></u>_________________<br>
GSoC-PortA mailing list<br>
<a href="mailto:GSoC-PortA@lists.r-forge.r-project.org" target="_blank">GSoC-PortA@lists.r-forge.r-<u></u>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-<u></u>project.org/cgi-bin/mailman/<u></u>listinfo/gsoc-porta</a><br>
</div></div></blockquote></div><br></div>