[R-SIG-Finance] Backtesting without long-only constraint

Brian G. Peterson brian at braverock.com
Fri Aug 19 19:42:07 CEST 2016


On Fri, 2016-08-19 at 18:31 +0100, d.indjic at iee.org wrote:
> Are there any libraries enabling the portfolio back testing a la
> PortfolioAnalytics's Portfolio.return() with -ve weightings, or relaxed
> leverage constraint?

Return.portfolio in PerformanceAnalytics supports whatever you want for
the weights vector, including negative weights and leverage.

You speak about 'portfolio back testing' without specifics, so I'll
assume that you mean a portfolio optimization with periodic rebalancing.

If my assumption is correct, you can use the package PortfolioAnalytics
for rebalancing optimizations of long/short portfolios with or without
leverage constraints.  It can also support selective constraint
relaxation to get to a feasible portfolio.  

Be aware that more complicated constraints and objectives rapidly get
into the territory of stochastic global solvers like differential
evolution, particle swarms, and simulated annealing, or constraint-based
random search of the feasible space.   These are all supported, but may
take a long time or be difficult to get convergence.

Regards,

Brian



More information about the R-SIG-Finance mailing list