Portfolio research & risk analytics

Yahoo Finance via yfinance · CAD · 03 Jan 2019 to 31 Aug 2026

Open research notebook · Download notebook

4Research portfolios
19,575Validated price records
0Missing prices
10 bpsCost per traded dollar

Portfolio comparison

Growth emphasizes technology. Income emphasizes banks, energy and utilities. Balanced diversifies across these equity sectors. Low volatility uses inverse historical volatility weights. All four remain equity portfolios.

Portfolio Id Cumulative Return Annualized Return Volatility Sharpe Max Drawdown Total Cost Excess Annualized Return
Balanced 279.82% 19.12% 16.29% 0.97 -28.73% $776.61 2.90%
Benchmark 214.75% 16.22% 16.37% 0.82 -37.21% $0.00 0.00%
Growth 549.20% 27.80% 28.60% 0.90 -48.72% $1,856.88 11.57%
Income 212.94% 16.13% 16.06% 0.83 -33.06% $395.51 -0.09%
Low volatility 243.59% 17.57% 15.29% 0.94 -29.71% $573.68 1.34%

Forecast validation

Models predict the next 20 sessions' realized annualized volatility. Selection uses training-period cross-validation only. The last 20% is held out, with a 20-session gap to exclude overlapping training labels. A negative R² means the model is worse than predicting the test mean. Compare RMSE with persistence before concluding that machine learning helps.

portfolio_id model rmse r2 selected_by_cv
Balanced Linear regression 0.0432 -0.088 False
Balanced Ridge 0.0418 -0.020 True
Balanced Lasso 0.0418 -0.020 False
Balanced ElasticNet 0.0421 -0.033 False
Balanced Persistence baseline 0.0498 -0.449 False
Growth Linear regression 0.0999 -0.058 False
Growth Ridge 0.0993 -0.045 True
Growth Lasso 0.0997 -0.054 False
Growth ElasticNet 0.0997 -0.055 False
Growth Persistence baseline 0.1314 -0.830 False
Income Linear regression 0.0358 -0.383 False
Income Ridge 0.0351 -0.332 True
Income Lasso 0.0352 -0.339 False
Income ElasticNet 0.0353 -0.345 False
Income Persistence baseline 0.0312 -0.049 False
Low volatility Linear regression 0.0370 -0.210 False
Low volatility Ridge 0.0360 -0.145 True
Low volatility Lasso 0.0360 -0.143 False
Low volatility ElasticNet 0.0362 -0.153 False
Low volatility Persistence baseline 0.0398 -0.396 False
Methodology and limitations

Adjusted closes approximate reinvested total returns. Position units are synthetic adjusted-price units, not broker share balances. Portfolios begin after a 252-session calibration period and rebalance at the close of each month's first trading session. The benchmark is XIC.TO, a broad Canadian equity ETF held without rebalancing. Returns use previous-close weights and deduct 10 bps on total absolute traded weight. Initial entry costs, taxes and additional market impact are excluded.

Sharpe uses arithmetic mean daily excess return divided by daily standard deviation, annualized with √252. Annualized return uses compound growth. The constant annual risk-free assumption is 3.0%. Income is a sector allocation label: dividend yield and cash distributions are not modeled separately. Today's chosen security universe creates selection and survivorship bias. Low-volatility weights are calibrated once and need not deliver the lowest future risk. Overlapping forecast targets mean test errors are dependent; no statistical significance or trading profitability is claimed.

Forecasts are a separate research experiment and do not drive portfolio allocations. Standardization is fitted separately inside each training fold. Negative volatility predictions are clipped to zero. Financial data and model outputs remain reviewable in the SQL mart and exported CSV files.

Run configuration and provenance
{
  "configuration": {
    "start": "2018-01-01",
    "end": "2026-09-01",
    "benchmark": "XIC.TO",
    "initial_capital": 100000,
    "risk_free_rate": 0.03,
    "transaction_cost_bps": 10,
    "warmup_days": 252,
    "forecast_days": 20,
    "test_fraction": 0.2,
    "seed": 42
  },
  "provenance": {
    "source": "Yahoo Finance via yfinance",
    "retrieved_at": "2026-09-09T05:52:46.940726+00:00",
    "sha256": "b44f2f6710ea5c813e3c598cd6594adab2596f9a5bf8c00f4734f6ccca092bb4",
    "start": "2018-01-01",
    "end_exclusive": "2026-09-01",
    "price_basis": "Dividend/split adjusted close; CAD"
  },
  "validation": {
    "exact_duplicates_removed": 0,
    "missing_prices": 0,
    "price_records": 19575,
    "securities": 9,
    "dates": 2175
  }
}