Welcome to the fourth lesson of our final module. In our previous session, we focused on the tactical level of risk management, learning how to calculate the precise position size for a single trade to align with your risk budget. This ensures no individual trade can cause undue harm to your portfolio.
Now, we will shift our perspective from the individual trade to the entire portfolio. This lesson addresses the learning outcome: to measure aggregate commodity, sector,currency, and correlation exposure across a proposed portfolio. Just as in systems architecture, where you must understand not only individual components but also their interactions and dependencies, a robust trading plan requires you to analyze how your various positions interact. A portfolio is more than just a collection of trades; its total risk is shaped by the relationships between them.
By the end of this lesson, you will be able to dissect a portfolio of commodity-linked assets and quantify its true underlying exposures, helping you to avoid unintended risk concentrations.
From Notional Value to True Exposure
The first step in understanding aggregate risk is to sum up your positions. However, simply adding up the capital allocated to each trade is insufficient. We need to look at the notional value of each position and group these exposures in meaningful ways.
Let's imagine a hypothetical portfolio designed to capture different aspects of the commodity market. Assume you have a £100,000 portfolio and have allocated capital to the following positions:
- Anglo American plc (AAL.L): 666 shares at £25.00/share (Total £16,650). A diversified miner with significant copper and industrial metal exposure, listed on the LSE and priced in pence (GBp).
- SPDR Gold Shares ETF (GLD): 100 shares at $215/share (Total $21,500). An ETF tracking the price of gold, listed on the NYSE and priced in USD.
- COMEX Copper Futures (HG): 1 long contract. Let's assume the price is $4.50/lb. A standard contract is for 25,000 lbs, giving a notional value of $112,500.
Commodity and Sector Exposure
First, we aggregate by commodity and sector.
- Industrial Metals (Copper): Your exposure comes from both Anglo American and the copper futures. While AAL is diversified, a large part of its revenue is driven by copper. You also have direct exposure via the futures contract.
- Precious Metals (Gold): Your exposure is via the GLD ETF.
Your total notional exposure isn't just the capital you've deployed (£16,650 + $21,500 + margin for futures). It includes the full value of the futures contract. This shows how quickly a portfolio can become heavily concentrated in a single commodity, even with just one futures position.
Currency Exposure
Next, consider currency. Your portfolio account might be in USD, but your AAL position is priced in GBP. This creates an explicit currency exposure. If the British pound weakens against the US dollar, the value of your AAL holding will decrease in USD terms, even if the share price in GBP remains the same.
Measuring this is crucial. The following paper from the CFA Institute provides an excellent institutional framework for thinking about and quantifying currency exposure in a portfolio.
This paper explains how international investments create "embedded" currency exposures and provides a methodology for calculating them. It's a professional-grade look at a risk that many retail traders overlook.
Please read the introduction, starting from the first paragraph to understand the three main choices for managing this risk. Then, focus on the section "Hedging for US Investors" and study Exhibit 1 and its accompanying text. This table is a template for how you can break down your own portfolio to see your total exposure to each foreign currency.
As Exhibit 1 demonstrates, you can create a table listing each holding, its weight in the portfolio, and its inherent foreign currency exposure. For your hypothetical AAL holding, a significant portion of its value contributes to your portfolio's overall GBP exposure.
The Hidden Risk: Correlation
Simply summing up exposures isn't enough. Two positions might seem different but can be driven by the same underlying economic factor. For example, a copper miner (like Anglo American) and a heavy equipment manufacturer (like Caterpillar) are in different sectors, but both are highly sensitive to global industrial activity. If you are long both, you haven't diversified; you've doubled down on a single bet.
This is where we measure correlation. The PensionCraft video below offers a great visual introduction to how different commodity assets cluster together based on their price movements.
How To Invest In Commodities and Why?
This video explains how to use correlation to build a more diversified commodity portfolio. It uses a tree diagram to show which assets move together and which move independently.
Watch the segment from the discussion on correlation. Pay attention to the "tree" diagram. The key insight is that assets on closely related branches are highly correlated (e.g., different gold funds), while those on distant branches offer better diversification.
To quantify these relationships, we use a covariance and correlation matrix. For this, we turn to Python, leveraging your coding background to build a practical tool. The following video provides a straightforward guide to calculating and visualizing a correlation matrix using historical price data.
Covariance and Correlation Matrix of stock returns with Python
This tutorial from Algovibes walks through the process of fetching stock data, calculating returns, and then computing covariance and correlation matrices. It's a perfect practical starting point.
Watch from getting prices and calculating returns. Then, watch the explanation of the covariance matrix and, most importantly, the correlation matrix. Finally, see how a heatmap provides a powerful visual summary of these relationships.
Decomposing Portfolio Risk with Python
Now that you understand the concept of a correlation matrix, we can take it a step further. We don't just want to see the correlations; we want to calculate precisely how much each position contributes to the total portfolio's volatility. This is known as Total Risk Contribution (TRC). Answering "What percentage of my portfolio's total risk comes from my Anglo American position?" is the ultimate goal of aggregate risk measurement.
The article from MLQ.ai is an outstanding resource that matches your analytical background. It explains the philosophy and provides the Python code to perform this decomposition.
This article introduces the "risk parity" philosophy, which argues for allocating risk, not just capital. It provides the mathematical foundation and Python implementation for calculating the risk contribution of each asset in a portfolio.
First, read Section 1 to understand the core concept: an equal-weight portfolio is not an equal-risk portfolio. Next, review Section 2. You've already seen the basics in the video; this section shows a clean Python implementation for constructing the covariance matrix, which is the engine of our risk analysis. Finally, and most importantly, study Section 3. This section presents the formulas for Marginal Risk Contribution (MRC) and Total Risk Contribution (TRC) and provides the Python functions to calculate them. Focus on understanding the output: it shows that two stocks with 33.3% of the capital can contribute over 50% of the risk. This is the hidden concentration we aim to uncover.
By implementing the risk_contributions function from the article, you can analyze any portfolio you construct. You would feed it the weights of your positions (AAL, GLD, HG futures, etc.) and the covariance matrix calculated from their historical price data. The output will tell you, for example, that your AAL position accounts for 25% of the portfolio's risk, your GLD position for 10%, and your copper futures for 40%.
This analysis might reveal that, despite holding three positions, your portfolio's risk is overwhelmingly dominated by the outlook for industrial metals, with little diversification benefit from your gold holding. This is a critical insight that simple notional accounting would miss.
Conclusion
In this lesson, we have moved from the single-trade view to a holistic, portfolio-level risk assessment. You've learned how to look past simple capital allocation and measure the true underlying exposures that drive your portfolio's performance.
Here are the key takeaways:
- Aggregate Exposure: You must measure your total notional exposure to each commodity, sector, and currency, accounting for leverage from instruments like futures.
- Currency Risk: International investments introduce explicit currency exposure that must be quantified.
- Correlation is Key: The relationships between your positions determine your portfolio's true diversification. High correlation means concentrated risk, even across seemingly different assets.
- Total Risk Contribution (TRC): Using Python and the covariance matrix, you can calculate the exact percentage of total portfolio volatility that each individual position is responsible for.
You now have a complete framework for understanding a portfolio's static risk profile. In our next lesson, we will make this dynamic. We will learn how to stress-test a position using adverse commodity-price, currency, volatility, and company-specific scenarios, to see how your portfolio would behave under market turmoil.
Can't find a good explanation? Sign up and we'll make it for you
Sign up