<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 23, 2013 at 7:38 AM, Brian G. Peterson <span dir="ltr"><<a href="mailto:brian@braverock.com" target="_blank">brian@braverock.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><div class="h5">
<br></div></div>
The returned object is a named list.<br>
<br>
As such, the second objective with the same name overwrites the first. Both are calculated, but only one will get written.<br>
<br>
Dealing with this could be tricky.<br>
<br>
On the one hand, the component risk measures *do* calculate the univariate portfolio risk too. So if we know that they have the same name, we can just get the correct info from the slots.<br>
<br>
On the other hand, it may make for simpler code to rename the second defined objective, or to rename all objectives to be <a href="http://objectivetype.name" target="_blank">objectivetype.name</a> e.g. risk_budget.ETL, risk.ETL or alternately, making the list multi-level, with objective types being a heirarchy above the individual objectives.<br>
</blockquote><div><br></div><div style>I think that might be the best approach to rename the objectives to be <a href="http://objectivetype.name">objectivetype.name</a>. The main area that will be affected is the functions that depend on the extractStats output, mainly the charting and generic functions. I think we'll still want the user to specify risk.col="ES" and not risk.col="risk.ES". A good solution might be to rename the objective as suggested above and then deal with the column naming in extractStats. Thoughts?</div>
<div style><br></div></div><br></div></div>