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

Technology

Share
Print

Sharper advice, stronger portfolios: Python-powered fund monitoring

Sharper advice, stronger portfolios: Python-powered fund monitoring
Share
Print

In today's dynamic financial landscape, effective portfolio management is essential for investors seeking to optimise returns while managing risk. Harnessing the power of Python, a versatile programming language, can give advisers a real edge in monitoring how well funds are working for their clients.

Why timely monitoring matters

In the current investment landscape, clients demand agility, transparency and and evidence-based decision-making from their financial advisers. Gone are the days when quarterly performance reports sufficed. Markets are faster-moving, portfolios are more complex, and advisers must stay ahead of shifting dynamics to maintain client confidence. Timely monitoring of fund performance is not just a reporting exercise; it underpins proactive client conversations, ensures risks are quickly identified and supports better portfolio construction decisions.

Traditionally, monitoring involved manually updating spreadsheets, downloading performance data and calculating risk and return metrics by hand. While effective, this process is time-consuming and prone to error. For advisers competing in a crowded market, speed and accuracy can be the difference between being seen as a trusted strategist or as merely reactive. This is where technology, and specifically Python, enters the picture.

Python as a strategic tool for monitoring funds/stocks

Python, once the preserve of data scientists, has become an increasingly accessible tool for investment professionals. Its ability to process large datasets, run complex statistical models and generate professional visuals in seconds makes it ideal for financial advisers looking to enhance efficiency.

To illustrate Python’s potential, consider the following example script. It simulates performance data for five sample funds over three years, calculates annualised return and Sharpe Ratio, and presents them graphically:

Step 1: Data input

# Simulate 3-year monthly return for 10 funds/stocks or as many assets as needed.
np.random.seed(202508)
n_funds = 10
months = 36
funds = [f”Fund {i+1}” for i in range(n_funds)]

monthly_returns = {fund: np.random.normal(0.02, 0.05, months) for fund in funds}
df = pd.DataFrame(monthly_returns)

While this demonstration uses random numbers, they can be replaced with real-world data. Importantly, Python can integrate seamlessly with whatever data is available to you. In practice, advisers can:

  • Pull data from APIs provided by research platforms or data vendors.
  • Read Excel and CSV files containing fund performance supplied by clients or platforms.
  • Download historical market data directly from sources such as Yahoo Finance via the yfinance library, as highlighted in the article Python in the AI Era: A sStrategic aAsset in mModern iInvestment mManagement.

This flexibility means that whether an adviser subscribes to a professional data feed or relies on simple spreadsheets, Python can be configured to ingest, process, and present fund data in minutes.

Step 2: Process the data

# ——————- Data Process ——————-
# Assumed Risk-free rate
rf_rate = 0.03

# Annualised returns (%)
annualised_returns = ((1 + df).prod() ** (12 / months) – 1) * 100

# Excess return & Annualised Volatility
excess_returns = (annualised_returns / 100) – rf_rate
volatility = df.std() * np.sqrt(12)

# Calculate Sharpe ratio
sharpe_ratios = excess_returns / volatility

# Sort funds by annualised return (descending)
sorted_funds = annualised_returns.sort_values(ascending=False).index
annualised_returns = annualised_returns.loc[sorted_funds]
sharpe_ratios = sharpe_ratios.loc[sorted_funds]

Once the data is in place, Python calculates key performance metrics. In this script:

  • Annualised return: Converts the monthly data into a compounded three-year return figure, allowing funds to be compared consistently.
  • Sharpe ratio: Measures risk-adjusted performance by comparing return to volatility. A high Sharpe ratio indicates efficient return generation.

Importantly, the script can easily be extended to calculate other risk and performance measures, including:

  • Maximum drawdown
  • Calmar ratio (a risk-adjusted performance measure that assesses the return of an investment relative to its maximum drawdown, a measure of downside risk.)
  • Volatility and downside deviation
  • Tracking error versus benchmarks

This flexibility allows advisers to tailor monitoring to client objectives and risk tolerance.

Step 3: Visualisation

# ——————- Plot ——————-
fig, ax1 = plt.subplots(figsize=(8, 5))

# Bars: annualised returns
bars = ax1.bar(sorted_funds, annualised_returns, color=”#1C5F69″, label=”Annualised Return (%)”)
ax1.set_ylabel(“Annualised 3-Year Return (%)”)
ax1.set_title(“Fund Performance (Annualised Return & Sharpe Ratio)”)

# Secondary y-axis: Sharpe ratios
ax2 = ax1.twinx()
ax2.plot(sorted_funds, sharpe_ratios, “o”, color=”orange”, label=”Sharpe Ratio”)
ax2.set_ylabel(“Sharpe Ratio”)

# Grid and styling
ax1.grid(True, linestyle=”:”, alpha=0.6)
ax1.spines[“top”].set_visible(False)
ax2.spines[“top”].set_visible(False)

# Two legends in top-right
leg1 = ax1.legend(loc=”upper right”, bbox_to_anchor=(1, 1))
leg2 = ax2.legend(loc=”upper right”, bbox_to_anchor=(1, 0.9))
ax1.add_artist(leg1)

plt.show()

Output:

The output is a chart combining both absolute and risk-adjusted returns. Annualised returns are presented as bars, ranked from strongest to weakest, while Sharpe ratios are plotted as points on a secondary axis. This perspective highlights the trade-off: funds showing high returns, but weak Sharpe ratios, may be relying on excessive volatility, whereas those with steadier returns and stronger Sharpe ratios signal more consistent efficiency.

The ranking and chart are produced within seconds, providing a professional and easily interpretable view of fund performance.

Implications for advisers

The illustrative script shows how quickly Python can generate performance insights, but its true value lies in customisation. This article demonstrates only return rankings and Sharpe ratios, but the same framework can easily be expanded to include other metrics. Each adviser’s clients have different objectives, and models should be adapted to reflect those priorities. For instance, income-focused clients may benefit from monitoring downside protection, while growth-oriented clients may require analysis of risk-adjusted returns and factor exposures.

Equally important is how results are communicated. Outputs should be designed so advisers gain the depth they need, while clients receive information in a form that is clear and accessible. Simple visual cues, such as charts or traffic-light indicators, can translate complex metrics into insights that resonate with clients.

By tailoring both the calculations and the presentation, advisers can create a monitoring framework that is rigorous, efficient and client-friendly – reinforcing their role as trusted interpreters of performance and risk.

Share
Print

Automation as a capacity strategy, not a tech strategy

The real advantage of automation lies not in adding more tools, but in deliberately redesigning workflows to protect adviser time and redirect it toward...

Data first: starting with the fundamentals the key to your technology stack

The most expensive mistake in advice right now isn’t buying the wrong technology. It’s feeding good technology bad data.

The six-trillion-dollar misunderstanding: Why lawyers can’t run a data business

Modern wealth creation is a data business: signal, probability, optimisation at scale. Our regulators need a mindset shift if they are going to adapt to the...

OpenInvest, Partnervest and Franklin Templeton implement three-way win platform deal

The flexibility of OpenInvest's open architecture was key to an innovative three-way deal the platform provider has signed with Franklin Templeton and...