WEBVTT

1
00:00:00.309 --> 00:00:02.319
Can a simple trend
rule keep you out of

2
00:00:02.319 --> 00:00:02.989
a bad market?

3
00:00:05.534 --> 00:00:07.614
Begin by defining
the trend rule.

4
00:00:08.374 --> 00:00:08.654
Two states.

5
00:00:08.654 --> 00:00:11.874
Hold stocks while their
price stays above a moving

6
00:00:11.874 --> 00:00:14.514
average calculated
over 200 trading days.

7
00:00:15.194 --> 00:00:17.532
That average is simply
the mean close of the

8
00:00:17.532 --> 00:00:18.914
last 200 trading sessions.

9
00:00:19.788 --> 00:00:21.814
Strategy Builder
turns a market rule

10
00:00:21.814 --> 00:00:23.108
into allocation states.

11
00:00:23.848 --> 00:00:26.504
It replays those states
through market history one

12
00:00:26.504 --> 00:00:27.248
day at a time.

13
00:00:27.928 --> 00:00:29.898
The result shows
which state was live,

14
00:00:29.898 --> 00:00:31.608
what it held,
and what it earned.

15
00:00:32.368 --> 00:00:34.394
As an example,
we will test a trend rule

16
00:00:34.394 --> 00:00:36.218
through two very
different declines.

17
00:00:36.832 --> 00:00:38.212
Rules are checked in order,

18
00:00:38.212 --> 00:00:39.899
and the last one
is the fallback:

19
00:00:39.899 --> 00:00:41.892
what to hold when
nothing else matches.

20
00:00:42.992 --> 00:00:44.392
Here, short term treasuries.

21
00:00:44.872 --> 00:00:45.640
Give it a name,

22
00:00:45.640 --> 00:00:47.022
so the tables read clearly.

23
00:00:47.477 --> 00:00:49.240
Use a window of 8 years,

24
00:00:49.240 --> 00:00:51.737
starting at the
beginning of 2017.

25
00:00:52.515 --> 00:00:54.755
Running through
the end of 2024.

26
00:00:55.535 --> 00:00:57.735
That span holds two
very different declines.

27
00:00:58.615 --> 00:01:00.675
One was over in
weeks, in 2020.

28
00:01:01.475 --> 00:01:04.291
The later decline lasted
from January through

29
00:01:04.291 --> 00:01:05.355
December of 2022.

30
00:01:07.016 --> 00:01:09.223
Assumptions behind the
run live in Advanced

31
00:01:09.223 --> 00:01:11.636
settings, and each can
move the result quietly.

32
00:01:12.836 --> 00:01:15.218
Trading frequency decides
how often the rule is

33
00:01:15.218 --> 00:01:16.586
allowed to act on a signal.

34
00:01:16.976 --> 00:01:19.423
Transaction costs and
slippage come out of every

35
00:01:19.423 --> 00:01:21.309
switch, so they
matter most to a rule

36
00:01:21.309 --> 00:01:22.226
that trades often.

37
00:01:23.076 --> 00:01:25.716
Inflation adjustment and
cashflows sit here too.

38
00:01:26.436 --> 00:01:28.923
These settings stay at
their defaults so the test

39
00:01:28.923 --> 00:01:29.836
isolates the rule.

40
00:01:31.600 --> 00:01:33.780
Every rule has its
own advanced layer.

41
00:01:34.520 --> 00:01:35.600
The signal editor is

42
00:01:35.600 --> 00:01:37.165
where the trigger
is defined:

43
00:01:37.165 --> 00:01:38.461
which ticker it watches,

44
00:01:38.461 --> 00:01:41.160
which average, and how
much price history it uses.

45
00:01:42.160 --> 00:01:43.958
Several conditions
can be combined,

46
00:01:43.958 --> 00:01:46.064
and a rule can hold
fixed weights or rank

47
00:01:46.064 --> 00:01:47.040
a universe instead.

48
00:01:47.040 --> 00:01:50.064
One condition and one
holding isolate the trend

49
00:01:50.064 --> 00:01:50.900
in this test.

50
00:01:51.760 --> 00:01:53.706
Run it, and every
trading day replays

51
00:01:53.706 --> 00:01:54.600
through the rule.

52
00:01:54.600 --> 00:01:56.395
Signals act one day later,

53
00:01:56.395 --> 00:01:58.260
the way a real order would.

54
00:01:58.896 --> 00:02:00.930
Did the rule improve
the journey without

55
00:02:00.930 --> 00:02:01.846
trading too often?

56
00:02:02.556 --> 00:02:04.556
Annual return says
what the rule earned.

57
00:02:05.296 --> 00:02:07.646
Maximum drawdown says
how deeply it still fell.

58
00:02:08.076 --> 00:02:09.979
A trend rule reacts
only after price

59
00:02:09.979 --> 00:02:11.036
crosses the average.

60
00:02:11.816 --> 00:02:13.766
Trade count says how
often it switched.

61
00:02:14.602 --> 00:02:15.862
Here is the 8 years.

62
00:02:15.862 --> 00:02:17.145
The green stretches mark

63
00:02:17.145 --> 00:02:18.642
when the rule was defensive.

64
00:02:18.642 --> 00:02:20.922
First the 2020 crash.

65
00:02:20.922 --> 00:02:23.761
Then repeatedly
from January through

66
00:02:23.761 --> 00:02:25.102
December of 2022.

67
00:02:26.341 --> 00:02:29.421
Annual return
came out at 11.2%.

68
00:02:29.421 --> 00:02:33.121
The worst drawdown
along the way was 25.1%.

69
00:02:33.121 --> 00:02:36.121
Stepping aside is not the
same as avoiding losses.

70
00:02:38.246 --> 00:02:40.278
The defensive state
was live 1 day in 6,

71
00:02:40.278 --> 00:02:41.446
or 17.3% of the window.

72
00:02:41.686 --> 00:02:42.774
While it was on,

73
00:02:42.774 --> 00:02:45.426
the portfolio returned
0.9% annualized.

74
00:02:46.086 --> 00:02:47.767
That weak defensive
return is the

75
00:02:47.767 --> 00:02:48.786
price of protection.

76
00:02:50.728 --> 00:02:52.768
44 switches in 8 years.

77
00:02:53.388 --> 00:02:55.208
26 of them reversed
within a week.

78
00:02:55.908 --> 00:02:57.588
The cost of
protection appears in

79
00:02:57.588 --> 00:02:58.708
those quick reversals.

80
00:03:00.463 --> 00:03:02.443
Every switch has a
cause you can see.

81
00:03:03.063 --> 00:03:05.276
The line shows how far
the price sat above

82
00:03:05.276 --> 00:03:06.383
or below its average.

83
00:03:07.203 --> 00:03:09.540
Each crossing of zero
changed the state on the

84
00:03:09.540 --> 00:03:10.403
next trading day.

85
00:03:12.228 --> 00:03:15.798
The full year from January
through December of 2022

86
00:03:15.798 --> 00:03:17.128
is the honest test.

87
00:03:17.948 --> 00:03:19.832
The rule remained
defensive on 203 of

88
00:03:19.832 --> 00:03:20.698
251 trading days.

89
00:03:20.968 --> 00:03:22.508
It still ended down 20.1%.

90
00:03:26.018 --> 00:03:27.728
Save a run to keep the rule,

91
00:03:27.728 --> 00:03:29.438
window, and result together.

92
00:03:30.258 --> 00:03:32.311
The saved run can
reopen or sit beside

93
00:03:32.311 --> 00:03:33.338
a later comparison.

94
00:03:34.618 --> 00:03:37.199
Saving the strategy to your
library stores the rule

95
00:03:37.199 --> 00:03:38.718
itself with a
version history.

96
00:03:39.258 --> 00:03:41.508
Other tools can reference
that exact version.

97
00:03:42.154 --> 00:03:44.314
Would a 2% band
reduce whipsaws?

98
00:03:44.814 --> 00:03:46.155
Add it around the average,

99
00:03:46.155 --> 00:03:47.599
so price must clear the band

100
00:03:47.599 --> 00:03:48.734
before the rule flips.

101
00:03:49.928 --> 00:03:51.428
Same rule, one band.

102
00:03:52.188 --> 00:03:53.928
Switches fall from 44 to 14.

103
00:03:54.768 --> 00:03:57.248
Reversals within a
week fall from 26 to 3.

104
00:03:58.248 --> 00:04:00.568
Maximum drawdown
eases to 21.4%.

105
00:04:00.568 --> 00:04:03.168
Annual return
rises to 12.1%.

106
00:04:04.571 --> 00:04:06.611
A rerun leaves the
saved run unchanged.

107
00:04:07.711 --> 00:04:08.911
Update it, or keep both.

108
00:04:09.354 --> 00:04:11.104
Every run records
its states,

109
00:04:11.104 --> 00:04:12.854
window,
and trading settings.

110
00:04:13.714 --> 00:04:14.901
A surprising result can

111
00:04:14.901 --> 00:04:16.915
then be challenged
from the same basis,

112
00:04:16.915 --> 00:04:18.154
instead of argued about.

113
00:04:18.860 --> 00:04:21.407
The baseline line here
is the defensive holding,

114
00:04:21.407 --> 00:04:22.840
not stocks held throughout.

115
00:04:24.033 --> 00:04:26.102
So the gap between
the two lines is not

116
00:04:26.102 --> 00:04:27.853
what the rule
earned over stocks.

117
00:04:28.753 --> 00:04:31.349
The Robustness tab reruns
the rule from other start

118
00:04:31.349 --> 00:04:33.435
dates, and over windows
that step forward

119
00:04:33.435 --> 00:04:34.453
through the history.

120
00:04:35.244 --> 00:04:36.264
The loop is short.

121
00:04:37.104 --> 00:04:39.130
Define the rule with
separate states,

122
00:04:39.130 --> 00:04:40.334
pick a window, run it,

123
00:04:40.334 --> 00:04:41.703
then evaluate its return,

124
00:04:41.703 --> 00:04:43.564
deepest loss,
and trades together.

125
00:04:44.364 --> 00:04:46.037
Save the runs
you want to keep,

126
00:04:46.037 --> 00:04:47.764
and put variations
side by side.

127
00:04:49.319 --> 00:04:51.508
Choose Take a tour for
a guided walkthrough

128
00:04:51.508 --> 00:04:52.119
of the page.

129
00:04:54.913 --> 00:04:57.361
Every setting on the
page is defined here,

130
00:04:57.361 --> 00:04:58.760
next to the signal types

131
00:04:58.760 --> 00:05:01.033
and the methodology
the engine follows.

132
00:05:02.733 --> 00:05:05.222
When you wonder whether
a rule would have helped,

133
00:05:05.222 --> 00:05:05.933
write it down.

134
00:05:06.153 --> 00:05:07.453
Replay it through history.

135
00:05:07.773 --> 00:05:09.713
Read the trades as
closely as the returns.
