| AAPL | MSFT | AMZN | NFLX | |
|---|---|---|---|---|
| AAPL | 1.00 | 0.81 | 0.83 | 0.86 |
| MSFT | 0.81 | 1.00 | 0.96 | 0.88 |
| AMZN | 0.83 | 0.96 | 1.00 | 0.96 |
| NFLX | 0.86 | 0.88 | 0.96 | 1.00 |
Introduction to Portfolio Management
2025-11-03
Today’s plan 📋
Comments and Questions from Engagement Questions or about R 🪄
Upcoming Dates
Review Questions
Comparing Portfolios of Stocks
Profitability of one stock using geometric mean
Weighted Mean of two or more stocks
Volatility of One Stock using adjusted standard deviation
Volatility of weighted combination of two or more stocks
HW 7 is due Wed. 11/5 at midnight.
Test 2 is on November 11th and will include material up through Lecture 20.
Practice Questions and demo videos are now available.
Lecture 21 - Intro to Portfolio Management, will be on Final Exam, not on Test 2.
In this course we will use R and RStudio to understand statistical concepts.
You will access R and RStudio through Posit Cloud.
I will post R/RStudio files on Posit Cloud that you can access in provided links.
I will also provide demo videos that show how to access files and complete exercises.
NOTE: The free Posit Cloud account is limited to 25 hours per month.
For those who want to go further with R/RStudio:
If you are interested in downloading R and RStudio to your own computer, I can guide you through the process.
The software is completely free but it does have to be updated a couple times each year.
Poll Everywhere - My User Name: penelopepoolereisenbies685
Recall that in lecture 20 we discussed \(R_{xy}\), the correlation coefficient.
The matrix shown here shows a correlation matrix for four stocks based on their 2023 - 2024 daily adjusted closing values.
A correlation matrix shows the pairwise correlation between each pair of stocks in the dataset.
Which other stock is most strongly positively correlated with Apple (AAPL)?
| AAPL | MSFT | AMZN | NFLX | |
|---|---|---|---|---|
| AAPL | 1.00 | 0.81 | 0.83 | 0.86 |
| MSFT | 0.81 | 1.00 | 0.96 | 0.88 |
| AMZN | 0.83 | 0.96 | 1.00 | 0.96 |
| NFLX | 0.86 | 0.88 | 0.96 | 1.00 |
Poll Everywhere - My User Name: penelopepoolereisenbies685
Given the non-linear trends in stock prices, does it make sense to calculate the correlation, \(R_{xy}\), between pairs of stocks?
For each of these four companies we have two year of data.
We want to know the average rate of return.
We could calculate the arithmetic mean of the adjusted close, but the conventional wisdom is that this is not ideal.
Instead, we calculate the geometric mean
The psych package in R has the geometric.mean command to do this calculation.
If the Stocks are relatively stable, these values will be similar.
The geometric mean is more reliable because of the compounded interest.
The table below shows the geometric means of three of the stocks:
| Stock | Arithmetic_Mean | Geo_Mean |
|---|---|---|
| AAPL | 188.4278 | 186.3504 |
| MSFT | 362.8010 | 356.9529 |
| AMZN | 153.1268 | NA |
| NFLX | 531.4343 | 506.6509 |
Poll Everywhere - My User Name: penelopepoolereisenbies685
Question 3. What is the geometric mean for the Amazon (AMZN) stock data?
geometric.mean command from the psych package.Question 4. Which of these four stocks shows the largest disparity between the geometric and arithmetic mean?
A primary concern when investing is “not putting all of your eggs in one basket”.
In other words, it is important to diversify your portfolio by investing in multiple stocks so that you have some protection if one stock crashes.
We can calculate the rate of return of a portfolio
To do this we calculate a weighted average of the individual stock geometric means:
In our simple examples, we will look at 2 stock portfolios, but the same principles apply to larger more complex portfolios.
This weighted average of the stock portfolio is referred to as it’s Expected Value..
Example: Calculate the average rate of return of a portfolio where 80% is invested in Apple (AAPL) and 20% is invested in Netflix (NFLX).
Poll Everywhere - My User Name: penelopepoolereisenbies685
Round answer to both questions below to two decimal places.
Question 5: What is the average rate of return of a portfolio with 60% investment in Amazon (AMZN) and 40% investment in Microsoft (MSFT)?
Question 6: What is average rate of return of a portfolio with 70% investment in Amazon (AMZN) and 30% investment in Apple (AAPL)?
Volatility is a measure of variability and risk associated with a stocks rate of return over time.
Volatlity for a single stock: \(Volatility = SD \times \sqrt{T} = \sqrt{VAR \times T}\)
T = number of time periods.
In these two years, there were 502 trading days, T = 502.
Variances, standard deviations, and volatilities for each of these stocks:
| Stock | Variance | Std_Dev | Volatility |
|---|---|---|---|
| AAPL | 791.9415 | 28.14146 | 630.5193 |
| MSFT | 3906.1799 | NA | NA |
| AMZN | 1332.0236 | 36.49690 | 817.7260 |
| NFLX | 27399.7493 | 165.52870 | 3708.7295 |
Poll Everywhere - My User Name: penelopepoolereisenbies685
Question 7: What is the volatility of the Microsoft (MSFT) stock? Round answer to two decimal places.
Volatlity for a single stock: \[ Volatility = SD \times \sqrt{T} = \sqrt{VAR \times T} \]
| Stock | Variance | Std_Dev | Volatility |
|---|---|---|---|
| AAPL | 791.9415 | 28.14146 | 630.5193 |
| MSFT | 3906.1799 | NA | NA |
| AMZN | 1332.0236 | 36.49690 | 817.7260 |
| NFLX | 27399.7493 | 165.52870 | 3708.7295 |
Recall our portfolio where 80% is invested in Apple and 20% is invested in Netflix
Calculating the volatility of a portfolio little more complex, but it is easier if we break it down into steps.
Step 1: Calculate variance of portfolio of stocks 1 and 2, which is the sum of three parts:
Part 1: \(W_{1}^2 \times Variance_{1}\)
Part 2: \(W_{2}^2 \times Variance_{2}\)
Part 3: \(2 \times W_{1} \times W_{2} \times COV_{1,2}\)
Portfolio Variance = Part 1 + Part 2 + Part 3
Step 1: Calculate variance of portfolio of stocks 1 and 2, sum of these three parts:
Part 1: \(W_{1}^2 \times Variance_{1}\)
Part 2: \(W_{2}^2 \times Variance_{2}\)
Part 3: \(2 \times W_{1} \times W_{2} \times COV_{1,2}\)
Portfolio Variance = Part 1 + Part 2 + Part 3
[1] 2889.715
Step 2: Calculate Volatility from Variance
\[ Volatlity = SD \times \sqrt{T} = \sqrt{VAR \times T}\]
Poll Everywhere - My User Name: penelopepoolereisenbies685
Round answer to both questions below to two decimal places.
Question 8: What is the volatility of a portfolio with 60% investment in Amazon and 40% investment in Microsoft?
Question 9: What is the volatility of a portfolio with 70% investment in Amazon and 30% investment in Apple?
Stock portfolios are linear combinations of stocks
The geometric mean is average rate of return of a single stock
The average rate of return of a portfolio is the weighted average of the individual stock means.
Volatility of a stock or a portfolio is \(SD \times \sqrt{T}\)
To find volatility of a portfolio, first find the variance
We will review these concepts and calculations after Quiz 2
To submit an Engagement Question or Comment about material from Lecture 21: Submit it by midnight today (day of lecture).