[GSoC-PortA] Some feedback...

Peter Carl peter at braverock.com
Mon Sep 23 01:41:35 CEST 2013


Ross,

I've been working through your vignette to hopefully give you some more
detailed feedback, including on your questions from a few days ago.  Sorry
this has taken so long, but I wanted to spend some focused time on the
package.

I realize that you've got different plot methods for each type, and I
appreciate what a hassle it is to keep such methods relatively consistent.
 In chart.RiskReturn.DE, when the function doesn't find anything that fits
its defaults:
> plot(RiskBudget.DE)
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In chart.Scatter.DE(object = DE, risk.col = risk.col, return.col =
return.col,  :
  mean or ES do  not match extractStats output of $objective_measures slot
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf

It's a risk budget on ETL, so if I tell it that, it works:
> plot(RiskBudget.DE, risk.col="ETL", return.col="mean")

...but it doesn't recover well when I try to plot the results in variance
space:
> plot(RiskBudget.DE, risk.col="StdDev", return.col="mean")
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In chart.Scatter.DE(object = DE, risk.col = risk.col, return.col =
return.col,  :
  mean or StdDev do  not match extractStats output of $objective_measures
slot
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf


I'm not exactly sure what the issue is here, but maybe it's related:
> chart.RiskBudget(RiskBudget.DE, risk.type="percentage", neighbors=5)
Error in subsetx[i, riskcols] : incorrect number of dimensions
> traceback()
3: points(subsetx[i, riskcols], type = "b", col = "lightblue")
2: chart.RiskBudget.optimize.portfolio(RiskBudget.DE, risk.type =
"percentage",
       neighbors = 5)
1: chart.RiskBudget(RiskBudget.DE, risk.type = "percentage", neighbors = 5)

In chart.RiskReturnScatter.RP, it looks like 'rp' is being passed into
plot through dots.
> plot(EqmETL.RND, risk.col="StdDev", return.col="mean", rp=1000,
chart.assets=TRUE)
There were 13 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: "rp" is not a graphical parameter
2: "rp" is not a graphical parameter
3: "rp" is not a graphical parameter


> extractWeights(buoys)
         Convertible Arbitrage Equity Market Neutral Fixed Income
Arbitrage Event Driven CTA Global Global Macro Long/Short Equity
MeanSD              0.05000000                 0.050                 
0.050   0.30000000  0.0500000    0.2000000             0.300
MeanmETL            0.05000000                 0.300                 
0.050   0.05000000  0.2000000    0.3000000             0.050
MinSD               0.06042904                 0.300                 
0.300   0.05234676  0.1735858    0.0636384             0.050
MinmETL             0.05000000                 0.300                 
0.050   0.05000000  0.2000000    0.3000000             0.050
EqSD                0.12500000                 0.240                 
0.200   0.08500000  0.1050000    0.1700000             0.075
EqmETL              0.06000000                 0.265                 
0.165   0.09000000  0.2050000    0.1300000             0.080
RB                  0.05200000                 0.410                 
0.060   0.05200000  0.1438995    0.2220000             0.058

...but this doesn't:
> extractObjectiveMeasures(buoys)
                mean     StdDev         ES StdDev.contribution1
StdDev.contribution2 StdDev.contribution3
StdDev.contribution4
MeanSD   0.006782814 0.01546759         NA                   NA           
       NA                   NA                   NA
MeanmETL 0.005897789         NA 0.01505626                   NA           
       NA                   NA                   NA
MinSD             NA 0.01009001         NA                   NA           
       NA                   NA                   NA
MinmETL           NA         NA 0.01505626                   NA           
       NA                   NA                   NA
EqSD              NA 0.01113716         NA          0.001763096         
0.001565752          0.001886988          0.001258567
EqmETL            NA         NA 0.01646509                   NA           
       NA                   NA                   NA
RB       0.005812997         NA         NA                   NA           
       NA                   NA                   NA
         StdDev.contribution5 StdDev.contribution6 StdDev.contribution7
StdDev.pct_contrib_StdDev1 StdDev.pct_contrib_StdDev2
MeanSD                     NA                   NA                   NA   
                     NA                         NA
MeanmETL                   NA                   NA                   NA   
                     NA                         NA
MinSD                      NA                   NA                   NA   
                     NA                         NA
MinmETL                    NA                   NA                   NA   
                     NA                         NA
EqSD              0.001039908          0.002296903          0.001325947   
              0.1583075                  0.1405881
EqmETL                     NA                   NA                   NA   
                     NA                         NA
RB                         NA                   NA                   NA   
                     NA                         NA
...snip...

As a consequence, only one portfolio appears in the following plot (MeanSD):
> chart.RiskReward(buoys)

All in all, this is all looking good.  I've got some scripts checked in
under sandbox/symposium2013 if you want to follow along.

pcc
-- 
Peter Carl
http://www.braverock.com/peter




More information about the GSoC-PortA mailing list