inst/RUnit/runit.CAPM.R

test.CAPMList <- function()
{
    
    x <- CAPMList(monthlyReturns, marketIndex = sp500Returns, riskFree = US13wTB)

    .unitTestPath <- BLCOPOptions("unitTestPath")

    expected <- read.csv(file.path(.unitTestPath, "CAPMRes_lm.csv"), row.names = 1 )
    checkEquals( x, expected)
    x <- CAPMList(monthlyReturns, marketIndex = sp500Returns, riskFree = US13wTB, regFunc = "rlm")

    expected <- read.csv(file.path(.unitTestPath, "CAPMRes_rlm.csv"), row.names = 1)
    checkEquals( x, expected)
}

Try the BLCOP package in your browser

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

BLCOP documentation built on Jan. 26, 2021, 1:05 a.m.