"Trading Strategies That Are Designed Not Fitted" by Robert Carver, Independent Systematic Futures Trader, Writer, and Research Consultant
The document discusses the design of trading strategies, emphasizing a systematic approach that relies on tacit knowledge and theoretical principles rather than solely on fitting historical data. It outlines a six-step process for strategy development, which includes generating ideas, using random data, and performing real data sensitivity checks. Additionally, it explores key questions in trend identification and management in trading systems, addressing common practices and pitfalls in algorithmic strategy design.
Legal boilerplate bit:
Nothingin this presentation constitutes investment advice, or
an offer or solicitation to conduct investment business. The
material here is solely for educational purposes.
Robert Carver is not currently regulated or authorised by the
FCA, SEC, CFTC, or any other regulatory body to give
investment advice, or indeed to do anything else.
Futures trading carries significant risks and is not suitable for
all investors. Back tested and actual historic results are no
guarantee of future performance. Use of the material in this
presentation is entirely at your own risk.
Tacit financial marketknowledge
Theory
Common sense
Theory
Market folkore
Previous research
8.
How do wedesign rather than fit?
➢ Acknowledge and embrace tacit knowledge
➢ Avoid implicit fitting
➢ Do the minimum amount of explicit fitting, and do it
right.
Start with ideas not data
9.
How my ~43year old self designs
trading strategies...
Tactit knowledge
Design process
Trading strategy
Algo + Parameters
Ideas first
Real
Data
Fake data
10.
How my ~43year old self designs
trading strategies...
Theory
Design process
Common sense
Market folkore
Previous research
Real
Data
Fake data
11.
How do peopledesign real products...
Theory
Design process
Personal taste
Market research
Previous products
Focus group
Prototypes
12.
Tacit knowledge: Trendfollowing
● Market folklore:
● “Cut your losers and let your winners run”
● “Don’t fight the tape”
● Turtle Traders
● US CTA tradition (Campbell, Chesapeake, Dunn), UK CTA
tradition (AHL, Winton, Aspect), Europeans (Transtrend,
Systematica)
● Previous empirical research:
● Levy 1960
● Jegadeesh and Titman 1993
● Carhart “fourth factor” 1997
● Theory:
● Prospect theory (Kahneman and Tversky 1992),
● Herding, Confirmation bias, under reaction.
● Behaviour of other participants (eg risk parity funds)
13.
Unanswered questions
● Whatperiod of time do trends last for?
● When should we enter trends?
● When should we exit trends?
● Should we have a stop loss rule? What is it?
● How do we identify markets that are, or aren’t “trend friendly”?
● How do we identify how strong the trend is?
● What size should our positions be?
● What is our algo?
● What are it’s parameters?
What is beststrategy? Data first answer:
Best return versus risk in dataset
Assuming leverage is possible and risk is
Gaussian:
Highest Sharpe Ratio
(Other measures are available…)
Single metric of ‘best’: Performance
Single source of information: Past data
16.
What is beststrategy? Ideas first answer:
Best designed strategy
Multi-faceted metrics:
Performance, turnover, behaviour in given
scenarios...
Multi-faceted sources of information:
Common sense, Theoretical principles, Fake
data, (Limited amounts of) Real Data
17.
Designing a tradingstrategy – 6 steps:
● Start with a sound framework which imposes some
conditions
● Come up with the idea
● Use some random data or single scenario of real data
plus theory / common sense to develop algo
● Use fake data to “fit” algo
● Real data for parameter sensitivity check / sense check
● Fit allocation using real data (out of sample, robust
optimisation)
18.
Designing a tradingstrategy – 6 steps:
● Start with a sound framework which imposes some
conditions
● Come up with the idea
● Use some random data or single scenario of real data
plus theory / common sense to develop algo
● Use fake data to “fit” algo
● Real data for parameter sensitivity check / sense check
● Fit allocation using real data (out of sample, robust
optimisation)
19.
Start with asound framework
Trading rule 1 Trading rule 2 Trading rule 3
SP500 EDOLLAR CORN
Combine forecasts from trading rules
Position sizing
Portfolio: Weight instrument positions
Risk targeting
20.
Start with asound framework: Conditions
● Trading rules make forecasts of risk adjusted price changes
● Forecasts are continous, not discrete entry + exit conditions
● Forecasts are scaled in an instrument / temporal independent
way (no “magic numbers”)
● Forecast is proportional to E(Sharpe Ratio / )
[Position is proportional to Forecast / hence position is
proportional to /
● E(abs(forecast)) = 10.0
● In principal all forecasts used on all markets (portfolio
optimisation stage will become later)
● Use multiple variations of the same trading rule to capture
different time frames (as many as possible, not too highly
correlated)
● Costs are the most important thing. The second most
important thing is costs. Costs are predictable – returns are
not. Throw away very expensive systems.
● Throw away very slow systems (LAM)
21.
Start with asound framework
… remember these questions?
● What period of time do trends last for?
● When should we enter trends?
● When should we exit trends?
● Should we have a stop loss rule? What is it?
● How do we identify markets that are, or aren’t “trend
friendly”?
● How do we identify how strong the trend is?
● What size should our positions be?
22.
Start with asound framework
… remember these questions?
● What period of time do trends last for?
● When should we enter trends?
● When should we exit trends?
● Should we have a stop loss rule? What is it?
● How do we identify markets that are, or aren’t “trend
friendly”?
● How do we identify how strong the trend is?
● What size should our positions be?
Fewer open questions:
Fewer parameters to “fit” or design
23.
Designing a tradingstrategy – 6 steps:
● Start with a sound framework which imposes some
conditions
● Come up with the idea
● Use some random data or single scenario of real data
plus theory / common sense to develop algo
● Use fake data to “fit” algo
● Real data for parameter sensitivity check / sense check
● Fit allocation using real data (out of sample, robust
optimisation)
Come up withthe idea
Linear regression price against time, using Ordinary Least
Squares:
y = + x + minimise
with y = price, and x = some measure of time (eg years)
price in uptrend
price in downtrend
We use a rolling regression over the last N weekdays to
capture different length trends.
Single parameter: window_size
26.
Designing a tradingstrategy – 6 steps:
● Start with a sound framework which imposes some
conditions
● Come up with the idea
● Use some random data or single scenario of real data
plus theory / common sense to develop algo
● Use fake data to “fit” algo
● Real data for parameter sensitivity check / sense check
● Fit allocation using real data (out of sample, robust
optimisation)
Conditions (reminder)
● Tradingrules make forecasts of risk adjusted price changes
● Forecasts are continous, not discrete entry + exit conditions
● Forecasts are scaled in an instrument / temporal
independent way (no “magic numbers”)
● Forecast is proportional to E(Sharpe Ratio / )
[Position is proportional to Forecast / hence position is
proportional to /
● E(abs(forecast)) = 10.0
● In principal all forecasts used on all markets (portfolio
optimisation stage will become later)
● Use multiple variations of the same trading rule to capture
different time frames (as many as possible, not too highly
correlated)
● Costs are the most important thing. The second most
important thing is costs. Costs are predictable – returns are
not. Throw away very expensive systems.
● Throw away very slow systems (LAM)
29.
Develop algo: Evaluatedesign
Does this scale well? No…
(No need to look at data! Common sense!)
Forecast is proportional to E(Sharpe Ratio = / )
[Position is proportional to Forecast / hence position is
proportional to /
in units of (price) so:
Forecast =
Where is measured is annual standard deviation of (price)
(No need to look at data! Theory)
Develop algo: Evaluatedesign
Does this scale well? Yes.
Does behaviour make sense? Yes.
Bullish in bull markets, bearish in bear markets
How about the trading speed? Seems reasonable given the
length of trends involved
Anything weird? Yes
Need to set initial min_periods to a higher value (eg
window_size / 4 : Common sense!)
Too slow? Probably N=256 is the slowest we’d go (LAM)
32.
Designing a tradingstrategy – 6 steps:
● Start with a sound framework which imposes some
conditions
● Come up with the idea
● Use some random data or single scenario of real data
plus theory / common sense to develop algo
● Use fake data to “fit” algo
● Real data for parameter sensitivity check / sense check
● Fit allocation using real data (out of sample, robust
optimisation)
33.
Conditions (reminder)
● Tradingrules make forecasts of risk adjusted price changes
● Forecasts are continous, not discrete entry + exit conditions
● Forecasts are scaled in an instrument / temporal independent
way (no “magic numbers”)
● Forecast is proportional to E(Sharpe Ratio / )
[Position is proportional to Forecast / hence position is
proportional to /
● E(abs(forecast)) = 10.0
● In principal all forecasts used on all markets (portfolio
optimisation stage will become later)
● Use multiple variations of the same trading rule to capture
different time frames (as many as possible, not too highly
correlated)
● Costs are the most important thing. The second most
important thing is costs. Costs are predictable – returns are
not. Throw away very expensive systems.
● Throw away very slow systems (LAM)
34.
Use fake datato “fit” algo: method
What value(s) should we use for window_size?
1) Get an understanding of how trend length relates to
profitability of window_size
2) Get an idea of how fast different window_size will trade
3) Prune any window_size that are likely to be too
expensive
4) Prune any window_size that are likely to be too slow
5) Understand correlation structure to work out best
window_size pattern
35.
Use fake datato “fit” algo: Generating data
=
+ N(0,)
qoppac.blogspot.com/2015/11/using-random-data.html
Use fake datato “fit” algo:
window_size and costs
Cheap eg
SP500
Expensive
eg
EDOLLAR
5 1 week 17.6 176
10 2 weeks 7.5 75
15 3 weeks 4.9 49
21 1 month 3.6 36
42 2 months 2.1 21
64 3 months 1.3 13
85 4 months 1.2 12
107 5 months 0.92 9.3
128 6 months 0.88 8.8
150 7 months 0.74 7.4
171 8 months 0.71 7.1
192 9 months 0.65 6.5
213 10 months 0.65 6.5
235 11 months 0.61 6.1
Costs in bp /year of
SR
Max allowable is 13bp
See ch.12 of my book
No point having
window_size =5
39.
Use fake datato “fit” algo:
window_size and correlation structure
It turns out that if window_sizen+1
= window_sizen
* √2
Then correlation(forecastn+1
, forecastn
) ~ 0.90
And correlation(forecastanother n
, forecastn
) < 0.90
40.
Use fake datato “fit” algo: Final iteration
Summary of findings:
● Window size in √2 steps covers the space best
● Window size <10 too expensive for any instrument
● Window size>200 pointlessly slow
Window_size = [10,14,20,28,40,57,80, 113,160]
Should capture trends lasting for around 1 month to 18
months
41.
Designing a tradingstrategy – 6 steps:
● Start with a sound framework which imposes some
conditions
● Come up with the idea
● Use some random data or single scenario of real data
plus theory / common sense to develop algo
● Use fake data to “fit” algo
● Real data for parameter sensitivity check / sense
check
● Fit allocation using real data (out of sample, robust
optimisation)
NOTE: Although I’m using real data, I’m not going to be
looking at performance.
Real data check:correlation structure
Highest correlation between any two pairs of
window_size; 0.85
46.
Designing a tradingstrategy – 6 steps:
● Start with a sound framework which imposes some
conditions
● Come up with the idea
● Use some random data or single scenario of real data
plus theory / common sense to develop algo
● Use fake data to “fit” algo
● Real data for parameter sensitivity check / sense
check
● Fit allocation using real data (out of sample,
robust optimisation)
First and last time I will use performance
calculated using real data.
47.
Conditions: reminder
● Tradingrules make forecasts of risk adjusted price changes
● Forecasts are continous, not discrete entry + exit conditions
● Forecasts are scaled in an instrument / temporal independent
way (no “magic numbers”)
● Forecast is proportional to E(Sharpe Ratio / )
[Position is proportional to Forecast / hence position is
proportional to /
● E(abs(forecast)) = 10.0
● In principal all forecasts used on all markets (portfolio
optimisation stage will become later)
● Use multiple variations of the same trading rule to capture
different time frames (as many as possible, not too highly
correlated)
● Costs are the most important thing. The second most
important thing is costs. Costs are predictable – returns are
not. Throw away very expensive systems.
● Throw away very slow systems (LAM)
48.
Fit allocation usingreal data
Combined forecast = w1
f1
+ w2
f2
+ w3
f3
+ …
f are in same vol scale so, values of w depend on:
● Pre-cost performance (different by market?)
● Costs (different by market)
● Correlation structure
● Well known portfolio optimisation problem….
● … with well known problems (estimation error, extreme
weights)
● …. and well known solutions: clustering, shrinkage,
bootstrapping…
● Only line of defence against incorporating a (statistically
sigificantly) loss making trading rule in our system
49.
Fit allocation usingreal data: Hypocrisy?
An aside, Why is fitting model parameters bad...
… but optimising model portfolio allocations
acceptable?
Answers:
● Parameter space much smaller
● Rolling out of sample is feasible
● Nicer surface
● Well developed techniques exist to cope with
problems and use correct amount of degrees of
freedom
● Much harder to do implicit fitting = much easier to
resist the temptation
Summary
● Three typesof over fitting: tacit, implicit, explicit.
● You can’t get around tacit knowledge.
● Use tacit knowledge to design trading strategies.
Design process:
● Start with a sound framework which imposes some
conditions
● Come up with the idea
● Use some random data or single scenario of real data
plus theory / common sense to develop algo
● Use fake data to “fit” algo
● Real data for parameter sensitivity check / sense
check
● Fit allocation using real data (out of sample, robust
optimisation)