## esg.Esg


An economic scenario generator: a short rate, and optionally economic


Usage


``` python
esg.Esg()
```


and superimposed inflation with correlated shocks (`docs/design/esg-dfa.md`).


## Parameters


`rate: (Vasicek, Cir or HullWhite)`  
The short rate model.

`inflation: Inflation`  

`superimposed: Superimposed`  

`correlation: list of list of float`  
The correlation of the shocks, in the order short rate, inflation, superimposed, for the models given; independent by default.

`step: str = ``"monthly"`  
`"monthly"`, `"quarterly"` or `"annual"`.

`maturities: list of float`  
The maturities of the curve reported at each step.


## Examples

``` python
>>> from prospicio.esg import Esg, Inflation, Vasicek
>>> esg = Esg(Vasicek(0.3, 0.04, 0.01, 0.02), inflation=Inflation(0.5, 0.025, 0.01, 0.03),
...           correlation=[[1.0, 0.4], [0.4, 1.0]], step="annual")
>>> sc = esg.simulate(5, 100, seed=1)
>>> sc.short_rates().shape
```

(100, 6)


## Methods

| Name | Description |
|----|----|
| [simulate()](#simulate) | Simulate `sims` paths of [years](esg.ProjectionPaths.md#prospicio.esg.ProjectionPaths.years) years from [seed](aggregate.EventSet.md#prospicio.aggregate.EventSet.seed). |

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


#### simulate()


Simulate `sims` paths of [years](esg.ProjectionPaths.md#prospicio.esg.ProjectionPaths.years) years from [seed](aggregate.EventSet.md#prospicio.aggregate.EventSet.seed).


Usage


``` python
simulate(years, sims, seed)
```


Path `s` draws from its own stream, so a path is the same whatever the number of paths and threads.
