R Under development (unstable) (2025-12-16 r89184 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > if (requireNamespace("tinytest", quietly = TRUE)) + tinytest.results <- tinytest::test_package("PMwR", + color = interactive(), + verbose = 1) test_.pl_stats.R.............. 11 tests OK 83ms test_NAVseries.R.............. 20 tests OK 29ms test_NAVseries.window.R....... 2 tests OK 4ms test_NAVseries_summary.R...... 5 tests OK 23ms test_PMwR.R................... 0 tests 2ms test_as.journal.R............. 3 tests OK 5ms 'initial.position' specified, but no 'prices0' test_btest.R.................. 52 tests OK 0.1s test_btest_NA.R............... 5 tests OK 11ms test_btest_b.R................ 3 tests OK 12ms test_btest_do-rebalance.R..... 2 tests OK 6ms 'do.signal' is FALSE: strategy will never trade 'initial.position' specified, but no 'prices0' 'do.signal' is FALSE: strategy will never trade 'initial.position' specified, but no 'prices0' 'do.signal' is FALSE: strategy will never trade 'do.signal' is FALSE: strategy will never trade 'initial.position' specified, but no 'prices0' 'do.signal' is FALSE: strategy will never trade 'initial.position' specified, but no 'prices0' 'do.signal' is FALSE: strategy will never trade 'initial.position' specified, but no 'prices0' 'initial.position' specified, but no 'prices0' 'initial.position' specified, but no 'prices0' test_btest_initial.position.R. 11 tests OK 18ms test_btest_journal.R.......... 6 tests OK 17ms test_btest_nullsignal.R....... 2 tests OK 16ms test_btest_position.R......... 40 tests OK 91ms test_btest_prices.R........... 6 tests OK 17ms test_btest_rc.R............... 1 tests OK 4ms test_btest_replications.R..... 1 tests OK 4ms test_btest_tc.R............... 2 tests OK 9ms test_div_adjust.R............. 29 tests OK 14ms test_internal.R............... 0 tests 2ms test_is_valid_ISIN.R.......... 8 tests OK 5ms test_is_valid_SEDOL.R......... 2 tests OK 3ms test_journal.R................ 32 tests OK 16ms test_journal_all.equal.R...... 3 tests OK 4ms test_journal_subset.R......... 12 tests OK 3ms test_journal_summary.R........ 1 tests OK 2ms amount 1 1 2 2 3 3 4 4 5 5 5 transactions test_pl.R..................... 65 tests OK 74ms test_pl_along.timestamp.R..... 2 tests OK 7ms test_pl_empty.R............... 1 tests OK 3ms For A, B: average sell includes 'vprice'. For C: average buy includes 'vprice'. test_pl_print.R............... 1 tests OK 6ms test_pl_volume.R.............. 6 tests OK 7ms test_pl_vprice.R.............. 42 tests OK 25ms test_position.R............... 20 tests OK 24ms test_position_00.R............ 14 tests OK 13ms test_position_account.R....... 0 tests 2ms test_position_data_frame.R.... 0 tests 3ms test_position_named.R......... 49 tests OK 14ms Loading required package: tinytest structure(c(1, 2, 2, 3, 0, 0, 1, 1, 1, 1, 1, 3), dim = 4:3, dimnames = list( c("1", "2", "3", "4"), c("a", "b", "c")), instrument = c("a", "b", "c"), timestamp = 1:4, class = "position") test_position_ops.R........... 39 tests OK 34ms test_pricetable.R............. 22 tests OK 14ms test_quote32.R................ 10 tests OK 53ms test_rc.R..................... 32 tests OK 51ms price current value % target value % order 1 1 0 0 0.0 50 50 25.0 50 2 1 0 0 0.0 50 50 25.0 50 3 1 100 100 50.0 50 50 25.0 -50 4 1 100 100 50.0 50 50 25.0 -50 Notional: 200. Target net amount: 200. Turnover (2-way): 200. price current value % target value % order b 1 10 10 NA 0 0 NA -10 d 1 0 0 NA 5 5 NA 5 Notional: . Target net amount: 5. Turnover (2-way): 15. price current value % target value % order b 1 10 10 NA 0 0 NA -10 Notional: . Target net amount: 10. Turnover (2-way): 10. price current value % target value % order b 1 10 10 NA 0 0 NA -10 Notional: . Target net amount: 0. Turnover (2-way): 10. price current value % target value % order b 1 10 20 NA 0 0 NA -10 Notional: . Target net amount: 10. Turnover (2-way): 20. price current value % target value % order b 1 10 20 NA 0 0 NA -10 Notional: . Target net amount: 0. Turnover (2-way): 20. price current value % target value % order a 1 100 100 71.4 28 28 20.0 -72 b 2 20 40 28.6 0 0 0.0 -20 c 3 0 0 0.0 14 42 30.0 14 Notional: 140. Target net amount: 70. Turnover (2-way): 154. test_rebalance.R.............. 30 tests OK 61ms test_replace_weight.R......... 3 tests OK 3ms test_returns.R................ 44 tests OK 0.2s test_returns_NA.R............. 1922 tests OK 1.5s test_returns_dataframe.R...... 7 tests OK 46ms test_returns_lag.R............ 7 tests OK 7ms test_returns_p_returns_monthly.R 6 tests OK 44ms test_returns_period.R......... 13 tests OK 0.1s test_returns_portfolio.R...... 25 tests OK 10ms test_returns_rebalance.R...... 51 tests OK 36ms test_returns_ym_yq.R.......... 6 tests OK 21ms test_scale1.R................. 21 tests OK 12ms test_split_adjust.R........... 16 tests OK 6ms test_split_trades.R........... 11 tests OK 7ms test_streaks.R................ 0 tests 8ms test_unit_prices.R............ 25 tests OK 42ms test_valuation.R.............. 13 tests OK 9ms Warning messages: 1: In pReturns(x, t, period, complete.first, pad = pad, na.rm = na.rm) : 'ytm' is not yet documented/tested 2: In pReturns(x, t, period, complete.first, pad = pad, na.rm = na.rm) : max. timestamp (2020) does not match current year 3: In returns.default(x = prices, t = t, weights = w, rebalance.when = as.Date("2024-01-09")) : 'rebalance.when' does not match timestamp 4: In returns.default(x = prices, t = t, weights = w, rebalance.when = as.Date("2024-01-09"), : 'rebalance.when' does not match timestamp 5: In returns.default(x = prices, t = t, weights = w, rebalance.when = as.Date("2024-01-09"), : 'rebalance.when' does not match timestamp 6: In pReturns(x, t, period, complete.first, pad = pad, na.rm = na.rm) : max. timestamp (2022) does not match current year > > proc.time() user system elapsed 3.12 0.31 3.42