## risk.esscher_allocation()


Esscher allocation: each component's mean under the Esscher transform


Usage


``` python
risk.esscher_allocation(
    pd,
    h,
)
```


of the total, `E[X_j exp(h S)] / E[exp(h S)]`.

The contributions sum to `esscher(pd, h)`; at `h = 0` they are the means.


## Parameters


`pd: PredictiveDistribution`  

`h: float`  


## Returns


`list of float`  
One per component, in `pd.components()` order.


## Examples

``` python
>>> from prospicio.distributions import PredictiveDistribution
>>> from prospicio.risk import esscher_allocation
>>> pd = PredictiveDistribution(["lob"], [("motor",), ("property",)],
...                             [[1.0, 2.0], [4.0, 1.0], [2.0, 5.0], [3.0, 6.0]])
>>> esscher_allocation(pd, 0.0)
```

\[2.5, 3.5\]
