Stay informed Sign up for our newsletter and be the first to know.
Stay informed Sign up for our newsletter and be the first to know.
Brilliant Investment Thinking by Advisers for Advisers.
ASX
+0.33%
S&P
-0.50%
AUD
$0.69

Visualising risk and return: Building the efficient frontier with simple Python tools

Visualising risk and return: Building the efficient frontier with simple Python tools
Share
Print

How advisers can use Python-based portfolio simulation to illustrate diversification, show where a client sits versus the efficient frontier, and explain the non-linear trade-off between taking more risk and earning more return.

The efficient frontier remains one of the most enduring concepts in modern portfolio theory, offering a disciplined lens through which advisers can examine the trade-off between expected return and portfolio volatility. While the mathematics behind the frontier can appear opaque to clients, contemporary analytical tools such as Python allow advisers to visualise these relationships with clarity and precision. By constructing thousands of hypothetical portfolios and evaluating their return–risk characteristics, advisers can demonstrate how diversified allocations behave across different levels of market uncertainty.

At its heart, the efficient frontier relies on two key expressions:

port_return = np.dot(weights, mean_returns)
port_vol = np.sqrt(weights.T @ cov_matrix @ weights)

These form the engine that evaluates the expected return and volatility of any hypothetical portfolio. Once defined, Python can generate thousands of feasible portfolios and identify the subset that lies on the efficient frontier.

Assumptions used in the model

This user case relies on simulated data, drawn deliberately with simple, controlled parameters to illustrate how the frontier behaves. The core assumptions include:

1. Asset classes and their simulated characteristics

Three asset classes are modelled:

  • Australian Equities: mean monthly return 0.8 per cent, standard deviation 4 per cent
  • Global Equities: mean monthly return 0.9 per cent, standard deviation 4.5 per cent
  • Bonds: mean monthly return 0.3 per cent, standard deviation 1 per cent

These values are generated using normally distributed random numbers. They do not reflect current market expectations but provide a sensible contrast between higher-risk growth assets and lower-risk fixed income.

2. Portfolio simulation mechanics

  • 10,000 random portfolios are generated depending on the figure.
  • Weights are drawn at random, constrained only to sum to 1.
  • No shorting, fees, taxes or constraints on minimum/maximum exposures are applied.

This produces a wide distribution of feasible portfolios while keeping assumptions intentionally simple.

Interpretation of the results

Efficient frontier with sample portfolios

The figure presents a dense constellation of simulated portfolios, each representing a unique blend of equities and bonds. From this cloud of opportunities, the efficient frontier emerges as the upper-left boundary: the region where portfolios achieve the highest expected return for a given volatility.

Superimposed on this landscape are four representative model portfolios — Conservative, Balanced, Growth, and High Growth — as well as the client’s current position. The overlay provides immediate visual context. Advisers can evaluate whether these model portfolios sit in plausible regions of the frontier, whether the client’s current allocation lies below the frontier (suggesting potential inefficiency), and how much additional volatility would be required to pursue higher expected returns.

The figure also highlights an important practical insight: as volatility rises, expected returns tend to rise as well, but not in a linear fashion. The frontier curves rather than climbs, signalling diminishing marginal return to additional risk. This curvature is central to conversations with clients seeking clarity on the incremental trade-off between risk appetite and return ambition.

Efficient frontier stacked allocation map

The figure shifts the lens from outcomes to composition. By tracing only the set of frontier portfolios, the illustration reveals how asset weights evolve along the risk spectrum. The visual narrative is intuitive yet powerful.

At lower levels of portfolio volatility, bonds occupy a more prominent share, reflecting their stability within the simulation. Australian equities contribute meaningfully to these lower-risk portfolios, benefiting from relatively moderate volatility compared with global equities in this specific dataset. As the frontier moves into higher-risk territory, the allocation tilts progressively toward global equities, which provide greater return potential despite their higher volatility. Bonds recede, while the balance between domestic and global equities responds dynamically to changes in risk tolerance.

This allocation transition map is particularly valuable for advisers because it translates abstract mathematical optimisation into a tangible story about portfolio construction. Clients can observe how risk tolerance shapes the composition of their investment strategy and understand that movement toward higher expected returns is not merely a matter of “more equities,” but rather a deliberate re-weighting across different growth exposures.

Strengths and sensible cautions

This Python-based illustration offers a clear demonstration of how an efficient frontier emerges from simple return and risk assumptions. Its elegance lies in its parsimony: controlled parameters, straightforward calculations and intuitive visual outputs together illuminate the fundamental architecture of diversified portfolios. As a strategic communication aid, the model is highly effective in helping advisers articulate the nature of risk–return trade-offs.

However, it is essential to recognise that real-world portfolio construction is far more intricate. Practical implementations require a deeper set of assumptions and a broader analytical framework. In live settings, advisers must consider a spectrum of market environments, incorporate sensitivity testing, and allow for regime-dependent behaviour — elements that cannot be fully represented by simulated normal returns. Forward-looking assumptions often draw on richer statistical processes, including multi-variate distributions, regime-switching models, shrinkage estimators and Bayesian adjustments. These approaches acknowledge that correlations shift through time, that volatility is not constant, and that economic cycles meaningfully shape asset performance.

Thus, while this illustration captures the essence of mean–variance principles, an investable frontier in practice demands a far more sophisticated toolkit. The value of the exercise lies not in forecasting precision but in cultivating a deeper understanding of how portfolio components interact — and how disciplined allocation can be adapted to meet the complexities of real market conditions.

Ye Peng is a data scientist and developer at Atchison.

Share
Print

Research as the bedrock: John Hortop on building portfolios that last

Robust portfolios are not assembled from themes or market calls. They are constructed through layered research and disciplined implementation.

Be prepared: Long-volatility, convexity and portfolio efficiency

It's never a question of If, only When will we see a significant left-tail event in risk assets. Here's why large equity-market declines are not rare; and why...

Discipline, not prediction: why trend-following could be 2026’s smartest strategy

Discipline cuts through behavioural bias; and trend-following thrives because it responds and doesn’t predict. Take a look under the hood of a systematic...

Refining portfolio risk simulations: The power of Cholesky Decomposition

Portfolio risk modelling is a critical task of advice practices, and one in which ignoring a crucial ingredient – the integrity of asset-class correlations...