WEBVTT

00:00.680 --> 00:05.750
In this video you will learn how to add a simple moving averages and balloons up ends to interactive

00:05.750 --> 00:07.200
bluntly charts.

00:07.280 --> 00:15.830
So both are actually technical indicators used in technical analysis and we are still imparted our Apple

00:15.830 --> 00:21.370
data frame with historical Apple stock prices so adjusted close close.

00:21.380 --> 00:22.730
High low and so on.

00:23.360 --> 00:30.320
And there is actually a special object for creating interactive graphs with technical indicators and

00:30.320 --> 00:31.840
this is off the cuff links.

00:31.880 --> 00:37.430
Quant fake object and we can create the object to this.

00:37.520 --> 00:45.260
Using the cufflinks and then the method quant fake and here but then the parent uses we have to pass

00:45.290 --> 00:52.520
a data frame so for example here our Apple data frame with the stock price data and already here you

00:52.520 --> 00:58.910
can see that the default setting is that we get a candlestick chart and we actually save for the quant

00:58.910 --> 01:06.590
fake object here and the variable QF and let's check the data type of QF.

01:07.610 --> 01:15.020
So that's a cufflinks quant fake object and we not only can use the eye plot method on the pan US data

01:15.020 --> 01:23.600
frame but also on a quant fake object and the let's through this here and in addition we define the

01:23.600 --> 01:27.050
title of our graph to be Apple and also the name.

01:27.050 --> 01:28.390
So let's have a look here.

01:30.560 --> 01:38.750
So here we have the title of our graph and here the name it's apple and you can see actually the candlestick

01:38.910 --> 01:39.410
chart.

01:39.410 --> 01:46.760
So we have here our open high low close the prices for the Apple stock represented in a candlestick

01:46.760 --> 01:49.210
chart.

01:49.300 --> 01:55.830
So this is actually pretty much the same as we did hear above so that's also here.

01:55.840 --> 02:02.130
The candlestick chart for the Apple stock and you might question yourself Now why do we use here the

02:02.180 --> 02:08.850
cufflinks quant fake object when we can also create here the candlestick chart simply with the eye plot

02:08.850 --> 02:16.370
method on the US data frame and the simple answer is that they can't fake object.

02:16.410 --> 02:19.800
Gives us even more flexibility and functionality

02:22.540 --> 02:29.650
so here we have the candlestick chart and now the powerful thing is that we can add additional technical

02:29.650 --> 02:37.570
indicators to our quanta fake object and for example we can call here the method at simply moving ever

02:37.670 --> 02:39.840
US and the v defined to F..

02:40.000 --> 02:45.100
Simple moving average US ON THE LAST The 20 year periods.

02:45.100 --> 02:52.420
So if you check here the available methods and attributes on our quant fake object and we can see that

02:52.480 --> 03:00.070
there are quite a lot so we can add Ballinger pants and the many more technical indicators and also

03:00.080 --> 03:06.490
here simple moving average US support lines trend lines and so on and also the volume.

03:06.700 --> 03:08.720
So let's run here the.

03:09.910 --> 03:16.180
And by doing so we automatically added the simple moving averages with 20 periods to our quant fake

03:16.270 --> 03:22.630
object and if we now again plot our quant fake object with the eye plot method.

03:22.660 --> 03:25.930
So this is exactly the same code as above here.

03:25.930 --> 03:30.810
But meanwhile we edit here the simple moving averages and let's have a look.

03:34.550 --> 03:39.960
And here we have actually the simple moving averages with 20 periods.

03:40.220 --> 03:41.270
And to recall it.

03:41.270 --> 03:50.150
So that's the average stock price over the last 20 days and now we can add even more technical indicators

03:50.150 --> 03:53.770
to our quantified object and we can also add.

03:53.810 --> 03:59.140
Ballinger bans here and again we select the last the 20 period.

03:59.150 --> 04:07.130
So also this is a rolling statistic and we have to define the standard deviation so I will explain this

04:07.130 --> 04:09.020
in a few seconds.

04:09.620 --> 04:13.820
So we at here the polar jump ends and now we a re plot.

04:13.850 --> 04:16.220
The conflict with the I plot method

04:19.410 --> 04:26.160
and here we have actually the Bollinger bands and the balloons events are a technical analysis tool

04:26.160 --> 04:33.030
developed by John Ballinger in the nineteen hundred and 80s and they actually three lines that compose

04:33.030 --> 04:34.310
the ball and Japan's.

04:34.400 --> 04:40.470
So that's the simple moving average which also contains the to the Bollinger bands and then we have

04:40.470 --> 04:48.710
an upper band here and a lower band and the upper and the lower bands are typically two standard deviations

04:48.710 --> 04:56.960
away from the 20 days simple moving average but uh that can be modified so we can modify the window

04:57.350 --> 05:02.630
and we can also choose for example 50 periods and we can also define that.

05:02.660 --> 05:08.990
We want to f for the upper and be lower bands with for example one or three standard deviations away

05:08.990 --> 05:15.740
from the simple moving average and the question is now what is that the intuition behind Bollinger Bands

05:16.190 --> 05:24.500
and the if the distance between the upper band and the lower band is narrow then this is an indication

05:24.500 --> 05:31.910
for low volatility and if the distance between those two is wide then this is an indication for high

05:31.910 --> 05:40.420
volatility and actually some might argue that if the current stock prices at the lower band this is

05:40.450 --> 05:42.880
a sign to buy or to Sarah.

05:42.890 --> 05:49.560
So depending on your philosophy and also if the current prices that the upper band then.

05:49.600 --> 05:53.070
This can be assigned to buy or to sell the stock.

05:53.440 --> 05:56.560
So that was that the video on and active political bands.

05:56.590 --> 06:03.210
And the next video we will learn how to add some more technical indicators here to our interactive plot

06:03.310 --> 06:03.750
graph.

06:03.760 --> 06:05.200
So hope to see you there by.
