PortfolioTesteR
Test Investment Strategies with English-Like Code
v0.1.4
·
Nov 1, 2025
·
MIT + file LICENSE
Description
Design, backtest, and analyze portfolio strategies using simple, English-like function chains. Includes technical indicators, flexible stock selection, portfolio construction methods (equal weighting, signal weighting, inverse volatility, hierarchical risk parity), and a compact backtesting engine for portfolio returns, drawdowns, and summary metrics.
Downloads
CRAN
192
Last 30 days
22480th
597
Last 90 days
2.2K
Last year
Trend: +43.3% (30d vs prior 30d)
r2u
CRAN
7
Last 30 days
19
Last 90 days
81
Last year
Trend: -41.7% (30d vs prior 30d)
CRAN Check Status
13
OK
Show all 13 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | OK |
| r-devel-linux-x86_64-debian-gcc | OK |
| r-devel-linux-x86_64-fedora-clang | OK |
| r-devel-linux-x86_64-fedora-gcc | OK |
| r-devel-windows-x86_64 | OK |
| r-oldrel-macos-arm64 | OK |
| r-oldrel-macos-x86_64 | OK |
| r-oldrel-windows-x86_64 | OK |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check History
OK 12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 25, 2026
ERROR 11 OK · 0 NOTE · 0 WARNING · 3 ERROR · 0 FAILURE Mar 10, 2026
ERROR
r-oldrel-macos-arm64
tests
Running ‘testthat.R’ [1s/1s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> if (requireNamespace("testthat", quietly = TRUE)) {
+ library(testthat)
+ library(PortfolioTesteR)
+ test_check("PortfolioTesteR")
+ } els
...[truncated]...
...) at test-ml-helpers.R:92:3
2. └─PortfolioTesteR::roll_fit_predict(...)
3. └─PortfolioTesteR:::.roll_align_common(c(features_list, list(label)))
[ FAIL 1 | WARN 0 | SKIP 3 | PASS 55 ]
Error:
! Test failures.
Execution halted
ERROR
r-oldrel-macos-x86_64
tests
Running ‘testthat.R’ [4s/9s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> if (requireNamespace("testthat", quietly = TRUE)) {
+ library(testthat)
+ library(PortfolioTesteR)
+ test_check("PortfolioTesteR")
+ } els
...[truncated]...
...) at test-ml-helpers.R:92:3
2. └─PortfolioTesteR::roll_fit_predict(...)
3. └─PortfolioTesteR:::.roll_align_common(c(features_list, list(label)))
[ FAIL 1 | WARN 0 | SKIP 3 | PASS 55 ]
Error:
! Test failures.
Execution halted
ERROR
r-oldrel-windows-x86_64
tests
Running 'testthat.R' [8s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> if (requireNamespace("testthat", quietly = TRUE)) {
+ library(testthat)
+ library(PortfolioTesteR)
+ test_check("PortfolioTesteR")
+ } else {
...[truncated]...
...) at test-ml-helpers.R:92:3
2. └─PortfolioTesteR::roll_fit_predict(...)
3. └─PortfolioTesteR:::.roll_align_common(c(features_list, list(label)))
[ FAIL 1 | WARN 0 | SKIP 3 | PASS 55 ]
Error:
! Test failures.
Execution halted