While working on an optimization project for international assets in a portfolio, the initial scope was restricted to a 'Long-Only' strategy, meaning asset weights could not fall below zero. This setup treated the portfolio as a textbook maximization problem, limiting optimization potential. However, I realized that this strict non-negativity constraint was artificially suppressing the hedging mechanisms found in Modern Portfolio Theory. So, I decided to expand upon the scope to test a hypothesis: if I remove this constraint, can I mathematically quantify the exact value of imposing a hedge?
According to Modern Portfolio Theory, a portfolio's risk is not just about individual volatility; it is determined by how each asset interacts with the others. Mathematically, risk (portfolio variance) is the sum of all pairwise covariances:
With respect to correlation, the same formula can be written as:
When two assets move in opposite directions (negative correlation), they cancel out each other's volatility, offsetting losses. Moreover, portfolio risk becomes dependent on only individual asset risk when assets are perfectly negatively correlated, or equal to –1:
The function we are maximizing, the Sharpe ratio, is dependent on both risk (portfolio variance) and expected return, which is just the sum of the weighted asset returns:
Risk and return combined, the Sharpe ratio is given as follows:
To maximize the Sharpe ratio, I first imported historical FRED data using Pandas, merging each source into a single time-aligned Data Frame to ensure accuracy in variable calculations.
Leveraging NumPy, I computed the annualized expected returns and the covariance matrix. This matrix is essential for the model as it quantifies all pairwise asset interactions, capturing both correlation and individual asset volatility, referenced in the portfolio variance equation above.
Finally, using SciPy, I defined a custom objective function for optimization. Since the SciPy library is designed for minimization, I inverted the result to return the Negative Sharpe Ratio. This allowed the algorithm to maximize the risk-adjusted return.
The initial 'Long-Only' optimization yielded a maximum Sharpe Ratio of 0.6996. While mathematically sound, this result confirmed that the non-negativity constraint was acting as a performance ceiling. The model was unable to utilize underperforming assets effectively.
By removing the constraint, the model became able to account for short selling, and thus the optimization validated the initial hypothesis, best visualized with the Efficient Frontier graph below. The ability to hedge significantly altered the efficiency frontier, resulting in a positive deviation from the 'Long-Only' curve.
The resulting shift quantifies the impact of hedging, which can be expanded by dissecting the distribution of the optimal portfolio. As shown in the Asset Allocation Graph, the unconstrained model pivoted to a Long/Short strategy, assigning negative weights to the UK and Japanese asset indices. Crucially, the model did not short the assets only because of correlation. Instead, it used them as funding sources. By shorting the sub-optimal risk profiles of the UK and Japanese assets, the model generated funds to leverage the superior risk-adjusted returns of the US and Canadian assets. These mechanisms behind the hedge shifted the portfolio's Gross Exposure above 100%, allowing the US/ Canada allocation to exceed the total capital base.
Ultimately, the shift from a constrained to a leveraged portfolio unlocked a 4.3% improvement in efficiency, resulting in a Sharpe Ratio of .7278. This increment demonstrates that in highly synchronized international markets, where natural hedges are rare, the value of hedging comes from leverage potential. The ability to overweight high-quality assets supersedes pure volatility cancellation in effectiveness.
Technologies: Python, Pandas, NumPy, SciPy, Matplotlib, FRED Economic Data