Financial market overview

3 Ways to Test Your Investment Strategy

2023.08.05 04:45

There are three basic ways to test an investment strategy. Each has its own unique set of pros and cons, but only one is practical.

1. Out-Of-Sample Testing With Real Money

The best approach is to develop a strategy and then run it with real money out of sample for at least 3 to 5 years. Longer is even better. That’s the gold standard, but that takes time, and so there are obvious limitations. Be careful not to confuse this version of out-of-sample testing with its pseudo-out-of-sample cousin, which uses a portion of historical data to build a model and then tests it on the remaining unused “out of sample” historical numbers. Useful, but no substitute for the genuine article.

2. Paper Trading

The weakest alternative is to develop a strategy and paper trade to decide if it passes the smell test. Relatively easy and quick, but here too, there are clear challenges, namely, the transition from theory to empirical usually brings many surprises.

3. Backtesting

The best (or should we say the least worst) alternative is to backtest a strategy. The idea here is that you can have the best of both worlds: a rough approximation in the here and now of how a strategy would have fared if implemented at some point decades ago. Alas, this is no silver bullet either since no backtest can flawlessly tell you how a strategy will perform in the years ahead. But short of acquiring the powers to see into the future, it’s the best that mere mortals can do.

Indeed, the key advantage to historical backtesting: you don’t have to wait years to determine if a strategy is a winner or a dog. Another plus: you’re not totally reliant on theory for assessing how the future may unfold.

The critical issue, of course, is designing a backtest that comes close to replicating the real world through a historical lens. Easier said than done. A poorly designed backtest is usually worse than simply making guesstimates. That’s a crucial hazard since there are more ways to delude yourself with backtests than there are techniques for developing a robust test.

In fact, building a useful backtest is a delicate dance of art and science. Ideally, you’ll run many techniques, recognizing that developing useful backtest data and assessing it accurately and objectively is a bit like the tale of blind men trying to describe an elephant. Approximating the truth requires combining multiple descriptions and perspectives.

In short, there are no silver bullets for building a solid backtest. Quite a bit of successfully building and evaluating historical simulations is avoiding rookie mistakes. One error I see a lot is using a single time window to do the heavy lifting.

For instance, backtesting a strategy that looks impressive over a 2000-2023 sample period may be misleading because it relies heavily on sidestepping much of the 2008-2009 financial crash. But it’s problematic if, after taking out that period or using a post-2009 start date, the strategy falls apart.

The Best Way to Backtest a Strategy

There are many ways to guard against this pitfall, including my favorite technique: assembling a backtest using rolling-forward start dates and then assessing all the time-window results for determining the strategy’s stability (or lack thereof) through time.

As an example, consider a simple 60%/40% stock/bond portfolio that’s rebalanced to the target weights at the end of each calendar year. We’ll use SPDR® (NYSE:) and iShares Core U.S. Aggregate Bond ETF (NYSE:). This toy example begins with a Jan. 1, 2016 start date and calculates the annualized return through Aug. 2, 2023, via daily numbers.

The analytics calculates the full period return using a Jan. 2, 2016 start date and then uses a Jan. 3 start date, and so on. The goal is to aggregate all the annualized returns for each time window and evaluate the distribution, as shown in the chart below.

Distribution Of 60/40 Strategy's Annualized ReturnsDistribution Of 60/40 Strategy’s Annualized Returns

Conclusion

The main takeaway: the performance is heavily skewed toward a moderately positive result. The interquartile range of returns is 3.6% to 6.8%, shown by the two blue lines, with a median of 6.2% (red line). Deciding if this is acceptable or not is a bigger question. The point, for now, is that we’re not relying on one time window, which may be deeply flawed for one reason or another.

If this was a robust rolling-forward backtest, we’d use a much earlier start date. We’d also run a batter of other analytics before making a final judgment. But as a first step for deciding whether it’s wise to go deeper or look elsewhere, this is a relatively painless, quick, and useful test. By contrast, a backtest that uses one start date may be faulty in the extreme.

Source link

Related Articles

Back to top button
bitcoin
Bitcoin (BTC) $ 95,298.53 2.26%
ethereum
Ethereum (ETH) $ 3,298.46 2.69%
tether
Tether (USDT) $ 1.00 0.03%
xrp
XRP (XRP) $ 2.22 1.61%
bnb
BNB (BNB) $ 655.49 1.88%
solana
Solana (SOL) $ 181.64 2.64%
dogecoin
Dogecoin (DOGE) $ 0.31234 4.37%
usd-coin
USDC (USDC) $ 1.00 0.07%
staked-ether
Lido Staked Ether (STETH) $ 3,292.37 2.81%
cardano
Cardano (ADA) $ 0.887383 3.67%
tron
TRON (TRX) $ 0.245747 0.12%
avalanche-2
Avalanche (AVAX) $ 36.98 4.27%
wrapped-steth
Wrapped stETH (WSTETH) $ 3,914.17 2.68%
the-open-network
Toncoin (TON) $ 5.39 0.85%
chainlink
Chainlink (LINK) $ 21.76 4.92%
wrapped-bitcoin
Wrapped Bitcoin (WBTC) $ 95,034.46 2.30%
shiba-inu
Shiba Inu (SHIB) $ 0.000022 3.29%
sui
Sui (SUI) $ 4.23 8.29%
stellar
Stellar (XLM) $ 0.355945 2.04%
hyperliquid
Hyperliquid (HYPE) $ 31.42 2.76%
polkadot
Polkadot (DOT) $ 6.89 3.07%
hedera-hashgraph
Hedera (HBAR) $ 0.258491 0.16%
weth
WETH (WETH) $ 3,298.34 2.71%
bitcoin-cash
Bitcoin Cash (BCH) $ 444.54 2.18%
leo-token
LEO Token (LEO) $ 9.34 0.61%
uniswap
Uniswap (UNI) $ 13.74 1.25%
litecoin
Litecoin (LTC) $ 100.50 0.28%
pepe
Pepe (PEPE) $ 0.000017 2.45%
wrapped-eeth
Wrapped eETH (WEETH) $ 3,478.18 2.54%
near
NEAR Protocol (NEAR) $ 5.02 2.67%
ethena-usde
Ethena USDe (USDE) $ 0.999341 0.07%
bitget-token
Bitget Token (BGB) $ 4.12 3.81%
usds
USDS (USDS) $ 1.00 0.14%
aptos
Aptos (APT) $ 9.24 6.65%
internet-computer
Internet Computer (ICP) $ 9.87 5.53%
aave
Aave (AAVE) $ 299.58 3.04%
crypto-com-chain
Cronos (CRO) $ 0.156513 3.11%
polygon-ecosystem-token
POL (ex-MATIC) (POL) $ 0.477012 1.13%
mantle
Mantle (MNT) $ 1.16 2.36%
ethereum-classic
Ethereum Classic (ETC) $ 25.93 2.06%
vechain
VeChain (VET) $ 0.045327 3.06%
render-token
Render (RENDER) $ 7.04 3.54%
monero
Monero (XMR) $ 190.52 1.11%
whitebit
WhiteBIT Coin (WBT) $ 24.34 0.50%
mantra-dao
MANTRA (OM) $ 3.65 2.74%
dai
Dai (DAI) $ 1.00 0.17%
bittensor
Bittensor (TAO) $ 453.76 3.24%
fetch-ai
Artificial Superintelligence Alliance (FET) $ 1.26 3.60%
arbitrum
Arbitrum (ARB) $ 0.743661 2.83%
kaspa
Kaspa (KAS) $ 0.118162 3.51%