Script:
~addons/finance/finexec/actuarialmonlife/gi_tools.ijs
Contributor: William Szuch
Updated: 2022 6 25
Depend: nil
Definitions: loaded to locale base
Status: dev
Script source:
gi_tools.ijs
Definitions for solving general insurance
problems.
Equations:
To Do
Definitions
avg_dev (monad)
Form: tacit
Depend: nil
Calculate average development for table with incident by development
periods.
Applicable for square table.
Syntax
avg_dev(D)
D = square table with data by incident/development period.
Example
avg_dev(top_triL 4)
1 1 1 1
avg_dev(top_triL 8)
1 1 1 1 1 1 1 1
cumm_sum_columns (monad)
Form: tacit
Depend: nil
Cummulative sum down columns.
Syntax
cumm_sum_columns(M)
M = matrix
Example
cumm_sum_columns(i. 4 5)
0 1 2 3 4
5 7 9 11 13
15 18 21 24 27
30 34 38 42 46
cumm_sum_columns(top_triR 4)
1 2 3 4
0 1 2 3
0 0 1 2
0 0 0 1
cumm_sum_rows (monad)
Form: tacit
Depend: nil
Cummulative sum along rows.
Syntax
cumm_sum(M)
M = matrix
Example
cumm_sum_rows(i. 4 5)
0 1 3 6 10
5 11 18 26 35
10 21 33 46 60
15 31 48 66 85
cumm_sum_rows(top_triR 4)
1 2 3 4
0 1 2 3
0 0 1 2
0 0 0 1
inf_fac (monad)
Form: tacit
Depend: nil
Create a vector of inflation factors to inflate payments
to the end of last period.
Payments assumed to be made in the middle of period.
Payments in last period are inflated by half a period.
Syntax
inf_fac(I)
I = inflation rates per period eg. 0.05 = 5.0%
most recent period is last inflation rate
inf_pmts (dyad)
Form: tacit
Depend: nil
Inflate payments to the end of the last period.
Syntax
(P)inf_pmts(I)
p = actual payments: incident by payment period
I = inflation rates for periods
most recent period is last inflation rate
Example
(7#1)inf_pmts(7#0.05)
1.37319 1.3078 1.24552 1.18621 1.12973 1.07593 1.0247
(top_triR 4 )inf_pmts(4 # 0.05)
1.18621 1.12973 1.07593 1.0247
0 1.12973 1.07593 1.0247
0 0 1.07593 1.0247
0 0 0 1.0247