1
00:00:11,060 --> 00:00:16,660
In this lecture, we're going to discuss one very popular application of the simple moving average.

2
00:00:17,060 --> 00:00:21,950
While it might seem surprising that the absolute simplest concepts from this section can be applied

3
00:00:21,950 --> 00:00:23,180
to algorithmic trading.

4
00:00:23,210 --> 00:00:26,980
It's true, although algorithmic trading won't be taught in this course.

5
00:00:27,200 --> 00:00:31,820
I think it's a fun application and you'll see that this technique actually appears to make a lot of

6
00:00:31,820 --> 00:00:32,510
sense.

7
00:00:33,560 --> 00:00:37,310
So the key idea with this method is to have two simple moving averages.

8
00:00:37,580 --> 00:00:40,610
We call one the fastest in and one the slow Esmay.

9
00:00:41,150 --> 00:00:46,580
The algorithm works like this whenever the fastest time crosses, the slowest to move from above.

10
00:00:46,940 --> 00:00:51,920
We use that as a signal to take a short position or to sell in the case where you don't allow short

11
00:00:51,920 --> 00:00:56,280
selling whenever the fastest time crosses, the slowest come from below.

12
00:00:56,630 --> 00:00:59,790
We use that as a signal to take a long position or to buy.

13
00:01:00,440 --> 00:01:05,780
So let's take a look at a stock price time series, along with the fast and slow Assam's to make sure

14
00:01:05,780 --> 00:01:07,750
that this method actually makes sense.

15
00:01:12,410 --> 00:01:18,400
OK, so in this graphic, the fastest form is denoted by Orange and the slow Assamese denoted by green,

16
00:01:18,890 --> 00:01:20,640
the original close price is blue.

17
00:01:21,440 --> 00:01:25,320
So we see that in the first part when Orange Cross is green from above.

18
00:01:25,550 --> 00:01:27,320
This is when the stock price falls.

19
00:01:27,680 --> 00:01:29,570
So it makes sense to sell at this point.

20
00:01:30,230 --> 00:01:33,380
In the second part, when orange crosses green from below.

21
00:01:33,710 --> 00:01:35,570
This is when the stock price rises.

22
00:01:35,810 --> 00:01:37,760
So it makes sense to buy at this point.

23
00:01:38,720 --> 00:01:40,820
Here's another example of a sell signal.

24
00:01:41,510 --> 00:01:45,710
Note that this can perform poorly because the estimate lags the true price.

25
00:01:46,220 --> 00:01:51,570
It's also important to optimize your window sizes, which I haven't done in any case.

26
00:01:51,590 --> 00:01:53,570
Here's another example of a busy signal.

27
00:01:54,920 --> 00:01:57,730
So generally we see that this strategy makes sense.

28
00:01:58,040 --> 00:02:02,840
So when things are going down and buy, when things are going up, not bad for the simplest technique

29
00:02:02,840 --> 00:02:03,770
from the section.
