Generating triangle per development year from historic cashflow of single claims
convert_single2dev_year_triangle.Rd
Creates a matrix with each historic origin year as row and as calendar year in columns and sums in upper right triangle of the matrix
Usage
convert_single2dev_year_triangle(
cashflow,
claims_orig_years,
first_orig_year,
last_orig_year
)
Details
last_orig_year will automatically be treated as the last observed calendar year, so the resulting matrix is quadratic
Examples
cashflow <- matrix(0, nrow = 5, ncol = 3)
rownames(cashflow) <- paste0("Claim", as.character(1:5))
colnames(cashflow) <- 2010:2012
cashflow[c(1, 2, 3, 6, 7, 12, 14, 15)] <- 1000
claims_orig_years <- c(2010, 2010, 2010, 2012, 2012)
print(cbind(cashflow, claims_orig_years))
#> 2010 2011 2012 claims_orig_years
#> Claim1 1000 1000 0 2010
#> Claim2 1000 1000 1000 2010
#> Claim3 1000 0 0 2010
#> Claim4 0 0 1000 2012
#> Claim5 0 0 1000 2012
convert_single2dev_year_triangle(cashflow, claims_orig_years, 2010, 2012)
#> 2010 2011 2012
#> 2010 3000 2000 1000
#> 2011 0 0 0
#> 2012 0 0 2000