Rebalancing

Rebalancing Strategies


 There are several rebalancing strategies that are often utilized by retail and institutional traders alike.

  • Calendar rebalancing: analyze the investment holdings within the portfolio at predetermined time intervals and adjust to the original allocation at a desired frequency. (i.e. monthly, quarterly, etc.)
  • Percentage Composition: constantly analyze the percentage weight of each asset in the portfolio, and adjust the asset when it exceeds its allowable percentage composition.

Using OptionStack, you can easily backtest these portfolio rebalancing strategies.

For the purposes of this tutorial, we will start with a 50 / 50 allocation between long SPY stock, and short QQQ ETF.

Example


For the purposes of this tutorial, we will start with a 50 / 50 allocation between long SPY stock and short QQQ stock.  And we will show how to do calendar rebalancing as well as percentage composition rebalancing.

  • Buy SPY Stock, size by cost equal to 50% of portfolio value at trade entry.
  • Sell QQQ stock, size by cost equal to 50% of portfolio value at trade entry.
  • Click here for details on how to use the Strategy block. 
Placeholder

Calendar Rebalancing


To backtest calendar-rebalancing strategies, you can use various calendar-based studies available in OptionStack.

Placeholder

In this example, we will rebalance monthly, on the first trading day of the month. We will rebalance the long SPY stock and short QQQ stock back to their original allocation of 50% / 50%.

Rolling the position can be used to simulate rebalancing.  We will roll the old position (whose percentage weight has changed due to market fluctuations), and roll into a new position with the desired percentage weight.

  • Roll existing long SPY into new long SPY position with target percentage weight
  • Roll existing short QQQ into new short QQQ position with target percentage weight.
  • Roll at first trading day of month:  WHEN (DaysSinceFirstTradingDayOfMonth equals to 0)

Define rolling using the Strategy block as follows:

  • Select “Roll From” as an action on the Strategy block
  • Size By Cost equals to 50% of the portfolio value at the time of rebalancing.

Percentage Rebalancing


Percentage composition rebalancing works the same way as calendar-based rebalancing, except we simply change the condition WHEN to trigger the rebalancing.

Instead of triggering the rebalancing on a calendar-basis, we can trigger the rebalancing WHEN certain percentage thresholds are exceeded.

For example, when the SPY percentage weight exceeds 60% of the portfolio, we can rebalance the portfolio.

  • WHEN marketValueAsPercentOfOverallPortfolio exceeds 60% for the SPY stock, trigger the rebalancing.
  • Use the “Roll From” action on the Strategy block to perform the actual rebalancing, similar to the calendar rebalancing. (see above)

Leave a Comment