[GSoC-PortA] Odd Behavior Depending on Order of Objectives
Ross Bennett
rossbennett34 at gmail.com
Tue Sep 24 05:28:26 CEST 2013
On Mon, Sep 23, 2013 at 7:38 AM, Brian G. Peterson <brian at braverock.com>wrote:
>
>
> The returned object is a named list.
>
> As such, the second objective with the same name overwrites the first.
> Both are calculated, but only one will get written.
>
> Dealing with this could be tricky.
>
> 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.
>
> On the other hand, it may make for simpler code to rename the second
> defined objective, or to rename all objectives to be objectivetype.namee.g. risk_budget.ETL, risk.ETL or alternately, making the list multi-level,
> with objective types being a heirarchy above the individual objectives.
>
I think that might be the best approach to rename the objectives to be
objectivetype.name. 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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/gsoc-porta/attachments/20130923/93d23259/attachment.html>
More information about the GSoC-PortA
mailing list