Add your promotional text...

Complete Portfolio Visualizer Guide: How to Backtest and Optimize Your Canadian ETF Portfolio in 2025

Master Portfolio Visualizer with this complete guide for Canadian investors. Learn to backtest ETF portfolios, analyze risk-adjusted returns, and optimize asset allocation using real data and screenshots.

Biljana Jonoska Stojkova

7/27/202512 min read

image of portfolio construction with data
image of portfolio construction with data

Introduction

Making portfolio decisions based on gut feeling rather than historical data analysis is like driving blindfolded on a highway!

When I first discovered Portfolio Visualizer, I thought it was just another fancy financial calculator. As a statistician myself, I love Portfolio Visualizer because it comes with implemented sophisticated statistical methodologies for portfolio construction. This free tool became the cornerstone of my investment analysis, helping me build a portfolio that delivered 12.89% annual returns with a 0.89 Sharpe ratio. But here's the thing—most Canadian investors either don't know about Portfolio Visualizer or use only 10% of its capabilities.

This isn't your typical "click here, then click there" tutorial. I'm going to walk you through my exact process for backtesting Canadian ETF portfolios, comparing multiple allocation strategies, and extracting the data that actually matters for long-term wealth building. By the end of this guide, you'll know how to analyze any portfolio combination and make data-driven decisions that could save you thousands in fees and potentially add decades to your retirement timeline.

Setting Up Portfolio Visualizer for Canadian ETF Analysis

Getting started with Portfolio Visualizer feels overwhelming at first—trust me, I stared at that interface for like 20 minutes trying to figure out where to even begin. The secret is understanding that this tool was primarily built for US investors, so us Canadians need to be a bit creative with our approach.

First things first, head over to https://www.portfoliovisualizer.com/ and click on "Analysis", then click on the Portfolio Construction on the left panel and find the Backtest Portfolio analysis. Don't get distracted by all the other fancy tools just yet - we're starting with the basics. Under the hood, this tool is powerful.

Here's where this tool makes it harder for Canadian investors. Portfolio Visualizer's database is heavily weighted toward US-listed securities, so you'll need to think strategically about how to represent your Canadian holdings.

Now here's a pro tip I learned the hard way: always check the correlation between your Canadian ETF and the US proxy you're using. I spent hours analyzing a portfolio only to realize later that my proxy wasn't actually representative of what I'd be buying. Go to your ETF provider's website and compare the top holdings and geographic allocations—they should be very similar.

The date range selection is crucial too. I typically run my analysis from January 2010 to present day, which gives us data through the 2008 financial crisis recovery, the European debt crisis, COVID crash, and recent market volatility. Anything shorter than 10 years doesn't give you enough market cycle coverage to make meaningful decisions.

How Backtesting Works

Backtesting is like having a time machine for your investment strategy—it shows you exactly how your portfolio would have performed if you'd implemented it during past market conditions. Here's how it works: you input your desired asset allocation (like my 49% HXS, 23% XEF portfolio), select a historical time period (I typically use 2010-2025, but not all the ETFs I ant to test has data for all those years), and the software calculates what your returns, volatility, and drawdowns would have been using actual market data from that period. The beauty of backtesting is that it includes real market crashes, bull runs, and everything in between, giving you a realistic picture of how your strategy handles different economic environments. While backtesting can't predict future performance (past results don't guarantee future outcomes), it's invaluable for understanding how different allocation strategies compare in terms of risk-adjusted returns, maximum drawdowns, and recovery times. Think of it as stress-testing your portfolio against 15+ years of actual market history rather than just hoping your investment plan will work when the next market crisis hits.

Creating Your Portfolio Allocation Matrix

This is where the real magic happens, and honestly, where I probably spent way too many late nights tweaking percentages and obsessing over decimal points. But hey, that's what separates serious investors from people who just throw money at whatever their bank advisor recommends!

Portfolio Visualizer allows you to test up to three different portfolios simultaneously, which is perfect for comparing your current allocation against alternatives. I always set up my tests as follows: Portfolio 1 is my proposed allocation, the benchmark (like VFINX), and Portfolio 2 is usually some variation I'm curious about.

For my optimal allocation, I input: 49% HXS (S&P 500 Index), 23% XEF representing international developed markets excluding North America, 16% ZCN (represents the total Canadian stock market and only holds Canadian company shares, yes, I know this isn't perfect, but Canadian market correlation with US total market VTI is pretty high), 10% ZSB represents short-term Canadian bonds, a mix of both government and corporate bonds, and 2% XEC representing emerging markets.

Once you have defined your portfolio with it’s allocation and your benchmark, you click “Analyze Portfolios”. The output is very rich. We will look into most important aspects of our analyzed portfolio.

Here's something that tripped me up initially: the rebalancing frequency setting. I typically set this to "Annual" because that's realistic for most DIY investors. Monthly rebalancing looks great in backtests but isn't practical when you're dealing with commission fees and the hassle of constant portfolio management.

The benchmark selection is super important too. I always compare against "S&P 500 Total Return" because it's the most common benchmark, but I also run separate comparisons against more appropriate Canadian benchmarks. This helps me understand whether my portfolio optimization is actually adding value or if I'm just taking on unnecessary complexity.

One mistake I got caught up in was trying to perfectly replicate the exact ETF allocation. Remember, we're looking for directional insights here, not precise predictions. If your backtest shows that adding 10% bonds improves risk-adjusted returns, that insight holds true whether you use SHY as a proxy or end up buying ZSB in real life.

Analyzing Risk-Adjusted Returns and Performance Metrics

Okay, this is where things get really interesting, and where most investors completely miss the boat. Everyone looks at the total return number and thinks they're done. Wrong! Total return without context is like knowing your car's top speed but not knowing its fuel efficiency or safety rating.

The first thing I always examine is the Sharpe ratio, which measures return per unit of risk. My optimized portfolio showed a Sharpe ratio of 0.89, compared to 0.67 for a simple 60/40 portfolio. That might not sound like a huge difference, but over 20+ years, better risk-adjusted returns compound into massive wealth differences.

But here's where I really nerd out: the Sortino ratio. While Sharpe ratio treats all volatility as bad, Sortino ratio only penalizes downside volatility. My portfolio's Sortino ratio of 1.42 tells me I'm getting excellent compensation for the actual risk that matters - the risk of losing money.

The maximum drawdown metric is probably the most important for real-world investing psychology. My portfolio's maximum drawdown of -15.95%means that in the worst-case scenario historically, I would have lost about 16% of my portfolio value from peak to trough. That's not pleasant, but it's manageable and recovered relatively quickly.

Here's something most people don't pay attention to: the recovery time from drawdowns. Portfolio Visualizer shows you not just how much your portfolio fell during market crashes, but how long it took to get back to breakeven. My allocation typically recovered from major drawdowns within 12-19 months, compared to 24-36 months for more conservative allocations that had lower returns.

The rolling returns analysis is another goldmine of insights. Instead of just looking at the full period return, this shows you what your returns would have been for every possible 10-year period within your analysis timeframe. It's a great way to understand the consistency of your strategy across different market environments.

Stress Testing Different Market Scenarios

This section literally changed how I think about portfolio construction. I used to focus entirely on average returns, but stress testing taught me that it's the extreme scenarios that either make or break your long-term wealth building success.

Portfolio Visualizer's Monte Carlo simulation feature is like having a crystal ball that shows you thousands of possible future outcomes. I typically run 10,000 simulations to see the range of potential results for my portfolio over a 30-year period. This simulation showed that my allocation had a 95% probability that the portfolio will deliver 8.95%+ annual returns, with a median expectation of 11.29%. The risk-adjusted metrics (Sharpe/Sortino ratios) remain strong across all scenarios, indicating that portfolio is well-optimized for long-term wealth building. Most Likely Outcome (50th percentile):

  • The portfolio grows at 11.29% annually

  • $100,000 becomes $12.4M over the simulation period

  • Maximum loss during worst period: 23.80%

  • The portfolio could sustain safe withdrawals of 9.10% annually

The rolling returns show my portfolio's worst 1-year period was -10.16%, compared to -18.23% for the S&P 500, demonstrating better downside protection during market stress. However, to verify specific crisis performance like the COVID crash, I'd need to analyze the monthly returns or run a targeted backtest for that exact period. The diversified approach of this portfolio sacrifices some upside potential for much more reliable, consistent performance. This is ideal for long-term wealth building where predictability matters more than chasing maximum returns.

Comparing Asset Allocation Strategies

Here's where I really went down the rabbit hole, and probably where I learned the most about how different allocation strategies actually perform in real market conditions. I tested everything from simple 60/40 portfolios to complex factor-tilted allocations, and the results completely changed my perspective on "optimal" asset allocation.

The first comparison I always run is my optimized allocation versus simple benchmark portfolios. I compared my 47% US, 23% international, 15% Canadian, 10% bonds, 2% emerging markets allocation against a 100% stock but geographically diversified portfolio. So Portfolio 2 has no bonds in it, 57% US, 23% international, 16% Canadian, 0% bonds, 2% emerging markets.

What blew my mind was how much the bond allocation mattered for risk-adjusted returns. The 100% stock portfolio had higher absolute returns (14.26% vs my 12.89%), and the Sharpe ratio was similar (0.91 vs my 0.89). Similar Sortino indicate minimal difference in downside-adjusted returns. Even the drawdown recovery periods were similar between the two portfolios. However, my portfolio offered better downside protection -15.95% vs -17.19% (1.24% better downside protection). This analysis validates the "free lunch" of diversification, where the 10% bond allocation reduces risk almost as much as it reduces returns, resulting in nearly identical risk-adjusted performance while providing valuable stability during market downturns. This is exactly why sophisticated investors include bonds despite lower absolute returns, it's about optimizing the risk-return trade-off, not just maximizing returns.

The rolling returns analysis showed that during this particular time period, the S&P 500 actually delivered higher returns with similar (or slightly lower) variability compared to my diversified allocation. However, this 15-year period was exceptionally favorable for US markets, and historical diversification benefits may not show up in this specific timeframe. My diversified approach still provides valuable protection against future periods when US markets might underperform international markets.

Note: The Foreign Withholding tax (FWT) drag is calculated only on dividend yields, so FWT drag = Dividend Yield * FWT Rate.

Extracting Actionable Data for Portfolio Optimization

After running dozens of different scenarios and spending way too many hours staring at performance charts, the real challenge became distilling all this data into actionable investment decisions. This is where most people get paralysis by analysis, analyzing all these trade offs need to be weighted carefully with respect to our objectives. Let’s see how can we figure out what to actually do with these great insight from the analysis.

The key insight from all my Portfolio Visualizer analysis was that small improvements in cost efficiency and tax optimization compound into massive differences over time. Even reducing total portfolio costs from 0.2155% to 0.175% (a tiny cost difference of just 0.0405% annually) resulted in an extra $4915.527 in portfolio value over 25 years assuming $100,000 initial investment.

If you are interested in the details of the calculations see this.

Here is the formula for approximating the portfolio growth from initial value of $100000 over 25 years, assuming 7% returns over this period. Portfolio value after 25 years = (100000 * (1+ return rate)^25)

Returns over 25 years for XEQT = 7%-0.2155% = 6.7845%, return rate is 0.067845.

Portfolio value after 25 years with XEQT = $516066.3

Returns over 25 years for my portfolio = 7%-0.175% = 6.825%, return rate is 0.06825.

My portfolio value after 25 years: $520981.8

Returns over 25 years for mutual funds portfolio with 1.5% cost portfolio: 7%-1.5% = 5.5%, return rate is 0.055.

Portfolio value in mutual funds after 25 years is $381339.2.

But the data also taught me not to over-optimize. I initially tested allocations with 15+ different ETFs, thinking more diversification was always better. The analysis showed that beyond 5-6 asset classes, additional complexity didn't improve risk-adjusted returns meaningfully. Sometimes simple really is better.

The rebalancing frequency analysis was particularly valuable. I tested monthly, quarterly, and annual rebalancing and found that annual rebalancing captured about 85% of the benefit of monthly rebalancing with far less complexity and transaction costs. For DIY investors using discount brokers, this finding alone probably saves hundreds of dollars per year in unnecessary trading.

One of the most important insights was understanding when the backtest data might not be representative of future performance. The period I analyzed (2019-2025) was generally favorable for stocks, with declining interest rates and strong economic growth. I made sure to stress test my allocation against different economic scenarios and interest rate environments to ensure it would still be reasonable in different market conditions.

The Portfolio Visualizer analysis also highlighted the importance of staying disciplined during market volatility. The data clearly showed that my allocation's worst performance periods were relatively short-lived, but only if I maintained the allocation through the volatility. This reinforced the psychological aspect of investing, having a plan based on solid data makes it much easier to stick with your strategy when markets get scary.

Conclusion

Portfolio Visualizer transformed my approach to investment analysis from gut-feeling decisions to data-driven optimization. The difference between a mediocre portfolio and an optimized one isn't just about returns, it's about building the confidence to stick with your strategy through inevitable market volatility.

The key takeaway isn't that you should copy my exact allocation or analysis process, but that you should base your investment decisions on historical data rather than marketing materials or generic advice. Every investor's situation is unique, and Portfolio Visualizer gives you the tools to test what actually works for your specific goals and risk tolerance within your chosen investment horizon.

Remember, backtesting isn't about predicting the future, it's about understanding how different strategies have performed across various market environments and making informed decisions based on that evidence. Use these insights as a starting point, but always consider your own financial situation, risk tolerance, and investment timeline.

Ready to dive into your own Portfolio Visualizer analysis? Start with a simple comparison between your current allocation and a benchmark, then gradually add complexity as you become more comfortable with the tool.

Disclaimer

This article is for educational and informational purposes only and does not constitute financial, investment, or tax advice. The content shared represents my personal investment journey and analysis, not recommendations for your specific financial situation.

Important considerations:

  • Past performance does not guarantee future results. Investment returns and portfolio performance can vary significantly based on market conditions, timing, and individual circumstances.

  • Every investor's situation is unique. Your risk tolerance, time horizon, tax situation, and financial goals may require a completely different investment approach than what I've described.

  • Tax rules are complex and change frequently. Foreign withholding tax rates, MER calculations, and RRSP regulations may differ from what's presented here or may have changed since publication.

  • Do your own research. Verify all cost calculations, tax implications, and ETF details independently before making investment decisions.

  • Consider professional advice. For personalized investment guidance, consult with a qualified financial advisor, tax professional, or investment counselor who understands your complete financial picture.

I am not a licensed financial advisor, tax professional, or investment counselor. This content reflects my personal research and decision-making process, shared for educational purposes to help other DIY investors understand the analytical approach behind portfolio optimization.

Please invest responsibly and never invest more than you can afford to lose.

Image Reference: Screenshot of Portfolio Visualizer main interface with "Backtest Portfolio" highlig
Image Reference: Screenshot of Portfolio Visualizer main interface with "Backtest Portfolio" highlig
Portfolio allocation input screen showing the main page. We will use the Analysis tools in this tuto
Portfolio allocation input screen showing the main page. We will use the Analysis tools in this tuto
Portfolio allocation output screen showing the percentage breakdown across differe
Portfolio allocation output screen showing the percentage breakdown across differe
[Image Reference: Performance statistics table showing Sharpe ratios, Sortino ratios, and other key
[Image Reference: Performance statistics table showing Sharpe ratios, Sortino ratios, and other key
Graph of drawdowns over time for my portfolio and the benchmark portfolio.
Graph of drawdowns over time for my portfolio and the benchmark portfolio.
Table with drawdowns over time for the benchmark. The benchmark needed two years to recover, about 5
Table with drawdowns over time for the benchmark. The benchmark needed two years to recover, about 5
Drawdown recovery times for my portfolio]
Drawdown recovery times for my portfolio]
Monte Carlo simulation analysis results showing the probability distribution of portfolio outcomes
Monte Carlo simulation analysis results showing the probability distribution of portfolio outcomes
Rolling returns from back testing analysis
Rolling returns from back testing analysis
Side-by-side comparison of two portfolios and the benchmark showing returns, volatility, and Sharpe
Side-by-side comparison of two portfolios and the benchmark showing returns, volatility, and Sharpe
Portfolio 2 composition
Portfolio 2 composition

[Image Reference: Side-by-side comparison of two portfolios and the benchmark showing returns, volatility, and Sharpe ratios for different allocation strategies]

[Image Reference: Portfolio 2 composition

[Image Reference: Monte Carlo simulation analysis results showing the probability distribution of portfolio outcomes]

[Image Reference: Rolling returns from back testing analysis

[Image Reference: Table with drawdowns over time for the benchmark. The benchmark needed two years to recover, about 5 longer than my portfolio]

[Image Reference: Drawdown recovery times for my portfolio]

[Image Reference: [Image Reference: Graph of drawdowns over time for my portfolio and the benchmark portfolio. My portfolio, represented by the blue lines exhibited a bit faster recovery]]

[Image Reference: Performance statistics table showing Sharpe ratios, Sortino ratios, and other key metrics for different portfolio allocations]]

[Image Reference: Portfolio allocation output screen showing the percentage breakdown across different asset classes]

[Image Reference: Screenshot of Portfolio Visualizer main interface with "Backtest Portfolio" highlighted]

[Image Reference: [Image Reference: Portfolio allocation input screen showing the percentage breakdown across different asset classes]

[Image Reference: Portfolio allocation input screen showing the main page. We will use the Analysis tools in this tutorial]