[R-SIG-Finance] fPortfolio error

Attiglah, Mama Mama_Attiglah at ssga.com
Fri Nov 14 15:58:25 CET 2008

Hi All,  
I have been trying to use some of the Rmetrics packages to do some quick analysis but experiencing a pb of flexibility that I willl explain below by the package own example. 

#   Data = as.timeSeries(data(smallcap.ts))
   Data = Data[, c("BKE", "GG", "GYMB", "KRON")]
   Spec = portfolioSpec()
   setTargetReturn(Spec) = mean(colMeans(Data))
   Constraints = "LongOnly"

Ans = minvariancePortfolio(Data, Spec, Constraints)

In the optimisation, the historical mean and cov matrix 
       BKE         GG       GYMB       KRON 
0.02749712 0.02198486 0.01204526 0.03570639 
              BKE           GG         GYMB         KRON
BKE   0.022526377 -0.003495562  0.010318065  0.007935904
GG   -0.003495562  0.036070945 -0.003806943 -0.006872127
GYMB  0.010318065 -0.003806943  0.049574959  0.008098270
KRON  0.007935904 -0.006872127  0.008098270  0.028025520
are input. 

1) My question is this: Is there anyway I can change any of those two inputs statistics computed from the historical data before feeding the optimizer, for instance if I have a different expectation of the future? 
In order words, in case I don't have the historical data but do have the expected returns and covariance matrix, can I still ran the optimiser? 

2) The target return set and the resulting portfolio returns coming from the optimal weights are different by 22 basis points. Is that due to the algorithm of solveRquadprog ? 

[1,] 0.02651604 
> Spec

Portfolio Specification:        
 Portfolio Type:            MV
 Optimize:                  minRisk
 Covariance Estimator:      covEstimator
 Target Return:             0.02430841
 Portfolio Risk-Free Rate:  0
 Number of Frontier Points: 50
 Optimizer:                 solveRquadprog 


Mama Attiglah, PhD
Quantitative Research Analyst
Advanced Research Centre
State Street Bank 
25 Bank Street, London E14 5NU 
+44(0)20 7698 6290 (Direct Line)
+44 (0)207 004 2968 (Direct Fax) 
Authorised and regulated by the Financial Services Authority.
State Street Global Advisors Limited, a company registered in England with company number 2509928
and VAT number 5576591 81 and whose registered office is...{{dropped:12}}

More information about the R-SIG-Finance mailing list