WEBVTT

00:00.690 --> 00:06.960
In this video we are going to create an equal weighted stock index containing our six stocks our constituents

00:07.740 --> 00:14.010
and creating an equal weighted index means that at each single point in time we have invested the same

00:14.010 --> 00:17.020
dollar amount into all constituents.

00:17.040 --> 00:24.990
In our example with six stocks one sixth of our investment is invested in each stock and therefore the

00:24.990 --> 00:32.430
performance or the return of our index for each period should be the equal weighted the return of the

00:32.430 --> 00:34.230
six constituents.

00:34.260 --> 00:40.830
So we still have imparted the stocks data frame and the normalized data frame and now in a very next

00:40.830 --> 00:46.190
step we are calculating the simple returns for stocks by using here.

00:46.200 --> 00:53.180
The percentage change method and we are actually saving the returns data frame and the variable rate.

00:53.310 --> 00:54.600
So let's do this.

00:54.630 --> 00:55.230
Let's have a look.

00:55.980 --> 01:00.380
So these are actually the daily simple returns for our stocks.

01:00.420 --> 01:08.630
And as I said to the Simple Return of the equal weighted index is uh simply the equal weighted average

01:09.030 --> 01:11.910
of the returns of the constituents here.

01:11.910 --> 01:15.800
And therefore we can create a new column called mean return.

01:16.050 --> 01:23.220
And uh here for each timestamp of each row we are actually calculating the mean of the returns of the

01:23.220 --> 01:24.710
constituents.

01:24.900 --> 01:31.380
And of course we can do the service of the mean method and passing one to the access parameter and say

01:31.530 --> 01:34.050
OK so here's on the right hand side.

01:34.070 --> 01:34.540
Um.

01:34.590 --> 01:36.120
The mean returns.

01:36.120 --> 01:42.040
And by convention we already know that our equal weighted index should have the value one hundred at

01:42.090 --> 01:50.880
the very first day here at the thirty first of December 2000 and 13 and therefore we can already create

01:50.910 --> 01:58.790
a column for our normal data frame called Equal Weighted Index and in a first step we assign 100 to

01:58.800 --> 02:00.520
each timestamp so let's do this.

02:01.800 --> 02:09.450
So here we are from the right hand side our equal weighted index with uh 100 at the beginning and we

02:09.450 --> 02:11.640
already have everything in place to calculate.

02:11.640 --> 02:13.770
Also the following prices.

02:13.790 --> 02:20.920
So we have for the starting price of 100 and we have the simple returns of our equal weighted index.

02:20.970 --> 02:28.220
And if you want to calculate uh the index price um on the second timestamp here on the second of January

02:28.890 --> 02:36.600
then we simply have to multiply 100 with the investment multiple which is here in this case the one

02:36.600 --> 02:38.530
plus the return.

02:38.580 --> 02:45.360
So the next step is actually to convert all the returns here into the investment multiply by adding

02:45.360 --> 02:45.810
1.

02:46.740 --> 02:49.090
Let's do this here.

02:49.110 --> 02:51.040
So these are the multiple births.

02:51.240 --> 02:56.400
And if you want to calculate the price here at the second timestamp we simply have to multiply one hundred

02:56.430 --> 02:59.020
and O point nine nine four.

02:59.070 --> 03:01.710
So this would be the price on the second timestamp.

03:02.160 --> 03:10.230
And for all of the other timestamps we actually have to multiply the initial value of 100 with the accumulated

03:10.460 --> 03:11.750
investment multiple.

03:12.270 --> 03:18.360
And we can actually calculate the cumulative investment multiple by actually multiplying the single

03:18.420 --> 03:19.440
investment multiple.

03:19.440 --> 03:27.840
So for example on the third timestamp the cumulative investment multiple is uh 0 point 9 9 4 times 0

03:27.840 --> 03:36.880
point 9 9 9 so that would be the cumulative investment multiple for the third timestamp and uh for the

03:36.880 --> 03:42.800
fourth timestamp consequently we would have to multiply the first three investment multiples.

03:42.880 --> 03:44.330
Cumulatively.

03:44.380 --> 03:45.660
And so on.

03:46.600 --> 03:53.140
And we can actually calculate all cumulative investment my words with the come proud method.

03:53.140 --> 03:54.700
So cumulative product

04:01.180 --> 04:04.100
so these are here the cumulative products.

04:04.270 --> 04:12.610
And for example if you want to calculate uh the price of our index at the 9th of January 2014 we have

04:12.760 --> 04:20.470
to multiply the cumulative product so point nine eight nine by the initial price of one hundred and

04:20.470 --> 04:21.980
so on.

04:22.040 --> 04:28.760
This is now our very last step so we calculate and multiply the cumulative investment manager built

04:28.790 --> 04:34.610
by the initial value of one hundred or the initial price.

04:34.610 --> 04:38.260
And now we have actually the prices of our equal weighted index.

04:38.450 --> 04:48.530
So starting at the second time with ninety nine point four 0 0 right and now what we have to do we have

04:48.530 --> 04:55.580
to simply replace here the value starting from the second of January by these values here.

04:55.580 --> 04:57.110
So let's do this.

04:57.110 --> 05:00.740
So this is nothing nothing new here.

05:00.860 --> 05:05.320
And finally now we have you on the right hand side of our neon data frame.

05:05.570 --> 05:13.170
Our equally weighted index and now we can also plotted the constituents here and our equal weighted

05:13.170 --> 05:22.200
index so let's do this here and let's have a look so here we can see in dark blue our equal weighted

05:22.200 --> 05:23.550
index.

05:23.550 --> 05:25.890
And we can also only plot.

05:25.920 --> 05:28.980
The Equal Weighted Index with the Amazon stock

05:33.890 --> 05:40.280
and we can already see here that the equal weighted index is less correlated to the Amazon stock.

05:40.310 --> 05:46.670
Then the price weighted index because the weight of the Amazon stock here in the equal weighted index

05:46.680 --> 05:48.730
is much smaller.

05:49.430 --> 05:56.170
And for comparison purposes we can also plot to the equal weighted index and the price weighted index

05:57.780 --> 06:03.190
so here we have in blue the price weighted index and in green the equal weighted index.

06:03.330 --> 06:10.620
And it seems like that over the whole period the price weighted index showed a higher return.

06:10.620 --> 06:14.500
And this is simply the case because the Amazon stock soars.

06:14.580 --> 06:20.490
For all the constituents the highest return and the weight of Amazon and the price weighted indexes

06:20.700 --> 06:23.850
are actually much higher than in the equal weighted index.

06:24.000 --> 06:30.990
And for the sake of completeness we can also create a data frame with the rates over time so we create

06:31.020 --> 06:38.100
a copy of our stocks data frame and call it the way it's equally weighted index and then for each and

06:38.100 --> 06:42.350
every value we assign actually the value of one sixth.

06:42.420 --> 06:43.290
So let's have a look.

06:43.290 --> 06:47.730
So this is actually no surprise and it's more or less a no brainer.

06:47.730 --> 06:52.310
And we can also plot and visualize the rates over time.

06:52.750 --> 06:59.750
So here we have add to the value of 1 6 actually all the stocks that our constituents.

06:59.860 --> 07:02.430
And the weights actually totally stable over time.

07:02.450 --> 07:05.030
At 1 6.

07:05.130 --> 07:11.760
So this is the equal weighted index and one advantage is that it shows the best possible diversification

07:11.760 --> 07:17.730
and there's actually no concentration of a single stock on the other inside smaller stocks in terms

07:17.730 --> 07:25.110
of market cap favored and have higher rates than they should have according to the market cap and a

07:25.110 --> 07:25.970
smaller stocks.

07:26.040 --> 07:33.390
In many cases they're riskier than larger stocks an equal weighted index has typically higher risk.

07:33.390 --> 07:35.840
And finally as another disadvantage.

07:35.850 --> 07:43.410
So at each point in time you would have to rebalance the stocks to equal weight by selling winners and

07:43.440 --> 07:44.830
buying losers.

07:44.940 --> 07:49.110
And that would create a substantial transaction costs.

07:49.170 --> 07:56.130
So also here we have uh disadvantages and advantages and in the next video we will create a value weighted

07:56.130 --> 07:56.580
index.

07:56.580 --> 07:58.470
So I hope to see you there by.
