## pricing.RateHistory


A history of rate changes from an initial level of 1, and the


Usage

``` python
pricing.RateHistory()
```


parallelogram method: the portion of a period's premium at each rate level under uniform writing and earning, and the factor to the current level (Werner and Modlin, ch. 5).


## Parameters


`effective: list of float`  
Effective dates as year fractions, in order.

`changes: list of float`  
Overall average changes, `0.05` for +5%.

`applies: list of str`  
`"written"` (policies written on or after the date; the default) or `"in_force"` (all premium earned on or after it, a law change).


## Raises


`ValueError`  
For dates out of order, a change of -100% or less, or mismatched lengths.


## Examples

``` python
>>> from prospicio.pricing import Period, RateHistory
>>> h = RateHistory([2010.5, 2011.0, 2012.25], [0.05, 0.10, -0.01])
>>> level = h.rate_level(Period.calendar(2011.0, 2012.0), term=1.0)
>>> level.shares
```

\[0.125, 0.375, 0.5\]

``` python
>>> round(level.on_level_factor, 4)
```

1.0431


## Attributes

| Name | Description |
|----|----|
| [current_level](#current_level) | The level after every change. |

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


#### current_level


The level after every change.


`current_level: float`


## Methods

| Name | Description |
|----|----|
| [from_levels()](#from_levels) | A history from the cumulative level after each change, as an |
| [rate_level()](#rate_level) | The portion of [period](esg.Cycle.md#prospicio.esg.Cycle.period)'s premium at each rate level, for |

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


#### from_levels()


A history from the cumulative level after each change, as an


Usage

``` python
from_levels(effective, levels, applies=None)
```


exhibit prints them; rounded printed levels carry into the factors.


##### Parameters


`effective: list of float`  

`levels: list of float`  

`applies: list of str = None`  


##### Returns


`RateHistory`  


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


#### rate_level()


The portion of [period](esg.Cycle.md#prospicio.esg.Cycle.period)'s premium at each rate level, for


Usage

``` python
rate_level(period, term)
```


policies of `term` years.


##### Parameters


`period: Period`  

`term: float`  


##### Returns


`RateLevel`
