WEBVTT

00:00.880 --> 00:06.640
In the last videos we created the price weighted equal weighted and very weighted indexes based on price

00:06.640 --> 00:13.660
returns only because we used the closing prices of our stocks that do not include dividends which are

00:13.660 --> 00:17.920
actually an important part of total performance or total return.

00:17.980 --> 00:24.370
And in this video we will create the price weighted Total Return Index are and in other words the price

00:24.370 --> 00:30.780
weighted Performance Index and it's actually more complicated than one might think in a Total Return

00:30.780 --> 00:31.300
Index.

00:31.300 --> 00:38.860
The returns of our index constituents should be based on the adjusted close price data but the weighting

00:38.860 --> 00:45.250
of constituents must be based on the close prices and therefore it would be wrong to simply add the

00:45.250 --> 00:48.010
adjusted prices as we did before.

00:48.010 --> 00:56.900
With the price way that price return index so coding wise the procedure follows the same intuition as

00:56.900 --> 01:00.110
calculating the value weighted index.

01:00.110 --> 01:07.250
First of all we use the returns of constituents based on adjusted close prices and then we need to wait.

01:07.280 --> 01:13.970
This returns with a weight data frame that we derive from closing prices.

01:14.000 --> 01:18.800
So this is the the most general way to create an index that always works.

01:18.800 --> 01:24.260
But before we have seen with the price way that price return index and the equal weighted price return

01:24.260 --> 01:30.240
index that there are some shortcuts but not in this case here and.

01:30.320 --> 01:37.600
First of all we import pandas again and we import our index stocks CSP file.

01:38.150 --> 01:45.970
So here we can see the adjusted close prices and the close prices so let's first of all select only

01:45.970 --> 01:55.310
the adjusted close prices and uh we save this in a new data frame adjusted close and then we can decorate.

01:55.430 --> 01:59.720
The daily total returns by using the percentage change method.

01:59.720 --> 02:01.560
So this is nothing new.

02:02.870 --> 02:11.570
So these are the daily returns of our stocks and also we need to select uh the close prices to get the

02:11.570 --> 02:19.510
weightings and we save the close data frame and the variable close and then we can calculate the weights

02:19.510 --> 02:22.920
for our six stocks on each and every timestamp.

02:22.930 --> 02:29.380
And we can do this here with a combination of the diff method and the sum method.

02:29.380 --> 02:30.700
This is actually nothing new.

02:30.730 --> 02:35.100
We did this when we created the value weighted index.

02:35.470 --> 02:36.720
And let's have a look here.

02:39.550 --> 02:42.690
And then we did this with that evaluated index.

02:42.800 --> 02:50.560
Instead of using the close price data frame we use the data frame with the market capitalizations.

02:50.560 --> 02:54.420
So the intention here is nevertheless the same.

02:54.550 --> 02:56.470
And these are our weights.

02:56.920 --> 03:05.470
So no surprise that the Amazon stock has the highest weights as the closing prices are by far the highest

03:07.270 --> 03:14.650
and we've said in part that the normalized data frame with the normalized stock prices for our six stocks

03:15.070 --> 03:22.420
and with the the indexes or the value weighted index the price weighted index and the equal weighted

03:22.420 --> 03:23.090
index.

03:23.130 --> 03:26.060
And these are all price return index.

03:26.260 --> 03:32.260
And we create a new column price weighted index the performance and first of all we assign assigned

03:32.260 --> 03:37.250
to each and every timestamp the value of one hundred and several here.

03:37.270 --> 03:43.300
So here on the very right hand side we create our new price weighted Performance Index and having now

03:43.300 --> 03:50.770
the total return data frame with the daily total returns and the weights data frame then we can actually

03:50.770 --> 03:54.190
calculate the cumulative investment multiples.

03:54.550 --> 03:56.880
So this is nothing new.

03:57.010 --> 04:02.730
And we derive to this code and did this before when we created the evaluated index.

04:02.770 --> 04:09.220
So let's simply run the sell here and we actually overwrite all values and the price weighted performance

04:09.250 --> 04:13.070
index starting from the second element here.

04:13.300 --> 04:15.850
And let's again have a look at our norm data frame.

04:15.850 --> 04:20.170
So here we have our price weighted performance index.

04:20.170 --> 04:23.730
And now we can also create these summary data frame.

04:23.830 --> 04:26.300
So also this is nothing new.

04:26.530 --> 04:35.170
And we actually annualize risk and return are mean and standard deviation so here we have now the annualized

04:35.200 --> 04:38.980
mean and the annualized standard deviation of returns.

04:38.980 --> 04:42.070
And here we can see the price where that price return index.

04:42.070 --> 04:50.500
And here we have an annualized return of 20 percent and an annualized risk of 21 percent and comparing

04:50.500 --> 04:53.570
this to the price weighted performance index.

04:53.740 --> 04:57.070
We have a annualized return of 22 percent.

04:57.070 --> 05:03.670
So we have 2 percent more return and this is simply the dividend payments and the risk is actually here

05:03.670 --> 05:04.180
the same.

05:04.180 --> 05:06.280
So we have here 21 percent.

05:06.570 --> 05:13.520
And finally we can also compare price return and the total return by creating here a line plot.

05:13.570 --> 05:20.370
So we are plotting here actually the price weighted index price return and the price weighted index

05:20.420 --> 05:26.470
performance return and here we have in blue the price return.

05:26.610 --> 05:34.560
And in RI in the performance return and both start actually at the beginning of 214 at the base value

05:34.560 --> 05:35.630
of 100.

05:35.640 --> 05:43.140
But then as the time goes on the constituents pay dividends and we actually reinvest our dividends into

05:43.140 --> 05:49.580
our index and therefore the difference between the performance index and the price return Index increases

05:49.640 --> 05:50.350
here.

05:50.460 --> 05:55.050
And it's no surprise that the green graph is above the blue graph.

05:55.050 --> 05:58.420
And as I said before this difference is simply that dividends.

05:58.440 --> 06:01.440
So that's the difference between price return and total return.

06:01.500 --> 06:07.530
And it always depends on the specific case whether we want to work with price returns or total returns

06:08.340 --> 06:13.410
and for the time being we are now finished and I hope to see you also in the next video by.
