[GSoC-PortA] Regime Switching

Brian G. Peterson brian at braverock.com
Wed May 28 23:49:58 CEST 2014


What about generating an rp set for each portfolio constraint set, and 
using the superset as the rp object passed into optimize.portfolio in 
the loop?

I think this will automatically penalize the non-conforming portfolios 
(or can if we set a single parameter to do so), and the conforming 
portfolios will be the ones chosen on a objective value basis.

Should work with a minimum of messing with the code.

Regards,

Brian

On 05/28/2014 04:36 PM, Ross Bennett wrote:
> All,
>
> I am close to wrapping up adding support for regime switching as per my
> proposal. I added a demo so you can see an example of the functionality
> (see demo/regime_switching.R).
>
> There is one issue that came up that I would like some input on. The
> case is running optimize.portfolio.rebalancing with
> optimize_method="random".  If the rp object is not passed in as an
> argument to optimize.portfolio.rebalancing, then we try to generate the
> random portfolios there so the random portfolios are not (re)generated
> inside the loop in optimize.portfolio.
>
> Since the regime portfolio has N portfolios for N regimes, the challenge
> here is knowing what portfolio to use for generating the random
> portfolios because the constraints could be very different in each
> portfolio. This only impacts optimize.portfolio.rebalancing because we
> do not know the portfolio specification based on the regime at the time
> we check the rp object. We do know inside optimize.portfolio.
>
> The check for rp in optimize.portfolio.rebalancing looks like this
> if(optimize_method=="random"){
>      if(is.null(rp))
>        rp<-random_portfolios(portfolio=portfolio, permutations=search_size)
>    }
>
> I have a couple proposed solutions
>
> Solution 1:
> Require that the user pass in a random portfolios object for the rp
> argument. We don't try to generate random portfolios and we throw an
> error if rp is null. We could just use a single rp object or allow for a
> list of rp objects with one rp object for each regime portfolio.
>
> Solution 2:
> Bypass this check and let optimize.portfolio generate random portfolios
> for each regime at each iteration. This is flexible, but could result in
> very long run times.
>
> Are there any other solutions I should consider.
>
> Please let me know your thoughts on this.
>
> Thanks,
> Ross
>
>
>
>
> _______________________________________________
> GSoC-PortA mailing list
> GSoC-PortA at lists.r-forge.r-project.org
> http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta
>

-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock


More information about the GSoC-PortA mailing list