CRAN Package Check Results for Package dispositionEffect

Last updated on 2026-08-03 09:50:20 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.0.1 4.49 135.40 139.89 OK
r-devel-linux-x86_64-debian-gcc 1.0.1 3.07 98.83 101.90 NOTE
r-devel-linux-x86_64-fedora-clang 1.0.1 220.80 OK
r-devel-linux-x86_64-fedora-gcc 1.0.1 98.51 OK
r-devel-windows-x86_64 1.0.1 7.00 149.00 156.00 OK
r-patched-linux-x86_64 1.0.1 4.18 128.04 132.22 OK
r-release-linux-x86_64 1.0.1 3.90 127.86 131.76 OK
r-release-macos-arm64 1.0.1 1.00 38.00 39.00 ERROR
r-release-macos-x86_64 1.0.1 3.00 184.00 187.00 ERROR
r-release-windows-x86_64 1.0.1 7.00 147.00 154.00 OK
r-oldrel-macos-arm64 1.0.1 ERROR
r-oldrel-macos-x86_64 1.0.1 3.00 133.00 136.00 ERROR
r-oldrel-windows-x86_64 1.0.1 10.00 174.00 184.00 OK

Check Details

Version: 1.0.1
Check: for new files in some other directories
Result: NOTE Found the following files/directories: ‘~/tmp/scratch/Rtmp03RDKM’ ‘~/tmp/scratch/Rtmp0lPJnK’ ‘~/tmp/scratch/Rtmp1q1Sje’ ‘~/tmp/scratch/Rtmp2kBh4J’ ‘~/tmp/scratch/Rtmp35LCM8’ ‘~/tmp/scratch/Rtmp3qtcvf’ ‘~/tmp/scratch/Rtmp4uEisK’ ‘~/tmp/scratch/Rtmp5D2DFw’ ‘~/tmp/scratch/Rtmp5RkxPf’ ‘~/tmp/scratch/Rtmp5ThtPg’ ‘~/tmp/scratch/Rtmp5YgtGQ’ ‘~/tmp/scratch/Rtmp6Me2dm’ ‘~/tmp/scratch/Rtmp6aPG5E’ ‘~/tmp/scratch/Rtmp6oQg5S’ ‘~/tmp/scratch/Rtmp6upcKj’ ‘~/tmp/scratch/Rtmp7BUYKO’ ‘~/tmp/scratch/Rtmp7JVM7N’ ‘~/tmp/scratch/Rtmp7KvxmH’ ‘~/tmp/scratch/Rtmp8oU7IZ’ ‘~/tmp/scratch/Rtmp9fo8E3’ ‘~/tmp/scratch/Rtmp9nnzBL’ ‘~/tmp/scratch/RtmpA8tWqb’ ‘~/tmp/scratch/RtmpAtBoAp’ ‘~/tmp/scratch/RtmpCjPqdV’ ‘~/tmp/scratch/RtmpCjSVBC’ ‘~/tmp/scratch/RtmpDc6Cwe’ ‘~/tmp/scratch/RtmpDjEV89’ ‘~/tmp/scratch/RtmpE0MErN’ ‘~/tmp/scratch/RtmpEQpCs4’ ‘~/tmp/scratch/RtmpEZtn1N’ ‘~/tmp/scratch/RtmpEmonkA’ ‘~/tmp/scratch/RtmpErT9fM’ ‘~/tmp/scratch/RtmpF1EeK7’ ‘~/tmp/scratch/RtmpFdfSzj’ ‘~/tmp/scratch/RtmpG0kEMC’ ‘~/tmp/scratch/RtmpGMI0dG’ ‘~/tmp/scratch/RtmpGP554I’ ‘~/tmp/scratch/RtmpGnm9EH’ ‘~/tmp/scratch/RtmpGt4BBO’ ‘~/tmp/scratch/RtmpHoDGEY’ ‘~/tmp/scratch/RtmpICH6Kq’ ‘~/tmp/scratch/RtmpJ3doSU’ ‘~/tmp/scratch/RtmpKkOWc7’ ‘~/tmp/scratch/RtmpKqZGxO’ ‘~/tmp/scratch/RtmpLINfL1’ ‘~/tmp/scratch/RtmpLhZtZ4’ ‘~/tmp/scratch/RtmpLxqi8r’ ‘~/tmp/scratch/RtmpNKpYbL’ ‘~/tmp/scratch/RtmpNaMtYF’ ‘~/tmp/scratch/RtmpPMfRiJ’ ‘~/tmp/scratch/RtmpQQPCFf’ ‘~/tmp/scratch/RtmpQnFWh0’ ‘~/tmp/scratch/RtmpRFN5et’ ‘~/tmp/scratch/RtmpRIMQ7M’ ‘~/tmp/scratch/RtmpRgtBJj’ ‘~/tmp/scratch/RtmpRmWMXe’ ‘~/tmp/scratch/RtmpSr7FiZ’ ‘~/tmp/scratch/RtmpT31XK3’ ‘~/tmp/scratch/RtmpTQkjtd’ ‘~/tmp/scratch/RtmpTlEYFo’ ‘~/tmp/scratch/RtmpTxpM7Z’ ‘~/tmp/scratch/RtmpUGDew5’ ‘~/tmp/scratch/RtmpUV6EXj’ ‘~/tmp/scratch/RtmpUVizjD’ ‘~/tmp/scratch/RtmpUVwGpd’ ‘~/tmp/scratch/RtmpUnaCZ0’ ‘~/tmp/scratch/RtmpUy1IL6’ ‘~/tmp/scratch/RtmpUywhpc’ ‘~/tmp/scratch/RtmpV3gyP4’ ‘~/tmp/scratch/RtmpVDIvZq’ ‘~/tmp/scratch/RtmpVFMYO6’ ‘~/tmp/scratch/RtmpVZZsRQ’ ‘~/tmp/scratch/RtmpWhorv0’ ‘~/tmp/scratch/RtmpXBDoPF’ ‘~/tmp/scratch/RtmpXqgRkj’ ‘~/tmp/scratch/RtmpY1sarc’ ‘~/tmp/scratch/RtmpYcBxGf’ ‘~/tmp/scratch/RtmpYwEe9W’ ‘~/tmp/scratch/RtmpZ7aEfu’ ‘~/tmp/scratch/RtmpZC7i7g’ ‘~/tmp/scratch/RtmpZV1Uu8’ ‘~/tmp/scratch/RtmpaRLy21’ ‘~/tmp/scratch/Rtmpaae9m0’ ‘~/tmp/scratch/RtmpapnIrO’ ‘~/tmp/scratch/RtmparHOhX’ ‘~/tmp/scratch/RtmpbKF25S’ ‘~/tmp/scratch/RtmpbN93Dl’ ‘~/tmp/scratch/RtmpbTNwnQ’ ‘~/tmp/scratch/RtmpcMuvnH’ ‘~/tmp/scratch/RtmpcbR3F4’ ‘~/tmp/scratch/RtmpcedOR0’ ‘~/tmp/scratch/Rtmpcuzrin’ ‘~/tmp/scratch/RtmpdKIruf’ ‘~/tmp/scratch/RtmpdOvYvB’ ‘~/tmp/scratch/RtmpddTPjp’ ‘~/tmp/scratch/RtmpdsTb0a’ ‘~/tmp/scratch/Rtmpdu59wO’ ‘~/tmp/scratch/RtmpepRFgH’ ‘~/tmp/scratch/Rtmpf3Aadh’ ‘~/tmp/scratch/RtmpfJmleP’ ‘~/tmp/scratch/RtmpfYoVKf’ ‘~/tmp/scratch/RtmpgEeYG8’ ‘~/tmp/scratch/RtmpgrcxH7’ ‘~/tmp/scratch/RtmphVwNeo’ ‘~/tmp/scratch/RtmpiIRiWL’ ‘~/tmp/scratch/Rtmpig0MdM’ ‘~/tmp/scratch/Rtmpj3yuAL’ ‘~/tmp/scratch/RtmpjIA7V9’ ‘~/tmp/scratch/RtmpjURUcC’ ‘~/tmp/scratch/Rtmpk0RQZY’ ‘~/tmp/scratch/Rtmpk2dqkx’ ‘~/tmp/scratch/Rtmpl7E6e7’ ‘~/tmp/scratch/RtmpljhYGo’ ‘~/tmp/scratch/RtmpmJ51ip’ ‘~/tmp/scratch/RtmpmLaNBL’ ‘~/tmp/scratch/RtmpmVOLoF’ ‘~/tmp/scratch/RtmpmstK0B’ ‘~/tmp/scratch/RtmpnJwD8D’ ‘~/tmp/scratch/RtmpndsMyY’ ‘~/tmp/scratch/RtmpohDjhO’ ‘~/tmp/scratch/Rtmpoo62kZ’ ‘~/tmp/scratch/RtmpozXO1Q’ ‘~/tmp/scratch/Rtmpq42Pht’ ‘~/tmp/scratch/RtmpqQ3Yov’ ‘~/tmp/scratch/RtmpqY6xiD’ ‘~/tmp/scratch/Rtmpqg2um4’ ‘~/tmp/scratch/RtmpqvYdbz’ ‘~/tmp/scratch/Rtmpr2lgTD’ ‘~/tmp/scratch/RtmprFDSWw’ ‘~/tmp/scratch/RtmprbsrML’ ‘~/tmp/scratch/RtmprtE0hH’ ‘~/tmp/scratch/RtmpsIRbyd’ ‘~/tmp/scratch/RtmpshZrsR’ ‘~/tmp/scratch/RtmpsvWGEQ’ ‘~/tmp/scratch/Rtmpt3Xr7s’ ‘~/tmp/scratch/RtmptYP7SU’ ‘~/tmp/scratch/RtmptlxFyc’ ‘~/tmp/scratch/RtmptyZPDG’ ‘~/tmp/scratch/RtmpvkEiuk’ ‘~/tmp/scratch/RtmpwCqspK’ ‘~/tmp/scratch/RtmpwPaABC’ ‘~/tmp/scratch/RtmpweMyMh’ ‘~/tmp/scratch/RtmpwtuVlJ’ ‘~/tmp/scratch/Rtmpx9IHTG’ ‘~/tmp/scratch/RtmpxYAo6Z’ ‘~/tmp/scratch/RtmpxmgyDz’ ‘~/tmp/scratch/RtmpzBqKqc’ ‘~/tmp/scratch/RtmpzOVjA0’ ‘~/tmp/scratch/RtmpzbLlR4’ ‘~/tmp/scratch/Rtmpzh2Mv1’ ‘~/tmp/scratch/RtmpzmT5ot’ ‘~/tmp/scratch/RtmpzxMVfY’ ‘~/tmp/scratch/xvfb-run.22f9j5’ ‘~/tmp/scratch/xvfb-run.2RZXPy’ ‘~/tmp/scratch/xvfb-run.3l9zdp’ ‘~/tmp/scratch/xvfb-run.5VGCWz’ ‘~/tmp/scratch/xvfb-run.6BFZ1m’ ‘~/tmp/scratch/xvfb-run.6v2ipW’ ‘~/tmp/scratch/xvfb-run.7IfHDP’ ‘~/tmp/scratch/xvfb-run.7QmX4n’ ‘~/tmp/scratch/xvfb-run.98wIRA’ ‘~/tmp/scratch/xvfb-run.9OjiTn’ ‘~/tmp/scratch/xvfb-run.CL775v’ ‘~/tmp/scratch/xvfb-run.EVaKYn’ ‘~/tmp/scratch/xvfb-run.GU9tMO’ ‘~/tmp/scratch/xvfb-run.Go2r29’ ‘~/tmp/scratch/xvfb-run.HIVXEr’ ‘~/tmp/scratch/xvfb-run.HOtKzj’ ‘~/tmp/scratch/xvfb-run.JR2siv’ ‘~/tmp/scratch/xvfb-run.Jp282k’ ‘~/tmp/scratch/xvfb-run.KvFb9W’ ‘~/tmp/scratch/xvfb-run.MQN2rd’ ‘~/tmp/scratch/xvfb-run.NkOgoB’ ‘~/tmp/scratch/xvfb-run.O6Mldq’ ‘~/tmp/scratch/xvfb-run.OKdwJo’ ‘~/tmp/scratch/xvfb-run.PSaDoc’ ‘~/tmp/scratch/xvfb-run.QQPkP0’ ‘~/tmp/scratch/xvfb-run.QmstQQ’ ‘~/tmp/scratch/xvfb-run.R2dyYO’ ‘~/tmp/scratch/xvfb-run.RCMfaD’ ‘~/tmp/scratch/xvfb-run.Rrj7ax’ ‘~/tmp/scratch/xvfb-run.SjSJDP’ ‘~/tmp/scratch/xvfb-run.UCZarl’ ‘~/tmp/scratch/xvfb-run.UXw87a’ ‘~/tmp/scratch/xvfb-run.Wo5RQk’ ‘~/tmp/scratch/xvfb-run.XIyYWy’ ‘~/tmp/scratch/xvfb-run.XYS8RN’ ‘~/tmp/scratch/xvfb-run.Y57u9j’ ‘~/tmp/scratch/xvfb-run.YcHYCd’ ‘~/tmp/scratch/xvfb-run.aC5KFU’ ‘~/tmp/scratch/xvfb-run.akP0Jr’ ‘~/tmp/scratch/xvfb-run.bRprfm’ ‘~/tmp/scratch/xvfb-run.blTEDc’ ‘~/tmp/scratch/xvfb-run.c89b2M’ ‘~/tmp/scratch/xvfb-run.ejogB6’ ‘~/tmp/scratch/xvfb-run.fLDNe7’ ‘~/tmp/scratch/xvfb-run.hDRJES’ ‘~/tmp/scratch/xvfb-run.hSxxA6’ ‘~/tmp/scratch/xvfb-run.iNlavK’ ‘~/tmp/scratch/xvfb-run.j8XyB8’ ‘~/tmp/scratch/xvfb-run.jR6hmS’ ‘~/tmp/scratch/xvfb-run.jTAKBY’ ‘~/tmp/scratch/xvfb-run.kaU4LS’ ‘~/tmp/scratch/xvfb-run.kjPryh’ ‘~/tmp/scratch/xvfb-run.lEqdUj’ ‘~/tmp/scratch/xvfb-run.mTzLmL’ ‘~/tmp/scratch/xvfb-run.om8tpn’ ‘~/tmp/scratch/xvfb-run.on69kN’ ‘~/tmp/scratch/xvfb-run.qETooc’ ‘~/tmp/scratch/xvfb-run.rA7cJj’ ‘~/tmp/scratch/xvfb-run.rphGfC’ ‘~/tmp/scratch/xvfb-run.slNMA4’ ‘~/tmp/scratch/xvfb-run.svJUYB’ ‘~/tmp/scratch/xvfb-run.tapzNr’ ‘~/tmp/scratch/xvfb-run.ukzlYx’ ‘~/tmp/scratch/xvfb-run.vDTOsd’ ‘~/tmp/scratch/xvfb-run.vpCHpl’ ‘~/tmp/scratch/xvfb-run.x6mtOl’ ‘~/tmp/scratch/xvfb-run.y5ZKkd’ ‘~/tmp/scratch/xvfb-run.z315KR’ ‘~/tmp/scratch/xvfb-run.zJhN6g’ ‘/dev/shm/sm_segment.gimli1.1001.136c0000.0’ ‘/dev/shm/sm_segment.gimli1.1001.35f10000.0’ ‘/dev/shm/sm_segment.gimli1.1001.37d0000.0’ ‘/dev/shm/sm_segment.gimli1.1001.43920000.0’ ‘/dev/shm/sm_segment.gimli1.1001.49410000.0’ ‘/dev/shm/sm_segment.gimli1.1001.4b880000.0’ ‘/dev/shm/sm_segment.gimli1.1001.63690000.0’ ‘/dev/shm/sm_segment.gimli1.1001.6f660000.0’ ‘/dev/shm/sm_segment.gimli1.1001.851d0000.0’ ‘/dev/shm/sm_segment.gimli1.1001.970f0000.0’ ‘/dev/shm/sm_segment.gimli1.1001.9eda0000.0’ ‘/dev/shm/sm_segment.gimli1.1001.a4ad0000.0’ ‘/dev/shm/sm_segment.gimli1.1001.a90f0000.0’ ‘/dev/shm/sm_segment.gimli1.1001.be3c0000.0’ ‘/dev/shm/sm_segment.gimli1.1001.be80000.0’ ‘/dev/shm/sm_segment.gimli1.1001.cb690000.0’ ‘/dev/shm/sm_segment.gimli1.1001.dff20000.0’ ‘/dev/shm/sm_segment.gimli1.1001.e9c20000.0’ ‘~/.cache/pocl/uncached/tempfile_3jjvPX’ ‘~/.cache/pocl/uncached/tempfile_3pLrps’ ‘~/.cache/pocl/uncached/tempfile_7uiRMB’ ‘~/.cache/pocl/uncached/tempfile_8d7FvS’ ‘~/.cache/pocl/uncached/tempfile_ACVFLy’ ‘~/.cache/pocl/uncached/tempfile_BaRa3c’ ‘~/.cache/pocl/uncached/tempfile_LAIdK5’ ‘~/.cache/pocl/uncached/tempfile_MXgGSL’ ‘~/.cache/pocl/uncached/tempfile_RcBrDN’ ‘~/.cache/pocl/uncached/tempfile_aftIm4’ ‘~/.cache/pocl/uncached/tempfile_albSzK’ ‘~/.cache/pocl/uncached/tempfile_bSAfQS’ ‘~/.cache/pocl/uncached/tempfile_iFUzab’ ‘~/.cache/pocl/uncached/tempfile_p8HL9h’ ‘~/.cache/pocl/uncached/tempfile_pD9NKW’ ‘~/.cache/pocl/uncached/tempfile_q9h7CE’ ‘~/.cache/pocl/uncached/tempfile_tZ1ukU’ ‘~/.cache/pocl/uncached/tempfile_tmI9vM’ Flavor: r-devel-linux-x86_64-debian-gcc

Version: 1.0.1
Check: tests
Result: ERROR Running ‘testthat.R’ [3s/3s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(dispositionEffect) -------------------------------------------- The dispositionEffect is the first R package to perform behavioural analysis on financial data. Use citation('dispositionEffect') to cite the package. Learn more at: https://marcozanotti.github.io/dispositionEffect/index.html -------------------------------------------- > > test_check("dispositionEffect") Saving _problems/test-paper_compute-48.R Saving _problems/test-paper_compute-54.R Saving _problems/test-portfolio_compute-10.R Saving _problems/test-portfolio_compute-11.R Saving _problems/test-realized_compute-81.R Saving _problems/test-realized_compute-93.R Saving _problems/test-realized_duration-23.R Saving _problems/test-realized_duration-26.R Saving _problems/test-realized_duration-29.R Saving _problems/test-realized_duration-32.R Saving _problems/test-realized_duration-35.R Saving _problems/test-realized_duration-38.R Saving _problems/test-realized_duration-44.R Saving _problems/test-realized_duration-47.R Saving _problems/test-realized_duration-50.R Saving _problems/test-realized_duration-53.R Saving _problems/test-realized_duration-56.R Saving _problems/test-realized_duration-59.R Saving _problems/test-realized_duration-66.R Saving _problems/test-realized_duration-69.R Saving _problems/test-realized_duration-72.R Saving _problems/test-realized_duration-75.R Saving _problems/test-realized_duration-78.R Saving _problems/test-realized_duration-81.R Saving _problems/test-realized_duration-114.R Saving _problems/test-realized_duration-117.R Saving _problems/test-realized_duration-120.R Saving _problems/test-realized_duration-123.R Saving _problems/test-realized_duration-133.R Saving _problems/test-realized_duration-136.R Saving _problems/test-realized_duration-139.R Saving _problems/test-realized_duration-142.R Saving _problems/test-realized_duration-153.R Saving _problems/test-realized_duration-156.R Saving _problems/test-realized_duration-159.R Saving _problems/test-realized_duration-162.R [ FAIL 36 | WARN 0 | SKIP 0 | PASS 331 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-paper_compute.R:46:2'): paper_compute works (method = duration) ── Expected `paper_compute(...)` to equal `res[, c(1, 14:17)]`. Differences: Component "PG_duration": Mean relative difference: 0.06666667 Component "PL_duration": Mean relative difference: 0.06666667 ── Failure ('test-paper_compute.R:52:2'): paper_compute works (method = all) ─── Expected `paper_compute(...)` to equal `res`. Differences: Component "PG_duration": Mean relative difference: 0.06666667 Component "PL_duration": Mean relative difference: 0.06666667 ── Failure ('test-portfolio_compute.R:10:2'): portfolio_compute works (arg method) ── Expected `portfolio_compute(investor, marketprices, method = "duration")` to equal `portfolio_results[, c(1:5, 18:21)]`. Differences: Component "RG_duration": Mean relative difference: 0.007344991 Component "RL_duration": Mean relative difference: 0.04026507 Component "PG_duration": Mean relative difference: 0.07414429 ── Failure ('test-portfolio_compute.R:11:2'): portfolio_compute works (arg method) ── Expected `portfolio_compute(investor, marketprices, method = "all")` to equal `portfolio_results`. Differences: Component "RG_duration": Mean relative difference: 0.007344991 Component "RL_duration": Mean relative difference: 0.04026507 Component "PG_duration": Mean relative difference: 0.07414429 ── Failure ('test-realized_compute.R:73:2'): realized_compute works (method = duration) ── Expected `dplyr::bind_rows(...)` to equal `res[, c(1, 14:17)]`. Differences: Component "RG_duration": Mean relative difference: 0.03448276 Component "RL_duration": Mean relative difference: 0.03448276 Component "PG_duration": Mean relative difference: 0.06666667 Component "PL_duration": Mean relative difference: 0.06666667 ── Failure ('test-realized_compute.R:85:2'): realized_compute works (method = all) ── Expected `dplyr::bind_rows(...)` to equal `res`. Differences: Component "RG_duration": Mean relative difference: 0.03448276 Component "RL_duration": Mean relative difference: 0.03448276 Component "PG_duration": Mean relative difference: 0.06666667 Component "PL_duration": Mean relative difference: 0.06666667 ── Failure ('test-realized_duration.R:22:2'): realized_duration works (long) ─── Expected `realized_duration(2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff)`. Differences: 1/4 mismatches [4] 15 - 14 == 1 ── Failure ('test-realized_duration.R:25:2'): realized_duration works (long) ─── Expected `realized_duration(2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0)`. Differences: 1/4 mismatches [3] 15 - 14 == 1 ── Failure ('test-realized_duration.R:28:2'): realized_duration works (long) ─── Expected `realized_duration(2, 15, -1, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`. Differences: 2/4 mismatches (average diff: 1) [2] 29 - 28 == 1 [4] 15 - 14 == 1 ── Failure ('test-realized_duration.R:31:2'): realized_duration works (long) ─── Expected `realized_duration(2, 10, -1, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`. Differences: 2/4 mismatches (average diff: 1) [1] 29 - 28 == 1 [3] 15 - 14 == 1 ── Failure ('test-realized_duration.R:34:2'): realized_duration works (long) ─── Expected `realized_duration(2, 15, -2, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`. Differences: 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:37:2'): realized_duration works (long) ─── Expected `realized_duration(2, 10, -2, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`. Differences: 1/4 mismatches [1] 29 - 28 == 1 ── Failure ('test-realized_duration.R:43:2'): realized_duration works (short) ── Expected `realized_duration(...)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0)`. Differences: 1/4 mismatches [3] 15 - 14 == 1 ── Failure ('test-realized_duration.R:46:2'): realized_duration works (short) ── Expected `realized_duration(...)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff)`. Differences: 1/4 mismatches [4] 15 - 14 == 1 ── Failure ('test-realized_duration.R:49:2'): realized_duration works (short) ── Expected `realized_duration(-2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`. Differences: 2/4 mismatches (average diff: 1) [1] 29 - 28 == 1 [3] 15 - 14 == 1 ── Failure ('test-realized_duration.R:52:2'): realized_duration works (short) ── Expected `realized_duration(-2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`. Differences: 2/4 mismatches (average diff: 1) [2] 29 - 28 == 1 [4] 15 - 14 == 1 ── Failure ('test-realized_duration.R:55:2'): realized_duration works (short) ── Expected `realized_duration(-2, 15, 2, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`. Differences: 1/4 mismatches [1] 29 - 28 == 1 ── Failure ('test-realized_duration.R:58:2'): realized_duration works (short) ── Expected `realized_duration(-2, 10, 2, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`. Differences: 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:65:2'): realized_duration works (allow_short = FALSE) ── Expected `realized_duration(2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff)`. Differences: 1/4 mismatches [4] 15 - 14 == 1 ── Failure ('test-realized_duration.R:68:2'): realized_duration works (allow_short = FALSE) ── Expected `realized_duration(2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0)`. Differences: 1/4 mismatches [3] 15 - 14 == 1 ── Failure ('test-realized_duration.R:71:2'): realized_duration works (allow_short = FALSE) ── Expected `realized_duration(2, 15, -1, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(...)`. Differences: 2/4 mismatches (average diff: 1) [2] 29 - 28 == 1 [4] 15 - 14 == 1 ── Failure ('test-realized_duration.R:74:2'): realized_duration works (allow_short = FALSE) ── Expected `realized_duration(2, 10, -1, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(...)`. Differences: 2/4 mismatches (average diff: 1) [1] 29 - 28 == 1 [3] 15 - 14 == 1 ── Failure ('test-realized_duration.R:77:2'): realized_duration works (allow_short = FALSE) ── Expected `realized_duration(2, 15, -2, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(...)`. Differences: 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:80:2'): realized_duration works (allow_short = FALSE) ── Expected `realized_duration(2, 10, -2, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(...)`. Differences: 1/4 mismatches [1] 29 - 28 == 1 ── Failure ('test-realized_duration.R:113:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:116:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [1] 29 - 28 == 1 ── Failure ('test-realized_duration.R:119:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:122:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [1] 29 - 28 == 1 ── Failure ('test-realized_duration.R:132:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [1] 29 - 28 == 1 ── Failure ('test-realized_duration.R:135:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:138:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [1] 29 - 28 == 1 ── Failure ('test-realized_duration.R:141:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:152:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:155:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [1] 29 - 28 == 1 ── Failure ('test-realized_duration.R:158:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:161:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [1] 29 - 28 == 1 [ FAIL 36 | WARN 0 | SKIP 0 | PASS 331 ] Error: ! Test failures. Execution halted Flavor: r-release-macos-arm64

Version: 1.0.1
Check: tests
Result: ERROR Running ‘testthat.R’ [9s/15s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(dispositionEffect) -------------------------------------------- The dispositionEffect is the first R package to perform behavioural analysis on financial data. Use citation('dispositionEffect') to cite the package. Learn more at: https://marcozanotti.github.io/dispositionEffect/index.html -------------------------------------------- > > test_check("dispositionEffect") Saving _problems/test-paper_compute-48.R Saving _problems/test-paper_compute-54.R Saving _problems/test-portfolio_compute-10.R Saving _problems/test-portfolio_compute-11.R Saving _problems/test-realized_compute-81.R Saving _problems/test-realized_compute-93.R Saving _problems/test-realized_duration-23.R Saving _problems/test-realized_duration-26.R Saving _problems/test-realized_duration-29.R Saving _problems/test-realized_duration-32.R Saving _problems/test-realized_duration-35.R Saving _problems/test-realized_duration-38.R Saving _problems/test-realized_duration-44.R Saving _problems/test-realized_duration-47.R Saving _problems/test-realized_duration-50.R Saving _problems/test-realized_duration-53.R Saving _problems/test-realized_duration-56.R Saving _problems/test-realized_duration-59.R Saving _problems/test-realized_duration-66.R Saving _problems/test-realized_duration-69.R Saving _problems/test-realized_duration-72.R Saving _problems/test-realized_duration-75.R Saving _problems/test-realized_duration-78.R Saving _problems/test-realized_duration-81.R Saving _problems/test-realized_duration-114.R Saving _problems/test-realized_duration-117.R Saving _problems/test-realized_duration-120.R Saving _problems/test-realized_duration-123.R Saving _problems/test-realized_duration-133.R Saving _problems/test-realized_duration-136.R Saving _problems/test-realized_duration-139.R Saving _problems/test-realized_duration-142.R Saving _problems/test-realized_duration-153.R Saving _problems/test-realized_duration-156.R Saving _problems/test-realized_duration-159.R Saving _problems/test-realized_duration-162.R [ FAIL 36 | WARN 0 | SKIP 0 | PASS 331 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-paper_compute.R:46:2'): paper_compute works (method = duration) ── Expected `paper_compute(...)` to equal `res[, c(1, 14:17)]`. Differences: Component "PG_duration": Mean relative difference: 0.1764706 Component "PL_duration": Mean relative difference: 0.1764706 ── Failure ('test-paper_compute.R:52:2'): paper_compute works (method = all) ─── Expected `paper_compute(...)` to equal `res`. Differences: Component "PG_duration": Mean relative difference: 0.1764706 Component "PL_duration": Mean relative difference: 0.1764706 ── Failure ('test-portfolio_compute.R:10:2'): portfolio_compute works (arg method) ── Expected `portfolio_compute(investor, marketprices, method = "duration")` to equal `portfolio_results[, c(1:5, 18:21)]`. Differences: Component "PG_duration": Mean relative difference: 0.01597873 ── Failure ('test-portfolio_compute.R:11:2'): portfolio_compute works (arg method) ── Expected `portfolio_compute(investor, marketprices, method = "all")` to equal `portfolio_results`. Differences: Component "PG_duration": Mean relative difference: 0.01597873 ── Failure ('test-realized_compute.R:73:2'): realized_compute works (method = duration) ── Expected `dplyr::bind_rows(...)` to equal `res[, c(1, 14:17)]`. Differences: Component "RG_duration": Mean relative difference: 0.09677419 Component "RL_duration": Mean relative difference: 0.09677419 Component "PG_duration": Mean relative difference: 0.1764706 Component "PL_duration": Mean relative difference: 0.1764706 ── Failure ('test-realized_compute.R:85:2'): realized_compute works (method = all) ── Expected `dplyr::bind_rows(...)` to equal `res`. Differences: Component "RG_duration": Mean relative difference: 0.09677419 Component "RL_duration": Mean relative difference: 0.09677419 Component "PG_duration": Mean relative difference: 0.1764706 Component "PL_duration": Mean relative difference: 0.1764706 ── Failure ('test-realized_duration.R:22:2'): realized_duration works (long) ─── Expected `realized_duration(2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff)`. Differences: 1/4 mismatches [4] 17 - 14 == 3 ── Failure ('test-realized_duration.R:25:2'): realized_duration works (long) ─── Expected `realized_duration(2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0)`. Differences: 1/4 mismatches [3] 17 - 14 == 3 ── Failure ('test-realized_duration.R:28:2'): realized_duration works (long) ─── Expected `realized_duration(2, 15, -1, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`. Differences: 2/4 mismatches (average diff: 3) [2] 31 - 28 == 3 [4] 17 - 14 == 3 ── Failure ('test-realized_duration.R:31:2'): realized_duration works (long) ─── Expected `realized_duration(2, 10, -1, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`. Differences: 2/4 mismatches (average diff: 3) [1] 31 - 28 == 3 [3] 17 - 14 == 3 ── Failure ('test-realized_duration.R:34:2'): realized_duration works (long) ─── Expected `realized_duration(2, 15, -2, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`. Differences: 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:37:2'): realized_duration works (long) ─── Expected `realized_duration(2, 10, -2, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`. Differences: 1/4 mismatches [1] 31 - 28 == 3 ── Failure ('test-realized_duration.R:43:2'): realized_duration works (short) ── Expected `realized_duration(...)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0)`. Differences: 1/4 mismatches [3] 17 - 14 == 3 ── Failure ('test-realized_duration.R:46:2'): realized_duration works (short) ── Expected `realized_duration(...)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff)`. Differences: 1/4 mismatches [4] 17 - 14 == 3 ── Failure ('test-realized_duration.R:49:2'): realized_duration works (short) ── Expected `realized_duration(-2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`. Differences: 2/4 mismatches (average diff: 3) [1] 31 - 28 == 3 [3] 17 - 14 == 3 ── Failure ('test-realized_duration.R:52:2'): realized_duration works (short) ── Expected `realized_duration(-2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`. Differences: 2/4 mismatches (average diff: 3) [2] 31 - 28 == 3 [4] 17 - 14 == 3 ── Failure ('test-realized_duration.R:55:2'): realized_duration works (short) ── Expected `realized_duration(-2, 15, 2, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`. Differences: 1/4 mismatches [1] 31 - 28 == 3 ── Failure ('test-realized_duration.R:58:2'): realized_duration works (short) ── Expected `realized_duration(-2, 10, 2, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE)` to equal `c(...)`. Differences: 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:65:2'): realized_duration works (allow_short = FALSE) ── Expected `realized_duration(2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff)`. Differences: 1/4 mismatches [4] 17 - 14 == 3 ── Failure ('test-realized_duration.R:68:2'): realized_duration works (allow_short = FALSE) ── Expected `realized_duration(2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0)`. Differences: 1/4 mismatches [3] 17 - 14 == 3 ── Failure ('test-realized_duration.R:71:2'): realized_duration works (allow_short = FALSE) ── Expected `realized_duration(2, 15, -1, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(...)`. Differences: 2/4 mismatches (average diff: 3) [2] 31 - 28 == 3 [4] 17 - 14 == 3 ── Failure ('test-realized_duration.R:74:2'): realized_duration works (allow_short = FALSE) ── Expected `realized_duration(2, 10, -1, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(...)`. Differences: 2/4 mismatches (average diff: 3) [1] 31 - 28 == 3 [3] 17 - 14 == 3 ── Failure ('test-realized_duration.R:77:2'): realized_duration works (allow_short = FALSE) ── Expected `realized_duration(2, 15, -2, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(...)`. Differences: 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:80:2'): realized_duration works (allow_short = FALSE) ── Expected `realized_duration(2, 10, -2, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE)` to equal `c(...)`. Differences: 1/4 mismatches [1] 31 - 28 == 3 ── Failure ('test-realized_duration.R:113:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:116:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [1] 31 - 28 == 3 ── Failure ('test-realized_duration.R:119:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:122:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [1] 31 - 28 == 3 ── Failure ('test-realized_duration.R:132:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [1] 31 - 28 == 3 ── Failure ('test-realized_duration.R:135:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:138:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [1] 31 - 28 == 3 ── Failure ('test-realized_duration.R:141:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:152:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:155:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [1] 31 - 28 == 3 ── Failure ('test-realized_duration.R:158:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:161:2'): realized_duration works (realized_only = TRUE) ── Expected `realized_duration(...)` to equal `c(...)`. Differences: 1/4 mismatches [1] 31 - 28 == 3 [ FAIL 36 | WARN 0 | SKIP 0 | PASS 331 ] Error: ! Test failures. Execution halted Flavor: r-release-macos-x86_64

Version: 1.0.1
Check: tests
Result: ERROR Running ‘testthat.R’ [4s/4s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(dispositionEffect) -------------------------------------------- The dispositionEffect is the first R package to perform behavioural analysis on financial data. Use citation('dispositionEffect') to cite the package. Learn more at: https://marcozanotti.github.io/dispositionEffect/index.html -------------------------------------------- > > test_check("dispositionEffect") [ FAIL 36 | WARN 0 | SKIP 0 | PASS 331 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-paper_compute.R:46:2'): paper_compute works (method = duration) ── paper_compute(...) not equal to res[, c(1, 14:17)]. Component "PG_duration": Mean relative difference: 0.06666667 Component "PL_duration": Mean relative difference: 0.06666667 ── Failure ('test-paper_compute.R:52:2'): paper_compute works (method = all) ─── paper_compute(...) not equal to `res`. Component "PG_duration": Mean relative difference: 0.06666667 Component "PL_duration": Mean relative difference: 0.06666667 ── Failure ('test-portfolio_compute.R:10:2'): portfolio_compute works (arg method) ── portfolio_compute(investor, marketprices, method = "duration") not equal to portfolio_results[, c(1:5, 18:21)]. Component "RG_duration": Mean relative difference: 0.007344991 Component "RL_duration": Mean relative difference: 0.04026507 Component "PG_duration": Mean relative difference: 0.07414429 ── Failure ('test-portfolio_compute.R:11:2'): portfolio_compute works (arg method) ── portfolio_compute(investor, marketprices, method = "all") not equal to `portfolio_results`. Component "RG_duration": Mean relative difference: 0.007344991 Component "RL_duration": Mean relative difference: 0.04026507 Component "PG_duration": Mean relative difference: 0.07414429 ── Failure ('test-realized_compute.R:73:2'): realized_compute works (method = duration) ── dplyr::bind_rows(...) not equal to res[, c(1, 14:17)]. Component "RG_duration": Mean relative difference: 0.03448276 Component "RL_duration": Mean relative difference: 0.03448276 Component "PG_duration": Mean relative difference: 0.06666667 Component "PL_duration": Mean relative difference: 0.06666667 ── Failure ('test-realized_compute.R:85:2'): realized_compute works (method = all) ── dplyr::bind_rows(...) not equal to `res`. Component "RG_duration": Mean relative difference: 0.03448276 Component "RL_duration": Mean relative difference: 0.03448276 Component "PG_duration": Mean relative difference: 0.06666667 Component "PL_duration": Mean relative difference: 0.06666667 ── Failure ('test-realized_duration.R:22:2'): realized_duration works (long) ─── realized_duration(2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff). 1/4 mismatches [4] 15 - 14 == 1 ── Failure ('test-realized_duration.R:25:2'): realized_duration works (long) ─── realized_duration(2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0). 1/4 mismatches [3] 15 - 14 == 1 ── Failure ('test-realized_duration.R:28:2'): realized_duration works (long) ─── realized_duration(2, 15, -1, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...). 2/4 mismatches (average diff: 1) [2] 29 - 28 == 1 [4] 15 - 14 == 1 ── Failure ('test-realized_duration.R:31:2'): realized_duration works (long) ─── realized_duration(2, 10, -1, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...). 2/4 mismatches (average diff: 1) [1] 29 - 28 == 1 [3] 15 - 14 == 1 ── Failure ('test-realized_duration.R:34:2'): realized_duration works (long) ─── realized_duration(2, 15, -2, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...). 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:37:2'): realized_duration works (long) ─── realized_duration(2, 10, -2, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...). 1/4 mismatches [1] 29 - 28 == 1 ── Failure ('test-realized_duration.R:43:2'): realized_duration works (short) ── realized_duration(...) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0). 1/4 mismatches [3] 15 - 14 == 1 ── Failure ('test-realized_duration.R:46:2'): realized_duration works (short) ── realized_duration(...) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff). 1/4 mismatches [4] 15 - 14 == 1 ── Failure ('test-realized_duration.R:49:2'): realized_duration works (short) ── realized_duration(-2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...). 2/4 mismatches (average diff: 1) [1] 29 - 28 == 1 [3] 15 - 14 == 1 ── Failure ('test-realized_duration.R:52:2'): realized_duration works (short) ── realized_duration(-2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...). 2/4 mismatches (average diff: 1) [2] 29 - 28 == 1 [4] 15 - 14 == 1 ── Failure ('test-realized_duration.R:55:2'): realized_duration works (short) ── realized_duration(-2, 15, 2, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...). 1/4 mismatches [1] 29 - 28 == 1 ── Failure ('test-realized_duration.R:58:2'): realized_duration works (short) ── realized_duration(-2, 10, 2, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...). 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:65:2'): realized_duration works (allow_short = FALSE) ── realized_duration(2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff). 1/4 mismatches [4] 15 - 14 == 1 ── Failure ('test-realized_duration.R:68:2'): realized_duration works (allow_short = FALSE) ── realized_duration(2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0). 1/4 mismatches [3] 15 - 14 == 1 ── Failure ('test-realized_duration.R:71:2'): realized_duration works (allow_short = FALSE) ── realized_duration(2, 15, -1, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(...). 2/4 mismatches (average diff: 1) [2] 29 - 28 == 1 [4] 15 - 14 == 1 ── Failure ('test-realized_duration.R:74:2'): realized_duration works (allow_short = FALSE) ── realized_duration(2, 10, -1, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(...). 2/4 mismatches (average diff: 1) [1] 29 - 28 == 1 [3] 15 - 14 == 1 ── Failure ('test-realized_duration.R:77:2'): realized_duration works (allow_short = FALSE) ── realized_duration(2, 15, -2, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(...). 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:80:2'): realized_duration works (allow_short = FALSE) ── realized_duration(2, 10, -2, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(...). 1/4 mismatches [1] 29 - 28 == 1 ── Failure ('test-realized_duration.R:113:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:116:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [1] 29 - 28 == 1 ── Failure ('test-realized_duration.R:119:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:122:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [1] 29 - 28 == 1 ── Failure ('test-realized_duration.R:132:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [1] 29 - 28 == 1 ── Failure ('test-realized_duration.R:135:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:138:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [1] 29 - 28 == 1 ── Failure ('test-realized_duration.R:141:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:152:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:155:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [1] 29 - 28 == 1 ── Failure ('test-realized_duration.R:158:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [2] 29 - 28 == 1 ── Failure ('test-realized_duration.R:161:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [1] 29 - 28 == 1 [ FAIL 36 | WARN 0 | SKIP 0 | PASS 331 ] Error: Test failures Execution halted Flavor: r-oldrel-macos-arm64

Version: 1.0.1
Check: tests
Result: ERROR Running ‘testthat.R’ [7s/10s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(dispositionEffect) -------------------------------------------- The dispositionEffect is the first R package to perform behavioural analysis on financial data. Use citation('dispositionEffect') to cite the package. Learn more at: https://marcozanotti.github.io/dispositionEffect/index.html -------------------------------------------- > > test_check("dispositionEffect") [ FAIL 36 | WARN 0 | SKIP 0 | PASS 331 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-paper_compute.R:46:2'): paper_compute works (method = duration) ── paper_compute(...) not equal to res[, c(1, 14:17)]. Component "PG_duration": Mean relative difference: 0.1764706 Component "PL_duration": Mean relative difference: 0.1764706 ── Failure ('test-paper_compute.R:52:2'): paper_compute works (method = all) ─── paper_compute(...) not equal to `res`. Component "PG_duration": Mean relative difference: 0.1764706 Component "PL_duration": Mean relative difference: 0.1764706 ── Failure ('test-portfolio_compute.R:10:2'): portfolio_compute works (arg method) ── portfolio_compute(investor, marketprices, method = "duration") not equal to portfolio_results[, c(1:5, 18:21)]. Component "PG_duration": Mean relative difference: 0.01597873 ── Failure ('test-portfolio_compute.R:11:2'): portfolio_compute works (arg method) ── portfolio_compute(investor, marketprices, method = "all") not equal to `portfolio_results`. Component "PG_duration": Mean relative difference: 0.01597873 ── Failure ('test-realized_compute.R:73:2'): realized_compute works (method = duration) ── dplyr::bind_rows(...) not equal to res[, c(1, 14:17)]. Component "RG_duration": Mean relative difference: 0.09677419 Component "RL_duration": Mean relative difference: 0.09677419 Component "PG_duration": Mean relative difference: 0.1764706 Component "PL_duration": Mean relative difference: 0.1764706 ── Failure ('test-realized_compute.R:85:2'): realized_compute works (method = all) ── dplyr::bind_rows(...) not equal to `res`. Component "RG_duration": Mean relative difference: 0.09677419 Component "RL_duration": Mean relative difference: 0.09677419 Component "PG_duration": Mean relative difference: 0.1764706 Component "PL_duration": Mean relative difference: 0.1764706 ── Failure ('test-realized_duration.R:22:2'): realized_duration works (long) ─── realized_duration(2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff). 1/4 mismatches [4] 17 - 14 == 3 ── Failure ('test-realized_duration.R:25:2'): realized_duration works (long) ─── realized_duration(2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0). 1/4 mismatches [3] 17 - 14 == 3 ── Failure ('test-realized_duration.R:28:2'): realized_duration works (long) ─── realized_duration(2, 15, -1, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...). 2/4 mismatches (average diff: 3) [2] 31 - 28 == 3 [4] 17 - 14 == 3 ── Failure ('test-realized_duration.R:31:2'): realized_duration works (long) ─── realized_duration(2, 10, -1, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...). 2/4 mismatches (average diff: 3) [1] 31 - 28 == 3 [3] 17 - 14 == 3 ── Failure ('test-realized_duration.R:34:2'): realized_duration works (long) ─── realized_duration(2, 15, -2, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...). 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:37:2'): realized_duration works (long) ─── realized_duration(2, 10, -2, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...). 1/4 mismatches [1] 31 - 28 == 3 ── Failure ('test-realized_duration.R:43:2'): realized_duration works (short) ── realized_duration(...) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0). 1/4 mismatches [3] 17 - 14 == 3 ── Failure ('test-realized_duration.R:46:2'): realized_duration works (short) ── realized_duration(...) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff). 1/4 mismatches [4] 17 - 14 == 3 ── Failure ('test-realized_duration.R:49:2'): realized_duration works (short) ── realized_duration(-2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...). 2/4 mismatches (average diff: 3) [1] 31 - 28 == 3 [3] 17 - 14 == 3 ── Failure ('test-realized_duration.R:52:2'): realized_duration works (short) ── realized_duration(-2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...). 2/4 mismatches (average diff: 3) [2] 31 - 28 == 3 [4] 17 - 14 == 3 ── Failure ('test-realized_duration.R:55:2'): realized_duration works (short) ── realized_duration(-2, 15, 2, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...). 1/4 mismatches [1] 31 - 28 == 3 ── Failure ('test-realized_duration.R:58:2'): realized_duration works (short) ── realized_duration(-2, 10, 2, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = TRUE) not equal to c(...). 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:65:2'): realized_duration works (allow_short = FALSE) ── realized_duration(2, 15, 1, 10, "B", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = 0, PL_duration = dtt_diff). 1/4 mismatches [4] 17 - 14 == 3 ── Failure ('test-realized_duration.R:68:2'): realized_duration works (allow_short = FALSE) ── realized_duration(2, 10, 1, 15, "B", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(RG_duration = 0, RL_duration = 0, PG_duration = dtt_diff, PL_duration = 0). 1/4 mismatches [3] 17 - 14 == 3 ── Failure ('test-realized_duration.R:71:2'): realized_duration works (allow_short = FALSE) ── realized_duration(2, 15, -1, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(...). 2/4 mismatches (average diff: 3) [2] 31 - 28 == 3 [4] 17 - 14 == 3 ── Failure ('test-realized_duration.R:74:2'): realized_duration works (allow_short = FALSE) ── realized_duration(2, 10, -1, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(...). 2/4 mismatches (average diff: 3) [1] 31 - 28 == 3 [3] 17 - 14 == 3 ── Failure ('test-realized_duration.R:77:2'): realized_duration works (allow_short = FALSE) ── realized_duration(2, 15, -2, 10, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(...). 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:80:2'): realized_duration works (allow_short = FALSE) ── realized_duration(2, 10, -2, 15, "S", pt_dtt, p_dtt, t_dtt, allow_short = FALSE) not equal to c(...). 1/4 mismatches [1] 31 - 28 == 3 ── Failure ('test-realized_duration.R:113:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:116:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [1] 31 - 28 == 3 ── Failure ('test-realized_duration.R:119:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:122:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [1] 31 - 28 == 3 ── Failure ('test-realized_duration.R:132:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [1] 31 - 28 == 3 ── Failure ('test-realized_duration.R:135:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:138:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [1] 31 - 28 == 3 ── Failure ('test-realized_duration.R:141:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:152:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:155:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [1] 31 - 28 == 3 ── Failure ('test-realized_duration.R:158:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [2] 31 - 28 == 3 ── Failure ('test-realized_duration.R:161:2'): realized_duration works (realized_only = TRUE) ── realized_duration(...) not equal to c(...). 1/4 mismatches [1] 31 - 28 == 3 [ FAIL 36 | WARN 0 | SKIP 0 | PASS 331 ] Error: Test failures Execution halted Flavor: r-oldrel-macos-x86_64