tests/testthat/test-calc_certainty_equivalent_return.R

test_that("calculating certainty equivalent return (h)", {
  
  h <- calc_certainty_equivalent_return(
    expected_return = 0.03370865,
    variance        = 0.004088745,
    risk_tolerance  = 0.25
  )
  expect_equal(
    round(h, 6),
    0.02529
  )
})

Try the R4GoodPersonalFinances package in your browser

Any scripts or data that you put into this service are public.

R4GoodPersonalFinances documentation built on June 8, 2025, 11:18 a.m.