WEBVTT

00:01.140 --> 00:07.260
In this video we are going to download and import the price data that we require to construct our indexes

00:07.860 --> 00:13.230
and we have learned that as the very first step in the index construction process we typically have

00:13.230 --> 00:18.270
to define the market segment that our index should cover aggregate.

00:18.270 --> 00:23.150
And after that we need to identify and select the constituents of our index.

00:23.340 --> 00:27.360
And these two steps are actually not our primary focus here.

00:27.390 --> 00:32.280
So typically an index short consists at least 20 or 30 constituents.

00:32.400 --> 00:36.420
But this would make it more inconvenient for you to follow the coding steps.

00:36.750 --> 00:40.850
And therefore you select and total of six well-known U.S. stocks.

00:40.890 --> 00:48.420
And once you are familiar with the coding steps you could theoretically repeat the steps with 1000 constituents.

00:48.420 --> 00:53.160
So that does not make any difference as pen does this perfectly scalable.

00:53.160 --> 01:00.030
All right let's start and we import pandas nonpayment plot lip and the UBI finance library.

01:00.240 --> 01:06.470
So we are going to download and import financial price data from Yahoo Finance.

01:06.720 --> 01:13.650
And we've already learned that we can do this with the method the Y finance that download and we pass

01:13.650 --> 01:16.280
a list with our desired stock take us.

01:16.860 --> 01:25.230
And in this case at Amazon Boeing Disney IBM Coca-Cola and Microsoft and actually want to create our

01:25.230 --> 01:32.430
index from the time period 2014 to the end of 2000 and 18.

01:32.430 --> 01:40.750
And finally we are saving the resulting data frame and the variable stocks and let's have a look so

01:40.750 --> 01:46.210
here we have the adjusted gross close up my low and so on for our six constituents

01:49.170 --> 01:54.820
and finally we safe and export our data to a new CSP file called index stocks.

01:54.930 --> 02:03.360
And of course we can do this with the two CSP method and let's also re-employ it here with the reed

02:03.360 --> 02:11.310
CSB method and for this and the next videos we only select the closing prices as we want to calculate.

02:11.340 --> 02:15.000
First of all the price return in excess.

02:15.010 --> 02:23.450
So let's say this so here we have the closing price as far as six constituents from the end of 2013

02:23.870 --> 02:27.110
to the end of 2000 and 18.

02:27.140 --> 02:30.020
And finally we can also create a line plot

02:34.230 --> 02:40.880
so here we have the price charts of our six stocks based on their prices actually.

02:41.120 --> 02:43.290
And we have already seen that.

02:43.320 --> 02:50.940
This is very hard to compare and therefore it might make sense to normalize our stocks to a base value

02:50.940 --> 02:54.140
of 100 at the very beginning here.

02:54.630 --> 03:01.560
And we can do this by dividing oil prices by the initial price and then multiplying with 100.

03:01.560 --> 03:06.270
So by doing so we are creating here the norm data frame starting with 100.

03:07.080 --> 03:11.100
And finally we can also plot our non data frame.

03:11.100 --> 03:13.850
So that's the non data frame.

03:14.130 --> 03:18.120
And with this we have made our preparations for the next videos.

03:18.120 --> 03:25.030
So we have the closing prices and the normalized closing prices and in the next video we will start

03:25.220 --> 03:27.390
to create the price weighted index.

03:27.390 --> 03:28.860
So I hope to see there by.
