## kernels.MackDiagonal


Next year's diagonal from Mack's conditional moments.


Usage

``` python
kernels.MackDiagonal(
    process="gamma",
    parameter_risk=True,
)
```


Per draw: optionally draw the *true* development factors from Mack's estimation-error distribution `f_j ~ N(f_j-hat, sigma_j^2 / S_j)`, then draw each open origin's next cell with `E = f_{k_i} C_{i,k_i}`, `Var = sigma_{k_i}^2 C_{i,k_i}`, independently across accident years.

`parameter_risk` is the risk-source switch: off, the draws contain only the process risk of the next diagonal (the `Phi` half of the Merz-Wuthrich formula); on, they also carry the estimation error of the factors (its `Delta` half). `process` chooses the shape of the shock among `kernels.mack.PROCESS_LAWS` - all three match Mack's first two moments, and only `gamma`/`lognormal` guarantee a positive diagonal. Mack's model fixes nothing beyond those two moments, so this choice is an assumption of the simulation, not of the model; it is the reason `normal` is offered (it is the shape the analytic linearization implicitly compares against).

The draw itself is `kernels.mack._next_step_draws`, shared with `draw_next_cells` - the leaderboard's CRPS and this CDR cannot drift apart.


## Parameter Attributes


`process: str = ``"gamma"`  

`parameter_risk: bool = ``True`  


## Methods

| Name | Description |
|----|----|
| [check()](#check) | `Var = sigma_{k_i}^2 C_{i,k_i}` is non-positive off a non-positive |

------------------------------------------------------------------------


#### check()


`Var = sigma_{k_i}^2 C_{i,k_i}` is non-positive off a non-positive


Usage

``` python
check(fit)
```


diagonal, and `draw_step` then returns the mean exactly - an invisible point mass rather than an error, which is the one failure a simulation cannot surface on its own.
