← Back to all sparks
P

portfoliobacktest

INFRA · APIS
Velocity0.0

R package portfoliobacktest by dppalomar — release notes from GitHub.

Four dormant years end with a test fix, not a feature

quantitative-financebacktestingportfolio-optimizationr-packagemaintenance
Current state
portfolioBacktest runs portfolio strategies across multiple datasets and resampled windows, producing performance tables, leaderboards and charts. After a run of substantive releases through 2021 and early 2022 it went quiet for four years. The May 2026 release does one thing: fix unit tests against a breaking change in PerformanceAnalytics::Return.portfolio(), which now returns results for the full input series rather than only from the first weight date.
Where it's heading
The development work is behind it. The 2019 to 2022 releases built the substance — parallel execution, resampling that works beyond stock data and beyond daily bars, transaction-cost-aware designs through w_current, and a switch from compounded to uncompounded returns in the Sharpe and annualized return calculations. Since then the package has moved only when a dependency forced it, and even then only far enough to keep the tests green.
Prediction
Nothing in the entries suggests planned work; the next release is most likely triggered by another dependency change, on the same four-year-gap pattern.

Recent moves

  1. 3mo ago

    Tests fixed for a PerformanceAnalytics breaking change

    Unit tests adjusted for a breaking change in PerformanceAnalytics::Return.portfolio(), which now returns the full input return series rather than starting at the first weight date. Test-side only, and the only release in four years.

    View source ↗
  2. 4y ago

    Sharpe ratio charts and reworked weight outputs

    summaryTable() gains kable output, backtestChartSharpeRatio() is added, backtestBoxPlot() accepts a reference portfolio, and portfolioBacktest() returns w_optimized and w_rebalanced in place of w_designed plus X_lin for debugging. The uniform benchmark is renamed 1/N.

    View source ↗
  3. 4y ago

    Uncompounded return metrics and transaction-cost-aware designs

    Sharpe ratio and annualized return switch from compounded to uncompounded returns, changing every number the package reports for existing backtests. The portfolio function also receives w_current, opening the door to transaction-cost-aware and smart-rebalancing designs.

    View source ↗
  4. 5y ago

    Resampling generalised beyond daily stock data

    Parallel mode is reimplemented on pbapply, stockDataResample() becomes financialDataResample() to handle non-stock data such as crypto, MDP and MSRP join the benchmarks, and non-daily data is supported through a bars_per_year argument.

    View source ↗
  5. 6y ago

    CRAN example fixes and vignette references

    CRAN example fixes and a vignette revision adding references on the dangers of backtesting. The add_performance() function is listed here and again in 0.3.0.

    View source ↗
  6. 6y ago

    Drawdown, cumulative return and stacked bar charts

    Three chart functions arrive — cumulative returns, drawdown and stacked bar — alongside fixes for global variables under parallel execution and for leaderboards where a portfolio fails on every dataset.

    View source ↗