[R-SIG-Finance] fPortfolio maxreturnPortfolio
Bengoechea Bartolomé Enrique (SIES 73)
enrique.bengoechea at credit-suisse.com
Mon Dec 29 10:27:40 CET 2008
Hi,
I've just upgraded package fPortfolio to v280.74. Funcion maxreturnPortfolio() does not seem to work, see example code below. Anyone using it? Maybe I'm using it incorrectly, but no examples are provided in the documentation. Any hint?
Best,
Enrique
> Data <- as.timeSeries(data(smallcap.ts))
> Data <- Data[, c("BKE", "GG", "GYMB", "KRON")]
> Spec <- portfolioSpec()
> setTargetRisk(Spec) <- 0.2
> maxreturnPortfolio(data=Data, spec=Spec, constraints="LongOnly")
Error in eqsumWConstraints(data, spec, constraints) :
Target Return is Missing
> sessionInfo()
R version 2.8.1 (2008-12-22)
i386-pc-mingw32
locale:
LC_COLLATE=Spanish_Spain.1252;LC_CTYPE=Spanish_Spain.1252;LC_MONETARY=Spanish_Spain.1252;LC_NUMERIC=C;LC_TIME=Spanish_Spain.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] fPortfolio_280.74 Rglpk_0.2-7 quadprog_1.4-11 fAssets_280.74
[5] fCopulae_270.74 adapt_1.0-4 robustbase_0.4-3 sn_0.4-8
[9] mnormt_1.3-1 fBasics_280.74 timeSeries_290.79 timeDate_290.81
[13] MASS_7.2-45
loaded via a namespace (and not attached):
[1] tools_2.8.1
------------------------------
Date: Thu, 27 Nov 2008 12:43:53 -0800 (PST)
From: patzoul <patzoul at free.fr>
Subject: Re: [R-SIG-Finance] [R-sig-finance] fPortfolio target risk optimization?
To: r-sig-finance at stat.math.ethz.ch
Message-ID: <20725348.post at talk.nabble.com>
The function "maxreturnPortfolio" is in fPortfolio v280.74.
Enrique Bengoechea wrote:
>
> Many thanks Hugh and Thomas for your answers. I realize that return
> maximization is a harder numerical problem than risk minimization, so my
> thought was doing something along the lines of Thomas' search suggestion.
> Just wondered if that was not already programmed into the package. Your
> answers were very useful.
>
> patzoul, I cannot find function "maxreturnPortfolio" in fPortfolio
> v260.72, where have you seen it? A more recent version of fPortfolio?
>
> Best,
>
> Enrique
>
More information about the R-SIG-Finance
mailing list