00:00:00
back testing is the best way to figure
00:00:01
out if a strategy works or not
00:00:03
professional Traders back test their
00:00:05
strategies before risking real money so
00:00:07
if you want to become consistently
00:00:08
profitable you should back test your
00:00:10
strategies also hi my name is Hugh in
00:00:12
this video you'll learn what back
00:00:13
testing is I'll show you the complete
00:00:15
process of how to backtest you'll learn
00:00:17
the best software to back test with I'll
00:00:20
show you specific examples of a back
00:00:22
tested strategy and you'll also learn
00:00:24
how to improve a back tested strategy so
00:00:26
you can get better results the back
00:00:28
testing process will work in any market
00:00:30
and on any time frame alright let's get
00:00:32
into it
00:00:34
[Music]
00:00:41
all right let's start with what back
00:00:43
testing is so back testing is basically
00:00:45
the process of taking a training
00:00:46
strategy and testing it on historical
00:00:48
data so you're basically going to scroll
00:00:50
back on your chart
00:00:52
to whatever period of time you want to
00:00:54
back test and then you in trading view
00:00:56
you can use something like the replay
00:00:58
button and then you're going to move the
00:01:00
chart forward slowly and that and then
00:01:04
once you see a setup in your training
00:01:05
strategy then you're going to take the
00:01:07
trade and you're going to record the
00:01:08
results and this is very similar to
00:01:10
something like what a car manufacturer
00:01:13
would do right before they release a new
00:01:15
model of car they're going to test it
00:01:17
out to make sure that it works make sure
00:01:18
that there aren't any major issues with
00:01:20
it and they're going to make sure that
00:01:22
it's reliable so it's a similar thing
00:01:23
with trading strategies you want to make
00:01:24
sure that they have an edge and the only
00:01:26
way that you can show that they have an
00:01:27
edge is to use historical data to test
00:01:30
the strategy all right now let's get
00:01:32
into the specific steps on how to back
00:01:34
test your strategy the first thing you
00:01:35
want to have is a goal a lot of people
00:01:38
will access the strategy and they don't
00:01:39
have a goal so they don't know what kind
00:01:41
of strategy they want or what kind of
00:01:43
return they want or what kind of
00:01:44
performance or drawdown they want so
00:01:46
make sure you set your goals and your
00:01:47
strategy do you want to make a certain
00:01:50
percentage a month a certain percentage
00:01:51
a year
00:01:53
certain percentage over five years and
00:01:55
make sure to match your goals to the
00:01:57
lifestyle you want to live and the way
00:01:59
that you want to trade a lot of Traders
00:02:00
coming to trading thinking they are
00:02:02
going to be day Traders and they're
00:02:03
going to make an x amount of money every
00:02:05
single day when in reality they are
00:02:08
probably better swing Traders and
00:02:09
they're better off for shooting for a
00:02:11
certain average percentage per month so
00:02:13
just think about those things think
00:02:15
about how much you actually want to
00:02:16
trade and set a realistic return based
00:02:18
on that
00:02:19
next create your trading plan so this
00:02:21
has to be a written trading plan with
00:02:23
the rules of your strategy and there are
00:02:25
certain discretionary elements so some
00:02:27
trading strategies so write down those
00:02:29
rules the best you can also and put that
00:02:31
into one document detail everything in
00:02:33
that document so that when it comes time
00:02:35
to take a trade you know exactly what to
00:02:37
do the next thing to look at is
00:02:40
what kind of software you're going to
00:02:41
use to backtest there's a lot of back
00:02:43
testing software out there I'll get into
00:02:45
some specific Solutions in a little bit
00:02:46
but remember that using software will
00:02:48
make your job much easier especially if
00:02:50
you can track the stats with that
00:02:51
software and then after you run a back
00:02:53
test you're going to want to analyze
00:02:54
your results obviously see if it meets
00:02:56
your goals see if there's a way that you
00:02:57
can maybe make it better look at some of
00:03:00
the stats like drawdown can you handle
00:03:01
the drawdown yeah maybe a trading
00:03:03
strategy made 500 but could you handle
00:03:05
like a 90 drawdown right so those are
00:03:07
the things that you're going to have to
00:03:08
look at and make sure that you can trade
00:03:11
that strategy and it will fit with your
00:03:13
personality and finally once you're done
00:03:15
analyzing your results you can look for
00:03:16
ways to possibly improve your strategy
00:03:18
can you make it better can you do some
00:03:20
tweaks to the entry to the exit maybe
00:03:22
the profit Target could be bigger things
00:03:24
like that and just play with it and see
00:03:27
if there are any ways that you can make
00:03:29
the strategy better and fit your goals
00:03:31
if your strategy tested out well and
00:03:33
you're ready to move on to live trading
00:03:35
then that's great usually you're gonna
00:03:37
have to do some improvements on a
00:03:38
strategy rarely does it work the first
00:03:40
time but if it does or if you did some
00:03:42
improvements and it did work with the
00:03:45
improvements then you can move on to
00:03:46
demo or trading a small Live account and
00:03:49
this is because not all systems that
00:03:51
work in back testing are going to work
00:03:52
in live trading there may have been some
00:03:54
assumptions that you made in back
00:03:55
testing that don't translate over to
00:03:57
live trading that's why it's important
00:03:58
to at least test the strategy out for a
00:04:01
little bit either in a demo account or a
00:04:03
small Live account now let's take a look
00:04:05
at the types of back testing so there
00:04:06
are basically two types of back testing
00:04:08
automated back testing and manual back
00:04:10
testing so an automated back testing
00:04:12
you're either going to write a computer
00:04:13
program or you're going to use a program
00:04:15
Builder that will create an automated
00:04:17
trading strategy either way the computer
00:04:20
is going to trade 100 for you entries
00:04:23
exits and everything with manual back
00:04:24
testing you're going to actually
00:04:25
manually enter each trade just like you
00:04:27
would if you were live trading and
00:04:30
there's a little gray area in between
00:04:31
where you can do some semi-automated
00:04:33
back testing but those are the main two
00:04:35
camps and a lot of people think that in
00:04:37
order to back test you have to have an
00:04:39
automated strategy or you have to know
00:04:40
how to code and that's simply not true
00:04:42
you can do 100 manual back testing and
00:04:45
that's great and that works sure it's a
00:04:47
little bit slower but there are some
00:04:49
strategies that can't be put into an
00:04:50
automated trading strategy so I believe
00:04:52
that
00:04:53
it's best to start off with manual back
00:04:55
testing because that's something that
00:04:56
everybody can do and then if you want to
00:04:58
move into more automated Solutions you
00:05:01
can do that but a lot of people haven't
00:05:03
studied programming and they don't know
00:05:04
how to code so starting with manual back
00:05:06
testing is easier they can get results
00:05:09
right away and then if they want to
00:05:11
learn how to code or if they want to
00:05:12
apply their coding skills then they can
00:05:14
get into automated back testing now
00:05:16
let's take a look at creating your
00:05:18
trading plan so your trading plan is
00:05:20
basically going to be all of the
00:05:21
elements of your trading system when you
00:05:23
should enter a trade where you're going
00:05:25
to set your take loss into a stop loss
00:05:27
and take profit the indicators you're
00:05:29
going to use along with the settings of
00:05:31
the indicators
00:05:32
when to manage your trade are you going
00:05:34
to move the stop-loss to break even are
00:05:36
you going to Trail your stop-loss down
00:05:38
things like that
00:05:39
and then finally your exit criteria how
00:05:41
are you going to exit the trade where is
00:05:43
your stop loss where's your take profit
00:05:45
what indicators have to line up in order
00:05:48
for you to exit the trade stuff like
00:05:49
that now let's get into the software
00:05:51
there are a lot of solutions out there
00:05:53
the first one is metatrader this one is
00:05:54
great because it's free it's more for
00:05:57
back testing automated strategies
00:05:59
although you can use it as a manual back
00:06:01
tester but you're going to have to keep
00:06:02
a separate spreadsheet for that one I
00:06:04
highly recommend is naked markets I
00:06:06
think it's the best back testing
00:06:07
software out there because you can go
00:06:09
from Full manual partially automated
00:06:11
full automated and it allows you to
00:06:14
automate certain parts of the back
00:06:16
testing to speed things up
00:06:18
without going full automated so I think
00:06:20
it's a great solution it also gives you
00:06:22
a lot of detailed stats that you won't
00:06:23
get in other software packages and many
00:06:26
times with those other packages you have
00:06:28
to export the data from the software
00:06:31
into Excel and then do your own analysis
00:06:33
so naked Marcus has that already built
00:06:35
in and I really like naked markets I
00:06:37
highly recommend checking it out you can
00:06:39
check out this video if you want to
00:06:40
learn more about naked markets
00:06:42
next one is trading view uh trading view
00:06:45
in my opinion is not great for back
00:06:46
testing it's fantastic for charting and
00:06:48
trading but with trading view you can
00:06:51
use the replay button and that can help
00:06:53
but again like with metatrader
00:06:55
tradingview is more built for automated
00:06:58
back testing so I have an automated back
00:06:59
tester but if you want to do manual back
00:07:01
testing you're going to have to keep
00:07:02
your own spreadsheet and your own stats
00:07:04
one thing with the trading view
00:07:06
automated back testing that I don't like
00:07:08
is in some markets they don't have
00:07:09
enough data so you have to be aware of
00:07:11
that they're only going to give you a
00:07:13
certain amount of data so be aware when
00:07:16
you're back testing in trading view next
00:07:18
is Forex tester I used to use Forex
00:07:20
tester a lot but they haven't really
00:07:22
improved over like version two I think
00:07:25
is kind of where they hit their Peak and
00:07:27
now it's just kind of like making small
00:07:28
improvements but it's still a solid
00:07:30
piece of software so if you want to
00:07:32
check that out check it out in my
00:07:34
opinion it's best for testing manual
00:07:36
strategies uh it does have an automated
00:07:39
tester in there but it's very similar to
00:07:41
metatrader so I don't see why we just
00:07:43
wouldn't use metatrader to begin with
00:07:44
but four accessories been around for a
00:07:46
long time and it's a really solid piece
00:07:48
of software so check that out also uh
00:07:50
ninjatrader I haven't back tested a
00:07:52
ninjatrader I know some professional
00:07:54
traders that use ninja Trader I just
00:07:55
think it's a horrible interface
00:07:58
um but it it works you know it does work
00:08:01
you just have to learn the little quirks
00:08:04
of it but that's something you could use
00:08:06
ammy broker is fantastic Emmy broker is
00:08:08
more for back testing stock trading
00:08:10
strategies I have Amy broker I've been
00:08:12
using it a little bit but I haven't
00:08:14
really gotten too deep into it but if
00:08:15
you're trading stocks and you need to
00:08:18
generate signals on the stocks and you
00:08:21
need to scan a whole universe of stocks
00:08:23
then Emmy broker is fantastic next is
00:08:26
soft4fx and this is a really inexpensive
00:08:29
software it plugs into metatrader 4 and
00:08:32
metatrader5 and it turns metatrader 4
00:08:34
and 5 into a back testing software and
00:08:37
uh it's you know it's pretty good at
00:08:39
that but again it is a low-cost thing so
00:08:42
it's not going to be super feature Rich
00:08:44
but it does work so if you only want to
00:08:46
spend I think it's 150 now or something
00:08:49
like that
00:08:50
uh something on the low end uh and it
00:08:53
plugs directly into metatrader 4
00:08:54
metatrader5 so that's an option if you
00:08:57
want to use it I don't recommend it I
00:08:59
think if you're better off spending a
00:09:00
couple hundred dollars more and going
00:09:02
with naked markets uh instead of soft
00:09:04
for FX but that could be a solution for
00:09:07
you and finally we have multi charts
00:09:09
I've never used multi-charts
00:09:11
um but a lot of people do use it for
00:09:12
back testing it's mostly automated back
00:09:14
testing so keep that in mind but that's
00:09:16
also a solution you can check out
00:09:19
all right if you want links to the
00:09:20
software that I recommend that's
00:09:21
provided in the description below now
00:09:23
let's get into the actual process of
00:09:25
back testing now there are a couple
00:09:26
different ways that you can do this uh
00:09:28
one way like I mentioned is you could
00:09:29
use something like metatrader or some
00:09:30
sort of free charting platform you could
00:09:32
use a spreadsheet
00:09:34
to keep track of your trades and if you
00:09:36
want a spreadsheet I'll post one here
00:09:39
but if you really want to speed things
00:09:40
up you should use dedicated back testing
00:09:42
software and this is naked markets this
00:09:45
is my favorite back testing software uh
00:09:47
so what I'm going to do here is I'm
00:09:48
going to test a simple system that uses
00:09:51
a moving average crossover all right so
00:09:52
I'm going to set my rules step number
00:09:54
one is always to have rules for your
00:09:56
training strategy so this trading
00:09:58
strategy is going to have the 200 simple
00:09:59
moving average the 50 simple moving
00:10:01
average
00:10:02
I'm going to enter in the direction of a
00:10:03
crossover the stop loss is going to be
00:10:06
at the 200 simple moving average and I'm
00:10:08
going to exit when the crossover happens
00:10:10
in the opposite direction so here's how
00:10:12
this works I've added the indicators to
00:10:14
my chart so I'm going to hit the play
00:10:15
button here and I'm going to let the
00:10:17
chart scroll forward until the 200
00:10:19
simple moving average shows up
00:10:23
all right there we go now I'm going to
00:10:24
look for a crossover
00:10:29
there we go and a good thing about Nikki
00:10:32
Marcus is that they have a uh moving
00:10:34
average crossover indicator so you I
00:10:37
think you can see here there's an arrow
00:10:39
pointing down so that's a bearish signal
00:10:42
I'll zoom in on that a little bit
00:10:44
right so I want to go short right there
00:10:47
so according to my rules I'm going to go
00:10:49
short here and then I'm going to place
00:10:52
the stop loss
00:10:54
at the 200 or maybe just a little bit
00:10:57
above the 200 simple moving average
00:10:59
there we go
00:11:01
and I'm going to risk one percent per
00:11:03
trade so let's go okay stopped out
00:11:06
immediately that's okay
00:11:13
all right there's another signal
00:11:16
so uh there's the indicator okay so I'm
00:11:20
gonna buy there stop us is going to go
00:11:22
down here
00:11:25
risking one percent yep okay and go
00:11:31
okay so that's working out better
00:11:36
just waiting for the crossover in the
00:11:38
opposite direction now
00:11:44
okay there we go and I'm moving the
00:11:46
chart forward really quickly just
00:11:48
because this is an example and I want to
00:11:49
speed up the video but in real life you
00:11:51
should probably make it slower so that
00:11:53
you don't miss these signals uh but this
00:11:55
is a straightforward training strategy
00:11:57
so missing the signals is not a big deal
00:11:59
with this one but with other strategies
00:12:01
you should probably slow it down so that
00:12:03
you don't overshoot it so you don't have
00:12:04
any future information about the trade
00:12:07
all right so I'm gonna sell here I'm
00:12:09
gonna
00:12:10
put a stop loss up here
00:12:14
and then I'm going to let that go
00:12:18
see what happens
00:12:21
okay so that worked out pretty well
00:12:24
oh I forgot to okay
00:12:27
I forgot to close the trade here that's
00:12:29
why I triggered on there
00:12:32
okay so I'm going to close this other
00:12:36
trade out which made about 4.5 percent
00:12:38
all right now let's go forward here and
00:12:40
that's a good thing about back testing
00:12:42
you can back up and correct your
00:12:44
mistakes if you have any all right
00:12:47
waiting for the next crossover
00:12:57
okay so this trade would have been open
00:12:58
for a while
00:12:59
and you can test this on any time frame
00:13:01
you don't have to do the daily like I
00:13:02
did here uh you can do the one hour you
00:13:05
know whatever five minute and you could
00:13:06
really uh create more trades out of it
00:13:10
but uh this is just the example I'm
00:13:12
using so crossover should happen soon
00:13:15
there we go nailed it okay so that
00:13:19
it's going to get closed and then I'm
00:13:21
going to open along here
00:13:23
stop loss is going to be down here
00:13:28
and we'll go for one more trade
00:13:32
all right very nice
00:13:53
so again this trade is going to be open
00:13:54
for a little while
00:13:56
uh but it is picking up some pretty good
00:13:58
profits so I'm gonna let it keep going
00:14:02
and this will be the last example so
00:14:04
it's okay if it's a little bit long
00:14:22
wow okay this one is really long
00:14:25
but it is uh it is profitable let's
00:14:28
see where the profits end though
00:14:36
okay there now it looks like it's going
00:14:37
to break down so I'm just gonna
00:14:39
go forward and there we go that's the
00:14:41
closing
00:14:44
signal and that's it for this back test
00:14:46
at least for this example so next thing
00:14:49
you want to do is look at your stats how
00:14:51
did this perform now I I didn't do a
00:14:54
complete back test here so I would want
00:14:56
to do a complete back test then I'll
00:14:57
look at the stats so I'll save this back
00:15:00
test first and then I'll go into the
00:15:03
statistics Dot Center
00:15:04
I will import it from a back test and
00:15:08
the back test is
00:15:11
golden death
00:15:14
Euro US dollar okay and there you go
00:15:17
that's the statistics on it
00:15:20
the first year it lost one percent uh
00:15:22
and then after that it was profitable
00:15:23
but again this was just an example so
00:15:25
you want to back test this on as much
00:15:27
historical data as possible uh to see
00:15:30
how this would have performed over you
00:15:31
know 5 10 15 years so some other data
00:15:34
you can get in here is some overall
00:15:36
stats you can get like sharp ratios and
00:15:38
daily averages and things like that you
00:15:41
can get the symbol analysis there was
00:15:43
only one symbol in this test but you
00:15:45
could test multiple symbols at the same
00:15:47
time if you wanted to timing analysis
00:15:49
you can see where the winners and losers
00:15:53
were in terms of month day and hour
00:15:57
and then you can see uh the duration of
00:15:59
the trades
00:16:00
you can see the risk analysis and the
00:16:04
trades list and then you can do a Monte
00:16:07
Carlo simulation on the data now if you
00:16:09
want to get my complete back testing
00:16:10
course you can check the link in the
00:16:12
description below and that will give you
00:16:14
the full program on how to do a complete
00:16:16
back test along with some trading system
00:16:18
examples so this is where this type of
00:16:20
software is really useful because it
00:16:22
gives you statistics and you don't have
00:16:24
to go into Excel and make them yourself
00:16:26
so now that you know how to back test
00:16:27
the strategy and you know how to look at
00:16:30
the statistics on it now let's get into
00:16:31
optimization all right once you're done
00:16:33
with the back test and you have some
00:16:34
stats now it's time to look at some
00:16:36
potential optimizations one thing you
00:16:38
can do is set the stop loss further away
00:16:40
or closer a lot of Traders will tend to
00:16:44
set the stop loss too close and they'll
00:16:45
get stopped out often so if you move the
00:16:48
stop loss a little further away that
00:16:50
will give the market some room to move
00:16:52
and you're more likely to hit your
00:16:54
profit Target another potential
00:16:55
optimization is to set a bigger profit
00:16:58
Target so you'll win less often but your
00:17:01
winners will be bigger so sometimes that
00:17:03
those bigger winners can offset your
00:17:05
losers and that can be a great way to
00:17:07
potentially optimize your strategy then
00:17:09
you can also Trail your stop loss I have
00:17:11
some videos about the trailing r or
00:17:14
there are multiple trailing stop loss
00:17:15
and you can use things like the PSAR or
00:17:18
the um
00:17:20
uh under other indicators that will
00:17:22
allow you to try your stop-loss you can
00:17:23
also use Simple support and resistance
00:17:25
that's a great way to do it so you could
00:17:28
do that and then another thing you can
00:17:30
do is you can take one strategy but have
00:17:34
two different sets of settings so this
00:17:35
might not make sense at first but when
00:17:38
you actually get into it and you realize
00:17:39
that if I use this one set of rules and
00:17:44
then a slightly different set of rules
00:17:45
but a very similar system sometimes they
00:17:48
will
00:17:49
compensate for each other so if this
00:17:51
system has a loss sometimes this system
00:17:53
will have a win and vice versa so that
00:17:56
can be a great way to smooth out your
00:17:58
profit and loss curve and make more
00:18:00
consistent profits all right so that's
00:18:02
how you back test the trading strategy
00:18:03
if you want a complete guide on how to
00:18:05
do the entire process check out my back
00:18:07
testing program that's going to be
00:18:08
coming out soon that will lay out all of
00:18:10
the steps it will give you some
00:18:12
strategies to backtest along with
00:18:14
complete results and it will show you
00:18:16
some of the tricks and some of the
00:18:17
things to avoid when back testing so you
00:18:19
can become a master bathroom tester and
00:18:21
find profitable trading strategies
00:18:22
alright if you like that video give me a
00:18:24
thumbs up share it with your friends if
00:18:26
you want to get more videos like this
00:18:28
about training strategies and back
00:18:29
testing subscribe to the channel hit the
00:18:31
Bell to get notifications thanks for
00:18:33
watching and I hope your trading is
00:18:35
going well
00:18:37
[Music]