• No results found

Rebalancing and Finalization Strategies

In document A Novel Algorithmic Trading Framework (Page 110-114)

3.2 Framework Implementation

4.1.2 Rebalancing and Finalization Strategies

It is not always appropriate to directly apply a portfolio from a portfolio generator.

Applying a portfolio with low or no expected increase in return or decrease in risk can be bad because of transaction costs. Investing in positions that have negli-gible size reduces stability and increase administration. Making sure a portfolio conforms to requirements and that the suggested portfolio is a good idea is the domain of the rebalancer and the process of finalizing the portfolio.

Rebalancing

In a practical sense, the rebalancer is a transit processor that inputs a stream of portfolios and decides when it is appropriate to rebalance. When a portfolio is rebalanced it is in essence applied to the market incurring a transaction cost. The main reason for having a rebalancer is the potential for astronomical transaction costs when a portfolio generator is left to its own accord. There are different rebal-ancer implementations. The two main implementations is the portfolio distance rebalancer and the expected portfolio utility rebalancer .

Market

Evaluator applied portfolio data

Portfolio Selector

Rebalancer

PG PG PG

selected portfolio portfolios

Figure 4.4: A more advanced trading system that applies multiple portfolio generators (PG), aggregating them by using a portfolio selector. A single or a mixture of multiple portfolios is selected for rebalancing review.

Portfolio Distance Rebalancer. The simpler portfolio distance rebalancer cal-culates the p-norm distance function between the existing portfolio wt−1 and the new suggested portfolio ut. If the portfolio distance is larger than some absolute term γ then it may be applied as shown in 4.3.

wt=

( ||ut− wt−1||p > γ ut

else wt−1 (4.3)

A typical norm to use is p = 1, i.e., the Manhattan distance. This method simple and quick, but can lead to frequent rebalancing if the input oscillates between two portfolios with very different distribution, but with quite similar financial properties i.e. mean and variance.

Expected Portfolio Utility Rebalancer. As discussed in section 2.1.3, utility functions can be used to numerically evaluate the utility of a portfolio based on its performance measures. It is possible to use a utility function to evaluate both

94 Trading System Implementation

the existing portfolio compared to a new suggested portfolio. If the new portfolio is better by some margin then it is applied. There is two ways to use a threshold γ to achieve this. The first is similar to that of (4.3) and looks at how much better in absolute terms a portfolio’s utility must be. This approach is shown in (4.4).

wt=

( U (ut; R) − U (wt; R) > γ ut

else wt−1 (4.4)

The problem here is that it isn’t always simple to know how much better, in utility units, a portfolio should be. Granted it can be evolved as a meta-parameter thus a useful threshold will emerge. An alternative that is more intuitive to humans is to specificity in relative terms how much better the portfolio must be. This is shown in (4.5), where it states that a new suggested portfolio should be used if its utility is γ percent better than the existing portfolio’s utility.

wt =

( U (wt; R) > (1 + γ)U (ut; R) ut

else wt−1 (4.5)

Notice that the utility function has return matrix R as a known parameter. This is the sample returns that are used to calculate the utility. It could be the entire return matrix, or just a recent subset. Two utility functions have been applied.

The first (4.6) is a linear combination of the mean return and the variance, using a risk aversion factor ρ, time periods T , and definition (2.5) of the covariance matrix Σ.

U (w; R, ρ) = ¯rw− ρσw2 = 1TRw

T − ρwTΣw (4.6)

An alternative utility uses the risk-return ratio as shown in (4.7). This version is only applicable for datasets without a risk-free asset. By allocating all investment capital to the risk-free asset the risk term can achieve σ2w= 0, thus U (w; R) = ∞.

This means that (4.6) is be a safer bet, although with the added burden of assigning a level of risk aversion.

U (w; R) = ¯rw

σw2 = 1TRw

T wTΣw (4.7)

Finalization

When a portfolio has been through the rebalancing and is ready to be applied, a final stage might yet intervene. Finalization is a collective term for many last minute adjustments. Removal of negligible positions, stop loss and renormalization are important examples.

Small Positions Pruner. Portfolios might have peculiar miniature positions that are nothing but negligible. These small positions can be very expensive to con-stantly reapply, especially if a fixed cost is applied. It can be solved by simply requiring a minimum position by nullifying any position below a threshold followed by renormalization. This is a quick and dirty method, however, it is not meant to significantly alter the portfolio composition. It deals with marginal positions that can occur for technical reasons, like rounding errors.

Signal Flip. Sometimes the simplest methods, e.g., technical analysis, consis-tently underperform. In these cases it can be advantageous to simply reverse the signal the method gives. The meta-training phase determines if it is to be used case by case. In all honesty, this method was implemented as a intuitive response to extraordinarily bad returns generated by some technical analysis traders. The flip is performed by either flipping the portfolio positions or the price indicator move-ments, then applying renormalization. Given a portfolio or prediction v ∈ [0, 1]n, flipping is performed by the transformation in (4.8) yielding a portfolio w.

w = 1 − v

1T(1 − v) (4.8)

Stop-Loss. Applying a stop-loss mechanism is a common method to try reducing losses. If the price of an asset drops below a certain threshold the mechanism automatically forces the position to be terminated. A version of stop-loss is the trailing stop-loss. It wipes out a position wti in wt if it drops below a threshold γ ∈ [0, 1] relative to the maximum achieved price, i.e., max pi. The lookback for the maximum achieved price is measured from the last rebalancing.

wti=

( pti< γ max pi 0

else wti (4.9)

Notice that wiping out a position requires the invested capital to be allocated to some other asset. This can be done either by renormalization or putting it in the risk-free asset.

96 Trading System Candidates

In document A Novel Algorithmic Trading Framework (Page 110-114)