Last updated on 2026-08-01 13:49:07 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 | 2.70 | 97.97 | 100.67 | 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 | 4.19 | 127.15 | 131.34 | 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 |
Version: 1.0.1
Check: for new files in some other directories
Result: NOTE
Found the following files/directories:
‘~/tmp/scratch/Rtmp09L2jy’ ‘~/tmp/scratch/Rtmp0b4qtW’
‘~/tmp/scratch/Rtmp1qZvko’ ‘~/tmp/scratch/Rtmp27dbBH’
‘~/tmp/scratch/Rtmp2G6Gyb’ ‘~/tmp/scratch/Rtmp2H8QiK’
‘~/tmp/scratch/Rtmp2l7el2’ ‘~/tmp/scratch/Rtmp2nNA5S’
‘~/tmp/scratch/Rtmp3T8M5E’ ‘~/tmp/scratch/Rtmp3aZMub’
‘~/tmp/scratch/Rtmp3j8ktP’ ‘~/tmp/scratch/Rtmp46JHyn’
‘~/tmp/scratch/Rtmp4Is3Qw’ ‘~/tmp/scratch/Rtmp4kXSND’
‘~/tmp/scratch/Rtmp4osaeb’ ‘~/tmp/scratch/Rtmp5OCwYh’
‘~/tmp/scratch/Rtmp5Tm75W’ ‘~/tmp/scratch/Rtmp5siotV’
‘~/tmp/scratch/Rtmp68vgzS’ ‘~/tmp/scratch/Rtmp6NOHeM’
‘~/tmp/scratch/Rtmp6kBGAY’ ‘~/tmp/scratch/Rtmp6mUSLM’
‘~/tmp/scratch/Rtmp6p2Ntf’ ‘~/tmp/scratch/Rtmp72imZF’
‘~/tmp/scratch/Rtmp79OPuI’ ‘~/tmp/scratch/Rtmp7D0yAG’
‘~/tmp/scratch/Rtmp7DRd3r’ ‘~/tmp/scratch/Rtmp7HmxLl’
‘~/tmp/scratch/Rtmp7S0jnT’ ‘~/tmp/scratch/Rtmp7t8H81’
‘~/tmp/scratch/Rtmp96Ab38’ ‘~/tmp/scratch/Rtmp9twU0j’
‘~/tmp/scratch/RtmpATyLI6’ ‘~/tmp/scratch/RtmpAczTaR’
‘~/tmp/scratch/RtmpDFpyO4’ ‘~/tmp/scratch/RtmpE0uqR7’
‘~/tmp/scratch/RtmpE7tKZh’ ‘~/tmp/scratch/RtmpEFLIj7’
‘~/tmp/scratch/RtmpELmFc8’ ‘~/tmp/scratch/RtmpEPKwQB’
‘~/tmp/scratch/RtmpEoraa2’ ‘~/tmp/scratch/RtmpFJskgn’
‘~/tmp/scratch/RtmpFPQRg0’ ‘~/tmp/scratch/RtmpFb6kb5’
‘~/tmp/scratch/RtmpFoCanN’ ‘~/tmp/scratch/RtmpH5SrZq’
‘~/tmp/scratch/RtmpH8aFWi’ ‘~/tmp/scratch/RtmpHKCSr0’
‘~/tmp/scratch/RtmpHnw7cO’ ‘~/tmp/scratch/RtmpI8QMEr’
‘~/tmp/scratch/RtmpJHmOro’ ‘~/tmp/scratch/RtmpJfTawl’
‘~/tmp/scratch/RtmpJpkGU7’ ‘~/tmp/scratch/RtmpKlRMoV’
‘~/tmp/scratch/RtmpLzhTiN’ ‘~/tmp/scratch/RtmpMGktr8’
‘~/tmp/scratch/RtmpMOa0gm’ ‘~/tmp/scratch/RtmpMWY72A’
‘~/tmp/scratch/RtmpMZbKa3’ ‘~/tmp/scratch/RtmpNGaLV6’
‘~/tmp/scratch/RtmpNW22Nk’ ‘~/tmp/scratch/RtmpNsW4Ad’
‘~/tmp/scratch/RtmpOAQi0w’ ‘~/tmp/scratch/RtmpOR81f6’
‘~/tmp/scratch/RtmpOuS3Ba’ ‘~/tmp/scratch/RtmpPw9pBj’
‘~/tmp/scratch/RtmpQNLCpe’ ‘~/tmp/scratch/RtmpQQ7oqB’
‘~/tmp/scratch/RtmpQSmKO5’ ‘~/tmp/scratch/RtmpQTfUd6’
‘~/tmp/scratch/RtmpRsADbm’ ‘~/tmp/scratch/RtmpRvj9PX’
‘~/tmp/scratch/RtmpSgwSLS’ ‘~/tmp/scratch/RtmpT7FpuH’
‘~/tmp/scratch/RtmpTG3lyC’ ‘~/tmp/scratch/RtmpTrsjhX’
‘~/tmp/scratch/RtmpTtbU7B’ ‘~/tmp/scratch/RtmpU7z5P0’
‘~/tmp/scratch/RtmpUAl0g1’ ‘~/tmp/scratch/RtmpUHhu4z’
‘~/tmp/scratch/RtmpUWnrw1’ ‘~/tmp/scratch/RtmpUxxtWs’
‘~/tmp/scratch/RtmpVKmewi’ ‘~/tmp/scratch/RtmpVkFbjH’
‘~/tmp/scratch/RtmpWO9ONm’ ‘~/tmp/scratch/RtmpX1xR5i’
‘~/tmp/scratch/RtmpX9cme8’ ‘~/tmp/scratch/RtmpY38dZG’
‘~/tmp/scratch/RtmpYZgYG5’ ‘~/tmp/scratch/RtmpYmioK2’
‘~/tmp/scratch/RtmpZELlvS’ ‘~/tmp/scratch/RtmpZeEmXU’
‘~/tmp/scratch/RtmpaScE27’ ‘~/tmp/scratch/RtmpaXsSEw’
‘~/tmp/scratch/RtmpbB9LbU’ ‘~/tmp/scratch/RtmpbEEfNr’
‘~/tmp/scratch/Rtmpbr8w6R’ ‘~/tmp/scratch/RtmpbsBs1a’
‘~/tmp/scratch/Rtmpc204mb’ ‘~/tmp/scratch/RtmpcfX6H4’
‘~/tmp/scratch/RtmpdLhFNl’ ‘~/tmp/scratch/RtmpdyWbEd’
‘~/tmp/scratch/RtmpeSF97x’ ‘~/tmp/scratch/RtmpefFooB’
‘~/tmp/scratch/RtmpehfAHV’ ‘~/tmp/scratch/RtmpeyZyfF’
‘~/tmp/scratch/RtmpfXidW7’ ‘~/tmp/scratch/RtmpflrxFd’
‘~/tmp/scratch/RtmpgRiTW3’ ‘~/tmp/scratch/RtmpgSJqcn’
‘~/tmp/scratch/Rtmpge8v3z’ ‘~/tmp/scratch/Rtmpgone98’
‘~/tmp/scratch/RtmpgsrLde’ ‘~/tmp/scratch/RtmphFRgA3’
‘~/tmp/scratch/RtmphcrBIz’ ‘~/tmp/scratch/RtmphjEUsN’
‘~/tmp/scratch/Rtmpi3g56L’ ‘~/tmp/scratch/RtmpikqYAm’
‘~/tmp/scratch/Rtmpj2O6ij’ ‘~/tmp/scratch/RtmpjMWv1Y’
‘~/tmp/scratch/RtmpjRYzuc’ ‘~/tmp/scratch/RtmpjtitIq’
‘~/tmp/scratch/Rtmpk1cZod’ ‘~/tmp/scratch/RtmpkuG2cH’
‘~/tmp/scratch/RtmpleIL2W’ ‘~/tmp/scratch/Rtmpln68nn’
‘~/tmp/scratch/Rtmpm3WGPI’ ‘~/tmp/scratch/RtmpmFLsx4’
‘~/tmp/scratch/RtmpmOOvkY’ ‘~/tmp/scratch/RtmpmOqQTs’
‘~/tmp/scratch/RtmpmmmeJp’ ‘~/tmp/scratch/RtmpmpXZ85’
‘~/tmp/scratch/RtmpnSUNkY’ ‘~/tmp/scratch/Rtmpo0zSN5’
‘~/tmp/scratch/Rtmpo4w1wj’ ‘~/tmp/scratch/Rtmpo5ufhW’
‘~/tmp/scratch/Rtmpo7OffM’ ‘~/tmp/scratch/RtmpoCdgJ5’
‘~/tmp/scratch/RtmpozdrMJ’ ‘~/tmp/scratch/RtmppCAaEa’
‘~/tmp/scratch/RtmpqHJmIW’ ‘~/tmp/scratch/Rtmpr38gqs’
‘~/tmp/scratch/RtmprVXdxo’ ‘~/tmp/scratch/RtmprchK0Z’
‘~/tmp/scratch/Rtmps5TG5w’ ‘~/tmp/scratch/RtmpsbYwbH’
‘~/tmp/scratch/Rtmpt4tCf5’ ‘~/tmp/scratch/Rtmpt7cSoS’
‘~/tmp/scratch/Rtmpth4z5I’ ‘~/tmp/scratch/Rtmptr7Bn7’
‘~/tmp/scratch/RtmpuC4oxk’ ‘~/tmp/scratch/RtmpuPF8Yx’
‘~/tmp/scratch/RtmpuuP3eM’ ‘~/tmp/scratch/Rtmpv3TJpU’
‘~/tmp/scratch/RtmpvSsgFE’ ‘~/tmp/scratch/Rtmpw6YVVe’
‘~/tmp/scratch/RtmpwIy8UQ’ ‘~/tmp/scratch/RtmpysuU9q’
‘~/tmp/scratch/Rtmpz5Ca8P’ ‘~/tmp/scratch/Rtmpz86UjN’
‘~/tmp/scratch/RtmpzQFTuA’ ‘~/tmp/scratch/RtmpzSuKKF’
‘~/tmp/scratch/RtmpzkTAwm’ ‘~/tmp/scratch/RtmpznFE7o’
‘~/tmp/scratch/RtmpzrD3Vw’ ‘~/tmp/scratch/xvfb-run.0Ldni4’
‘~/tmp/scratch/xvfb-run.0voVW7’ ‘~/tmp/scratch/xvfb-run.3k7O7v’
‘~/tmp/scratch/xvfb-run.4XDdZV’ ‘~/tmp/scratch/xvfb-run.4cU9lJ’
‘~/tmp/scratch/xvfb-run.4q6m0i’ ‘~/tmp/scratch/xvfb-run.58MTWM’
‘~/tmp/scratch/xvfb-run.6rvKeQ’ ‘~/tmp/scratch/xvfb-run.6vzZc6’
‘~/tmp/scratch/xvfb-run.7mW1ig’ ‘~/tmp/scratch/xvfb-run.8vJUIw’
‘~/tmp/scratch/xvfb-run.9fTOtk’ ‘~/tmp/scratch/xvfb-run.AKyce1’
‘~/tmp/scratch/xvfb-run.BUpXbZ’ ‘~/tmp/scratch/xvfb-run.DNqFhC’
‘~/tmp/scratch/xvfb-run.De6T1f’ ‘~/tmp/scratch/xvfb-run.Dvgv6h’
‘~/tmp/scratch/xvfb-run.ECyJS9’ ‘~/tmp/scratch/xvfb-run.EWGihW’
‘~/tmp/scratch/xvfb-run.EkWwCD’ ‘~/tmp/scratch/xvfb-run.FtGJDU’
‘~/tmp/scratch/xvfb-run.Fy3EGh’ ‘~/tmp/scratch/xvfb-run.G96VqG’
‘~/tmp/scratch/xvfb-run.Gy4vCy’ ‘~/tmp/scratch/xvfb-run.HHqjhG’
‘~/tmp/scratch/xvfb-run.HflOr0’ ‘~/tmp/scratch/xvfb-run.Hllfuq’
‘~/tmp/scratch/xvfb-run.IpNETv’ ‘~/tmp/scratch/xvfb-run.L88EBg’
‘~/tmp/scratch/xvfb-run.LzGTtd’ ‘~/tmp/scratch/xvfb-run.MTFKFu’
‘~/tmp/scratch/xvfb-run.OCBWyT’ ‘~/tmp/scratch/xvfb-run.OWqwwt’
‘~/tmp/scratch/xvfb-run.P9DeXM’ ‘~/tmp/scratch/xvfb-run.QyaULH’
‘~/tmp/scratch/xvfb-run.R0mr5F’ ‘~/tmp/scratch/xvfb-run.RR3fC4’
‘~/tmp/scratch/xvfb-run.SqA4d3’ ‘~/tmp/scratch/xvfb-run.T7QwMf’
‘~/tmp/scratch/xvfb-run.Tg5Ro1’ ‘~/tmp/scratch/xvfb-run.UGi6wJ’
‘~/tmp/scratch/xvfb-run.USJAzl’ ‘~/tmp/scratch/xvfb-run.VV49sM’
‘~/tmp/scratch/xvfb-run.VzX7pG’ ‘~/tmp/scratch/xvfb-run.YCFeen’
‘~/tmp/scratch/xvfb-run.aZmlB9’ ‘~/tmp/scratch/xvfb-run.bnIskU’
‘~/tmp/scratch/xvfb-run.cCwN1Z’ ‘~/tmp/scratch/xvfb-run.epSPiG’
‘~/tmp/scratch/xvfb-run.fG2u2A’ ‘~/tmp/scratch/xvfb-run.fYhQe8’
‘~/tmp/scratch/xvfb-run.g0PxNj’ ‘~/tmp/scratch/xvfb-run.gyFCaW’
‘~/tmp/scratch/xvfb-run.iy6swr’ ‘~/tmp/scratch/xvfb-run.kNhQX4’
‘~/tmp/scratch/xvfb-run.kZ5voR’ ‘~/tmp/scratch/xvfb-run.lPncRO’
‘~/tmp/scratch/xvfb-run.ljaDkE’ ‘~/tmp/scratch/xvfb-run.mZi3DD’
‘~/tmp/scratch/xvfb-run.prS3HH’ ‘~/tmp/scratch/xvfb-run.qJ2vYL’
‘~/tmp/scratch/xvfb-run.qy6pn9’ ‘~/tmp/scratch/xvfb-run.r62Yg0’
‘~/tmp/scratch/xvfb-run.r6CIaG’ ‘~/tmp/scratch/xvfb-run.r7pWzU’
‘~/tmp/scratch/xvfb-run.s9k8ys’ ‘~/tmp/scratch/xvfb-run.sWXVBw’
‘~/tmp/scratch/xvfb-run.vZXPAo’ ‘~/tmp/scratch/xvfb-run.weXaAl’
‘~/tmp/scratch/xvfb-run.zWzK4V’ ‘~/tmp/scratch/xvfb-run.zgjBEt’
‘/dev/shm/sm_segment.gimli1.1001.1cea0000.0’
‘/dev/shm/sm_segment.gimli1.1001.2b580000.0’
‘/dev/shm/sm_segment.gimli1.1001.3faf0000.0’
‘/dev/shm/sm_segment.gimli1.1001.49930000.0’
‘/dev/shm/sm_segment.gimli1.1001.4e850000.0’
‘/dev/shm/sm_segment.gimli1.1001.4fc80000.0’
‘/dev/shm/sm_segment.gimli1.1001.65670000.0’
‘/dev/shm/sm_segment.gimli1.1001.6ad20000.0’
‘/dev/shm/sm_segment.gimli1.1001.77400000.0’
‘/dev/shm/sm_segment.gimli1.1001.7c6e0000.0’
‘/dev/shm/sm_segment.gimli1.1001.87950000.0’
‘/dev/shm/sm_segment.gimli1.1001.89e40000.0’
‘/dev/shm/sm_segment.gimli1.1001.8f690000.0’
‘/dev/shm/sm_segment.gimli1.1001.9b630000.0’
‘/dev/shm/sm_segment.gimli1.1001.ad2c0000.0’
‘/dev/shm/sm_segment.gimli1.1001.ae1e0000.0’
‘/dev/shm/sm_segment.gimli1.1001.c8f20000.0’
‘/dev/shm/sm_segment.gimli1.1001.c9db0000.0’
‘/dev/shm/sm_segment.gimli1.1001.d770000.0’
‘/dev/shm/sm_segment.gimli1.1001.d9c40000.0’
‘/dev/shm/sm_segment.gimli1.1001.eea90000.0’
‘~/.cache/pocl/uncached/tempfile_B5g7le’
‘~/.cache/pocl/uncached/tempfile_BvLdgf’
‘~/.cache/pocl/uncached/tempfile_CHkSPp’
‘~/.cache/pocl/uncached/tempfile_Kjqks4’
‘~/.cache/pocl/uncached/tempfile_P6YbjR’
‘~/.cache/pocl/uncached/tempfile_ZN4oNs’
‘~/.cache/pocl/uncached/tempfile_bZ7GU3’
‘~/.cache/pocl/uncached/tempfile_cjxGJ6’
‘~/.cache/pocl/uncached/tempfile_eA5IVY’
‘~/.cache/pocl/uncached/tempfile_eKCw5y’
‘~/.cache/pocl/uncached/tempfile_gqtuJp’
‘~/.cache/pocl/uncached/tempfile_hADOGu’
‘~/.cache/pocl/uncached/tempfile_jZJMiX’
‘~/.cache/pocl/uncached/tempfile_kPTrSh’
‘~/.cache/pocl/uncached/tempfile_lJrIuA’
‘~/.cache/pocl/uncached/tempfile_nMmzpV’
‘~/.cache/pocl/uncached/tempfile_nlh1Le’
‘~/.cache/pocl/uncached/tempfile_o0ulyR’
‘~/.cache/pocl/uncached/tempfile_qYkyoa’
‘~/.cache/pocl/uncached/tempfile_s4OfuI’
‘~/.cache/pocl/uncached/tempfile_tWpa8h’
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