payment_lag

payment_lag(i, j)[source]

Average timing of premium payments.

If ‘LAST’ is passed to j, returns the average time in months from date_(i) to a payment before the next policy anniversary. Defined as:

last_part(i, freq_id='PREM') + max(pay_count(i, 'LAST') - 1, 0) * pay_interval / 2

where pay_interval is defined as 12 // payment_freq().

If ‘NEXT’ is passed to j, returns the average time in months from the next anniversary date to a premium payment after the policy anniversary. Defined as:

max(pay_count(i, 'NEXT') - 1, 0) * pay_interval / 2