tests/testthat/test-wfo_equitycurve.R

#
# test-wfo_equitycurve.R
# ----------------------
#
#
library(ResilientPortfolio)
library(testthat)

context("Testing wfo_equitycurve")

test_that("Testing wfo_equitycurve function", {

  library(ResilientPortfolio)
  library(testthat)
  rebal_offset = 4
  wfodata      = wfo_datashort
  ########

  x <- wfo_equitycurve(wfodata, rebal_offset = rebal_offset)
  expect_equal(round(as.numeric(last(x)[,1]), 4), 1.0235)


})
jeanmarcgp/ResilientPortfolio documentation built on April 8, 2018, 5:43 p.m.