# Original paper

**Abstract**

We start by documenting trend-following (or time series momentum) in government bond, currency and equity index (all developed countries) at the asset class level, and at the multi-asset level, using 29 liquid instruments, with lookback periods ranging from 1 to 60 months. A typical multi-asset trend-following strategy delivers strong returns for short to medium term lookback periods. I document that trends spill over to other asset classes: past trends of assets can help to build investment strategies using other related assets. This spillover effect works better when using longer lookback periods than the sweet spot for trend-following.

**Keywords:**Â spillover, trend following, trends

# Trading rules

- Target assets: currency forwards, equity indices, and index futures.
- Assess interdependencies between asset categories:
- Bonds negatively influence FX and bolster Equities.
- Equities negatively influence both Bonds and FX.
- FX positively influences both Equities and Bonds.
- Lookback period: between 3 to 4 years.
- Define the signal by the signum function of the cumulative returns for the asset that has a spillover on another from date t minus the lookback period to date t.
- Allocate a third of the total risk allowance to each asset category.
- Equal risk distribution within asset categories.
- Derive asset weights by maximizing the sum of their natural logs in absolute values.
- Adjust asset allocations on a weekly basis.
- Construct a consolidated approach from six distinct strategies: Influence of bonds on FX and equities, influence of equities on FX and bonds, and influence of FX on bonds and equities.

# Python code

## Backtrader

```
import backtrader as bt
import numpy as np
import pandas as pd
class Spillover(bt.Strategy):
params = (
('lookback_period', 3*52), # 3 years weekly lookback, adjust to your data frequency
('rebalance_interval', 1*5), # weekly rebalance, adjust to your data frequency
)
def __init__(self):
self.lookback_period = self.params.lookback_period
self.rebalance_interval = self.params.rebalance_interval
self.inds = {}
def next(self):
if len(self.datas) % self.rebalance_interval == 0:
self.rebalance_portfolio()
def rebalance_portfolio(self):
# Here you should calculate the signals and determine portfolio weights
# This is a complex operation that will depend on the exact specifications of your strategy
# For simplicity, we will assume a function 'calculate_weights' that does this and returns a dictionary of weights
weights = self.calculate_weights()
for d, weight in weights.items():
self.order_target_percent(d, target=weight)
def calculate_weights(self):
# Placeholder for weight calculation
# This function should calculate and return the portfolio weights based on the strategy rules
# You will need to replace this with your own implementation
weights = {}
for d in self.datas:
weights[d] = 1.0 / len(self.datas) # Equal weights for now
return weights
if __name__ == '__main__':
cerebro = bt.Cerebro()
# Add data feeds for currency forwards, equity indices, and index futures
# ...
cerebro.addstrategy(Spillover)
cerebro.run()
```