Recommended resources
The freely available resources this lesson will direct you to.
Hello! Welcome back to our module on Real Estate Portfolio Management.
In our last lesson, we explored the foundational concepts of diversification and correlation. We established why building a portfolio is a powerful risk management strategy: by combining assets whose returns don't move in perfect sync, we can reduce the overall volatility of our investment. We discussed diversifying across geographies, property types, and even investment vehicles.
Today, we move from the "why" to the "how." It's not enough to say, "I'm diversified." We need to be able to measure it. A portfolio might feel diversified, but a quantitative analysis can reveal hidden concentrations of risk. Therefore, our learning outcome for this lesson is to analyze portfolio concentration by property type and geographic market. We will learn a standard, powerful metric to do just that, giving you a tangible tool to assess and manage your portfolio's structure.
1. Measuring Concentration: The Herfindahl-Hirschman Index (HHI)
To quantify concentration, we'll borrow a tool from the world of economics and antitrust regulation: the Herfindahl-Hirschman Index (HHI). Regulators use it to determine if a market is dominated by a few large companies (highly concentrated), but it's perfectly suited for measuring the concentration of an investment portfolio.
The core idea of the HHI is to provide a single number that summarizes the distribution of assets in a portfolio. To get a formal definition and understand how it's calculated, please start with the following resource.
This Wikipedia article on the Herfindahl-Hirschman Index provides a clear and concise explanation of the metric, its formula, and its interpretation. It also has a section directly relevant to our use case in portfolio management.
Please read the introduction, the 'Formula' section, and the 'Effective assets in a portfolio' section. Focus on: The basic definition and purpose of the HHI. The formula: HHI = Σ(sᵢ²), where sᵢ is the market share (or portfolio weight) of item i. The interpretation of the HHI score ranges (e.g., high vs. low concentration). The concept of 'effective number of positions' (1/HHI).
Key Properties of the HHI
As you've just read, the HHI has several important characteristics:
-
Formula: The HHI is the sum of the squares of the weights of each component in a portfolio.
Where is the weight of the i-th category (e.g., the percentage of your portfolio's value in Madrid) and is the number of categories.
-
Range: The index ranges from near 0 to 1.
- A value near 0 represents a perfectly diversified portfolio with an infinite number of tiny assets.
- A value of 1 represents a portfolio with 100% of its value in a single asset (perfect concentration).
-
Emphasis on Large Holdings: By squaring the weights, the HHI gives much greater importance to larger positions. A portfolio with weights of (50%, 50%) and one with (90%, 10%) have the same number of assets, but the HHI will correctly identify the second as far more concentrated.
Let's look at a clear, visual example of the calculation.

Test your understanding!
Imagine a simple real estate portfolio consisting of three properties:
- Property A: Value €500,000
- Property B: Value €300,000
- Property C: Value €200,000
Calculate the HHI for this portfolio based on the concentration in these three individual assets. What does the result tell you?
Show answer
-
Calculate Total Portfolio Value:
€500,000 + €300,000 + €200,000 = €1,000,000 -
Calculate Individual Weights:
- Weight A: €500,000 / €1,000,000 = 0.50
- Weight B: €300,000 / €1,000,000 = 0.30
- Weight C: €200,000 / €1,000,000 = 0.20
-
Square the Weights and Sum them up:
- HHI = (0.50)² + (0.30)² + (0.20)²
- HHI = 0.25 + 0.09 + 0.04
- HHI = 0.38
Interpretation: An HHI of 0.38 indicates a highly concentrated portfolio. Using the common thresholds (often expressed on a 10,000-point scale, so 3,800), this is well above the 0.25 (or 2,500) mark for high concentration. The portfolio is heavily dominated by Property A.
2. Applying HHI to Spanish Real Estate Portfolios
Now for the practical application. We can calculate the HHI for a portfolio along any dimension we choose. The two most important are geography and property type.
Let's work through an example. Consider this hypothetical portfolio in Spain:
| Property | City | Property Type | Value (€) |
|---|---|---|---|
| 1 | Madrid | Apartment | 300,000 |
| 2 | Barcelona | Apartment | 250,000 |
| 3 | Madrid | Office | 400,000 |
| 4 | Valencia | Retail | 250,000 |
| Total | 1,200,000 |
a) Geographic Concentration Analysis
First, we group the assets by their geographic market. We can do this at the level of city, province, or Autonomous Community. Let's use the city level.
-
Group by City and Sum Values:
- Madrid: €300,000 (Apt) + €400,000 (Office) = €700,000
- Barcelona: €250,000
- Valencia: €250,000
-
Calculate Geographic Weights:
- Madrid: €700,000 / €1,200,000 = 0.583
- Barcelona: €250,000 / €1,200,000 = 0.208
- Valencia: €250,000 / €1,200,000 = 0.208
-
Calculate Geographic HHI:
- HHI_geo = (0.583)² + (0.208)² + (0.208)²
- HHI_geo = 0.340 + 0.043 + 0.043 = 0.426
This HHI of ~0.43 indicates a high geographic concentration in the Madrid market. Why is this a risk? The Spanish property market is famously heterogeneous. Economic performance, price growth, and demand drivers vary significantly from one region to another. A portfolio heavily weighted to one city is vulnerable to local economic downturns, adverse regulations, or a shift in population trends specific to that area.
The Bank of Spain's 2023 Annual Report provides excellent data on this very point.
Informe Anual 2023. Capítulo 4
To understand why geographic concentration is a critical risk factor in Spain, let's examine some findings from the Bank of Spain's 2023 Annual Report. This will ground our analysis in the reality of the Spanish market.
Please review the following parts of the report: In section '2.1 El mercado de la compraventa de viviendas', read the paragraphs on 'Heterogeneidad geográfica de los precios de la vivienda' and 'Compras de extranjeros'. In section '3.1 El impulso de la demanda de vivienda', read the paragraphs on 'Heterogeneidad geográfica en la creación neta de hogares' and 'La demanda de no residentes'. Focus on the report's recurring theme: the significant differences in price growth, demand drivers (like foreign buyers), and demographic trends across Spanish regions.
As the report highlights, factors like foreign investment are heavily concentrated on the Mediterranean coast and islands (see Graph 4.10.a), while population and new household formation are concentrated in specific Autonomous Communities like Madrid, Cataluña, and Andalucía. By measuring your geographic HHI, you are quantifying your exposure to these highly localized trends.
b) Property Type Concentration Analysis
Next, we analyze the concentration by property sector.
-
Group by Type and Sum Values:
- Residential (Apartment): €300,000 + €250,000 = €550,000
- Office: €400,000
- Retail: €250,000
-
Calculate Property Type Weights:
- Residential: €550,000 / €1,200,000 = 0.458
- Office: €400,000 / €1,200,000 = 0.333
- Retail: €250,000 / €1,200,000 = 0.208
-
Calculate Property Type HHI:
- HHI_type = (0.458)² + (0.333)² + (0.208)²
- HHI_type = 0.210 + 0.111 + 0.043 = 0.364
An HHI of ~0.36 also indicates a fairly high concentration by property type, with a strong tilt towards residential. As we discussed in the previous lesson, different property sectors are driven by entirely different economic fundamentals (e.g., e-commerce for industrial, consumer spending for retail, corporate employment for office). A high HHI here means your portfolio's performance is heavily dependent on the health of just one or two sectors.
For context, let's look at how the major institutional players in Spain, the SOCIMIs, are valued.

The "Effective N" Interpretation
The HHI value itself is useful, but it can be made more intuitive. As mentioned in the Wikipedia resource, the reciprocal of the HHI gives us the "effective number of assets" (N_eff).
N_eff = 1 / HHI
N_eff tells you the number of equally-sized positions that your portfolio is equivalent to in terms of concentration.
Let's apply this to our example portfolio:
-
Geographic N_eff: 1 / 0.426 ≈ 2.35
- Interpretation: "Although my portfolio is in three cities, its geographic concentration is equivalent to holding just 2.35 equally-sized geographic bets."
-
Property Type N_eff: 1 / 0.364 ≈ 2.75
- Interpretation: "Although my portfolio has three property types, its sector concentration is equivalent to holding just 2.75 equally-sized sector bets."
This is a powerful and intuitive way to understand your diversification. An investor aiming for better diversification would take actions to increase their N_eff.
A Note on Coding This
For a software engineer, calculating HHI is straightforward. You can easily write a Python function to do this.
import numpy as np
def analyze_concentration(weights):
"""Calculates the HHI and Effective N for a list of weights."""
if not np.isclose(np.sum(weights), 1.0):
print("Warning: Weights do not sum to 1.")
return None, None
hhi = np.sum(np.array(weights)**2)
effective_n = 1 / hhi
return hhi, effective_n
# Our geographic weights from the example
geo_weights = [0.583, 0.208, 0.208]
hhi_geo, n_eff_geo = analyze_concentration(geo_weights)
print(f"Geographic HHI: {hhi_geo:.3f}")
print(f"Geographic Effective N: {n_eff_geo:.2f}")
# Our property type weights
type_weights = [0.458, 0.333, 0.208]
hhi_type, n_eff_type = analyze_concentration(type_weights)
print(f"\nProperty Type HHI: {hhi_type:.3f}")
print(f"Property Type Effective N: {n_eff_type:.2f}")
This simple script allows you to quickly assess the concentration of any portfolio breakdown.
Conclusion
Today we've added a crucial quantitative tool to your real estate analysis toolkit. By moving beyond a vague sense of diversification to a calculated measure of concentration, you can make more informed and deliberate portfolio management decisions.
Key Takeaways:
- Portfolio concentration measures how much of a portfolio's value is centered in a few categories. It is the inverse of diversification.
- The Herfindahl-Hirschman Index (HHI) is a standard method for quantifying concentration, calculated by summing the squares of category weights ().
- A higher HHI signifies higher concentration and, therefore, higher specific risk related to that category.
- Analyzing HHI along different dimensions—primarily geography and property type—is essential for understanding a real estate portfolio's risk profile in a heterogeneous market like Spain.
- The Effective N (1/HHI) provides an intuitive way to understand concentration, framing it as the number of equally-sized "bets" your portfolio represents.
Preview of the Next Lesson:
We now understand why diversification matters and how to measure it via concentration. The next logical step is to measure the relationship between our assets. In the next lesson, we will learn to calculate the correlation of returns between different real estate assets in a portfolio. This will complete our foundational understanding of portfolio risk structure, paving the way for optimization.