Restrict turnover in the optimization process.
This presumes that you can do a basic portfolio optimization. For example, that you have mastered “Passive, no benchmark (minimum variance)”.
- Portfolio Probe
You need to have the Portfolio Probe package loaded into your R session:
If you don’t have Portfolio Probe, see “Demo or Buy”.
Doing the example
- The objects:
curPortfolthat are defined in several examples, such as in “Passive, no benchmark (minimum variance)”
xaLWvar06variance matrix from “Returns to variance matrix” example
We perform an optimization with a limit on turnover (buys plus sells):
opTurnover <- trade.optimizer(priceVector, variance=xaLWvar06, existing=curPortfol, gross=grossVal, long.only=TRUE, port.size=10, turnover=1e5)
(This command will produce a warning about utility that can be ignored.)
The value of the trade is:
> valuation(opTurnover$trade, priceVector)$total gross net long short 99998.42 19700.18 59849.30 40149.12
We imposed the constraint that the the turnover should be no more than 100,000 currency units. The trade is very close to that limit — about 1.6 away.
turnover argument takes a number in currency units that gives the upper limit on how much trading (buys plus sells) can take place. It is possible to give a range for the turnover — so there is a lower limit for turnover as well — but that is unlikely to be of use in optimization.
The example command produces a warning. The warning is because the default utility is to maximize the information ratio but the command does not include expected returns. Hence the default utility can not be done and it switches to minimizing variance. The easiest way to avoid the warning is to specify the utility. The other way to avoid the warning is to suppress it via the
It is good practice to eliminate all of the warnings that you expect so that you always pay attention to warnings. Unexpected warnings may well be an indication of a mistake.
- Impose transaction costs for a more sophisticated way of controlling turnover
- Example data
- Some hints for the R beginner
- the Portfolio Probe User’s Manual