[GSoC-PortA] Constraints and Objectives Separately in Optimize.Portfolio
Brian G. Peterson
brian at braverock.com
Sun Jul 28 20:53:42 CEST 2013
On 07/28/2013 01:50 PM, Doug Martin wrote:
> */[Doug] Indeed, this is crucial. I did the following with backtest
> code I used in the spring – it has a function backtest.weight that
> generates the time series of rebalanced weights, and looks like this
> locally (one of a bunch of examples):/*
>
> *//*
>
> */weight.mvlub <- backtest.weight(ret, t.mw, FUN =
> "port.mvlub",blo,bup)$weight/*
>
> */weight.mveq <- backtest.weight(ret, t.mw, port.eq)$weight/*
>
> *//*
>
> */So I’m wondering if we can’t have FUN = optimize.portfolio, and pass
> the arguments for constraints and/or ojbectives as in the case of blo
> and bup for each instance of executing backtest.weight? I will, as we
> discussed in Hood River, end up using the PortfolioAnalytics backtest
> capability./*
>
> *//*
>
Well, optimize.portfolio.rebalancing already exists, and I think covers
thae most common use case of periodic rebalancing of a portfolio for an
'out of sample' test of your portfolio specification (w/
constraints/objectives).
optimize.portfolio.rebalancing already returns the weights used for each
rebalancing period, as well as the out of sample returns of the portfolio.
--
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock
More information about the GSoC-PortA
mailing list