Skip to content
Prev 11931 / 15274 Next

Parma Package QP optimization Failing and Ignoring Leverage Constraint

1. This works just fine: (LB and UB should be a vector)
myspec<-parmaspec(S=cov(R),forecast=100*abs(colMeans(R)),LB=rep(-0.05,15),UB=rep(0.05,15),budget=0,risk='EV',riskType='minrisk',target=0.0030346)
mysol <- parmasolve(myspec,type='QP')
+---------------------------------+
|        PARMA Portfolio          |
+---------------------------------+
No.Assets               : 15
Problem                 : QP
Risk Measure            : EV
Objective               : minrisk
Risk                    : 3e-07
Reward                  : 0.0030346

    Optimal_Weights
EWG          0.0293
EEM          0.0206
EWL          0.0174
TLT          0.0120
EZA          0.0107
EWA          0.0107
EPP          0.0106
EWC          0.0094
IWO          0.0061
IWN          0.0051
IWF         -0.0078
EWJ         -0.0214
EWU         -0.0221
IWD         -0.0309
EWQ         -0.0500


2. You've set leverage with a quadratic solver. How do you suppose the
absolute value function can be accommodated in this problem?
This works:
myspec <-
parmaspec(scenario=as.matrix(R),forecast=100*abs(colMeans(R)),LB=rep(-0.05,15),UB=rep(0.05,15),leverage=0.1,risk='EV',riskType='minrisk',target=0.0030346)
mysol <- parmasolve(myspec, type='NLP', w0=rep(0.01,15))
sum(abs(weights(mysol)))

i.e. use a scenario matrix instead and solver as NLP (and make sure to
provide a set of starting weights 'w0').


I suppose I should add more checks/warnings.


Regards,

Alexios
On 30/09/2013 22:52, Preston Li wrote: