[R-SIG-Finance] [R-sig-finance] error in maxreturnPortfolio
patzoul
patzoul at free.fr
Sun Nov 16 17:47:56 CET 2008
I am running the following script but get an error saying that the Target
Return is missing eventhough it is a n input that I dont need.
Data = as.timeSeries(data(smallcap.ts))
Data = Data[, c("BKE", "GG", "GYMB", "KRON")]
Spec = portfolioSpec()
#setTargetReturn(Spec) = mean(colMeans(Data))
setOptimize(Spec) = "maxReturn"
setTargetRisk(Spec) = 0.15
print(Spec)
mv <- maxreturnPortfolio(Data, Spec, Constraints)
print(mv)
What do I need to do to use maxreturnPortfolio?
--
View this message in context: http://www.nabble.com/error-in-maxreturnPortfolio-tp20527200p20527200.html
Sent from the Rmetrics mailing list archive at Nabble.com.
More information about the R-SIG-Finance
mailing list