Page 1 of 1

Realistic "Market Timing" Backtests

Posted: Fri Oct 30, 2015 3:55 pm
by MachineGhost
I'm so tired of seeing unrealistic "market timing" backtests from gooroos without using realistic investment vehicles, transaction costs, slippage accounted for or dividends reinvested, so I today I decided to finally do it myself to settle the debate once and for all.  I used point-in-time mutual funds buying at the next day's close, subtracted point-in-time commissions and used point-in-time T-Bill interest. 

The date range for the set spans from 05/03/1973 to 12/31/1996.

First up, here are the stats for a relative momentum "market timing' system, i.e. the 12-month ROC of stocks subtracted by the 12-month ROC of T-Bills and if > 0 go long, else stay in cash:

Code: Select all

 	All trades	Buy&Hold (~SPY)
Initial capital	1766	1766
Ending capital	9096.77	30421.16
Net Profit	7330.77	28655.16
Net Profit %	415.11%	1622.60%
Exposure %	74.80%	100.00%
Net Risk Adjusted Return %	554.96%	1622.60%
Annual Return %	7.19%	12.82%
Risk Adjusted Return %	9.61%	12.82%
Total transaction costs	881.36	324.77
		
Max. trade drawdown	-1625.93	-3278.71
Max. trade % drawdown	-29.77	-32.49
Max. system drawdown	-1688.2	-3278.71
Max. system % drawdown	-30.85%	-32.49%
Next we have the more traditional absolute momentum "market timing" system, i.e. the current close subtracted from the 10-month simple moving average of monthly closes, go long when > 0 else cash:

Code: Select all

 	All trades	Buy&Hold (~SPY)
Initial capital	1766	1766
Ending capital	12208.18	30421.16
Net Profit	10442.18	28655.16
Net Profit %	591.29%	1622.60%
Exposure %	75.58%	100.00%
Net Risk Adjusted Return %	782.34%	1622.60%
Annual Return %	8.54%	12.82%
Risk Adjusted Return %	11.29%	12.82%
Total transaction costs	1812.03	324.77
		
Max. trade drawdown	-2004.27	-3278.71
Max. trade % drawdown	-29.77	-32.49
Max. system drawdown	-2156.65	-3278.71
Max. system % drawdown	-31.93%	-32.49%
From 1/1/1998 to end of 2005, relative momentum:

Code: Select all

 	All trades	Buy&Hold (~SPY)
Initial capital	1766	1766
Ending capital	3149.28	2630.58
Net Profit	1383.28	864.58
Net Profit %	78.33%	48.96%
Exposure %	55.74%	100.00%
Net Risk Adjusted Return %	140.52%	48.96%
Annual Return %	7.58%	5.16%
Risk Adjusted Return %	13.59%	5.16%
Total transaction costs	23.49	11
		
Max. trade drawdown	-390.48	-1230.68
Max. trade % drawdown	-15.87	-44.14
Max. system drawdown	-390.15	-1230.68
Max. system % drawdown	-15.74%	-44.14%
Absolute momentum:

Code: Select all

 	All trades	Buy&Hold (~SPY)
Initial capital	1766	1766
Ending capital	2935.15	2630.58
Net Profit	1169.15	864.58
Net Profit %	66.20%	48.96%
Exposure %	56.96%	100.00%
Net Risk Adjusted Return %	116.22%	48.96%
Annual Return %	6.62%	5.16%
Risk Adjusted Return %	11.63%	5.16%
Total transaction costs	66.06	11
		
Max. trade drawdown	-377.88	-1230.68
Max. trade % drawdown	-15.87	-44.14
Max. system drawdown	-377.79	-1230.68
Max. system % drawdown	-15.83%	-44.14%
From 1/1/2006 to date, relative momentum:

Code: Select all

 	All trades	Buy&Hold (~SPY)
Initial capital	1766	1766
Ending capital	4613.77	3541.49
Net Profit	2847.77	1775.49
Net Profit %	161.26%	100.54%
Exposure %	58.89%	100.00%
Net Risk Adjusted Return %	273.83%	100.54%
Annual Return %	10.35%	7.40%
Risk Adjusted Return %	17.58%	7.40%
Total transaction costs	12.4	5.31
		
Max. trade drawdown	-500.28	-1112.24
Max. trade % drawdown	-17.76	-50.89
Max. system drawdown	-499.82	-1112.24
Max. system % drawdown	-17.66%	-50.89%
Absolute momentum:

Code: Select all

 	All trades	Buy&Hold (~SPY)
Initial capital	1766	1766
Ending capital	3983.24	3541.49
Net Profit	2217.24	1775.49
Net Profit %	125.55%	100.54%
Exposure %	56.44%	100.00%
Net Risk Adjusted Return %	222.46%	100.54%
Annual Return %	8.70%	7.40%
Risk Adjusted Return %	15.42%	7.40%
Total transaction costs	21.47	5.31
		
Max. trade drawdown	-556.5	-1112.24
Max. trade % drawdown	-17.76	-50.89
Max. system drawdown	-627.32	-1112.24
Max. system % drawdown	-19.85%	-50.89%

Re: Realistic "Market Timing" Backtests

Posted: Mon Nov 02, 2015 9:53 am
by Reub
Can you please sum this up for us mere mortals, MG?

Re: Realistic "Market Timing" Backtests

Posted: Mon Nov 02, 2015 11:46 am
by MachineGhost
Reub wrote: Can you please sum this up for us mere mortals, MG?
TL;DR is transaction costs in the past made it very unfeasible to engage in any kind of "market timing" that would be profitable today, especially with gold.  But assuming you got that under control, then you have a good chance of outperforming buy and hold.

I do not know if it will beat buy and hold after taxes.  Modeling that historically is problematic.

Re: Realistic "Market Timing" Backtests

Posted: Mon Nov 02, 2015 12:03 pm
by MWKXJ
MachineGhost wrote:
Reub wrote: Can you please sum this up for us mere mortals, MG?
TL;DR is transaction costs in the past made it very unfeasible to engage in any kind of "market timing" that would be profitable today, especially with gold.  But assuming you got that under control, then you have a good chance of outperforming buy and hold.

I do not know if it will beat buy and hold after taxes.  Modeling that historically is problematic.
Before doing something I try to ask myself, "what would happen if everyone else did this?"  I'm not sure what to make of "holdings" lasting days, hours, or even minutes.  As people increasingly adopt timing, what will that do to market volitility, and more importantly, the ability to time the market at all?

Re: Realistic "Market Timing" Backtests

Posted: Mon Nov 02, 2015 12:37 pm
by MachineGhost
MWKXJ wrote: Before doing something I try to ask myself, "what would happen if everyone else did this?"  I'm not sure what to make of "holdings" lasting days, hours, or even minutes.  As people increasingly adopt timing, what will that do to market volitility, and more importantly, the ability to time the market at all?
Yeah, its a potential issue, but the momentum anomaly has lasted for hundreds of years and "market timing" is just a version of measuring absolute or relative momentum.  So if it relies on behavorial flaws for existence, its a good bet it will persist.

OTOH, a bigger risk is the rise of roboadvisors that use "market timing" like Hedgeable, Hedgewise and Alpha Architect.  All of which I have or will have portolios with.  They all use different strategies, so strategy diversification is essential for robustness.  It could become a crowded trade over time just as Boglehead indexing has.

I am currently researching what approach to use with the Volatility Parity PP.  Needs to be different than the above three.  Hedgeable uses Constant Proportion Portfolio Insurance.  I think Hedgewise uses the strategic PP weights with traditional absolute momentum (they're still in beta) and Alpha Architect uses a dual relative & absolute momentum approach, but they use the dumb Faber diversification model.  I will probably use a combination of volatility expansion and dual momentum since that seems to be the best of all worlds.

Did everyone cover their short S&P500 position at the open of this month? :)  Good whipsaw.

Re: Realistic "Market Timing" Backtests

Posted: Mon Nov 02, 2015 2:20 pm
by D1984
MG,

What are the parameters you used for this backtest as regards commissions, slippage, and trading costs? How much of a percentage did you assume the commissions and/or trading costs for mutual funds, bonds, and gold were?

Re: Realistic "Market Timing" Backtests

Posted: Mon Nov 02, 2015 4:08 pm
by Kbg
MG,

Looks like Amibroker...how do you get the side by side SPY buy and hold columns?

Re: Realistic "Market Timing" Backtests

Posted: Mon Nov 02, 2015 4:47 pm
by MachineGhost
D1984 wrote: What are the parameters you used for this backtest as regards commissions, slippage, and trading costs? How much of a percentage did you assume the commissions and/or trading costs for mutual funds, bonds, and gold were?
In percentages:

IIF(Datenum()<=961231,SetOption("CommissionAmount",1.0),
IIF(Datenum()<=971231,SetOption("CommissionAmount",.75),
IIF(Datenum()<=1051231,SetOption("CommissionAmount",.25),
SetOption("CommissionAmount",.1))));

...bought at the close the next day after the signal and used mutual funds then later ETFs for the equity.  I kept the gold and bonds as indexes throughout since there's no funds that go back that far, nor do I have an easy way to merge the indexes with fund data.

Re: Realistic "Market Timing" Backtests

Posted: Mon Nov 02, 2015 4:49 pm
by MachineGhost
Kbg wrote: Looks like Amibroker...how do you get the side by side SPY buy and hold columns?
Upgrade to version 5.93.0+.

Note that the dynamic commission logic isn't supported which is what I had to do separate backtests.  Very annoying.

Re: Realistic "Market Timing" Backtests

Posted: Sun Mar 06, 2016 8:22 am
by ochotona
Lance Roberts gives away his model allocation in his weekly report. I think he does a great job sniffing out risk and dialing back exposure.

Image

His percentage is a scale factor to apply to your personal maximum stock expsure. So if you normally run 60% stock, then 50% model allocation means 50% x 60% = 30%.

Right now, we're at 15% stock allocation for a 60/40 portfolio.

http://realinvestmentadvice.com/ to sign up for the newsletter

Re: Realistic "Market Timing" Backtests

Posted: Sun Mar 06, 2016 1:36 pm
by Reub
What was his allocation on Feb. 10th just before the fast 10% rise?

Re: Realistic "Market Timing" Backtests

Posted: Sun Mar 06, 2016 1:46 pm
by Dieter
Reub wrote: What was his allocation on Feb. 10th just before the fast 10% rise?
Per the chart, 25% of "default" allocation. His default is 60/40, so 25% of 60% = 15%.

I think I saw 35% TLT (default 30), 50% cash at the moment.

Re: Realistic "Market Timing" Backtests

Posted: Sun Mar 06, 2016 2:02 pm
by Reub
So he was at 15% equities just before the huge rise?

Re: Realistic "Market Timing" Backtests

Posted: Sun Mar 06, 2016 4:17 pm
by ochotona
Reub wrote: So he was at 15% equities just before the huge rise?
He believes the current rally is a bear market sucker rally, the trend has changed, and it's "sell the rallies", not "buy the dips".

The 200 day moving average has crossed below the 400 day moving average, a long term trend change indicator to the downside.

Re: Realistic "Market Timing" Backtests

Posted: Thu Mar 24, 2016 5:03 pm
by MachineGhost
ochotona wrote: Lance Roberts gives away his model allocation in his weekly report. I think he does a great job sniffing out risk and dialing back exposure.
Save me time.  Who is he and why should I care?