The weights of a market capitalization-weighted portfolio
In a market capitalization-weighted portfolio, the weights are given by the individual assets' market capitalization (or market value), divided by the sum of the market capitalizations of all assets. A typical example is the S&P 500 portfolio invested in the 500 largest companies listed on the US stock exchanges (NYSE, Nasdaq). Note that by dividing by the sum of asset values across all portfolio assets, the portfolio weights sum to unity (one).
As an exercise, inspect the distribution of market capitalization based weights when the portfolio is invested in 10 stocks. For this exercise, you can use market capitalizations of 5, 8, 9, 20, 25, 100, 100, 500, 700, and 2000 million USD.
Diese Übung ist Teil des Kurses
Introduction to Portfolio Analysis in R
Anleitung zur Übung
- Define the vector
marketcapsholding the market capitalizations. - Calculate the weights of
marketcapsand assign them toweights. - Print a summary of
weights. - Create a bar plot of
weights.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Define marketcaps
# Compute the weights
# Inspect summary statistics
# Create a bar plot of weights