## pricing.Period


An experience or forecast period `[start, end)` in year fractions:


Usage

``` python
pricing.Period()
```


premium earned (losses occurring) in a calendar window, or policies written in a policy window. A forecast period is the policy period of the policies written while new rates are in effect.

Build one with [Period.calendar](pricing.Period.md#prospicio.pricing.Period.calendar) or [Period.policy](pricing.Period.md#prospicio.pricing.Period.policy).


## Examples

``` python
>>> from prospicio.pricing import Period
>>> cy = Period.calendar(2011.0, 2012.0)
>>> future = Period.policy(2013.0, 2014.0)
>>> future.average_written_date(1.0) - cy.average_written_date(1.0)
```

2.5


## Attributes

| Name | Description |
|----|----|
| [kind](#kind) | `"calendar"` or `"policy"`. |

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


#### kind


`"calendar"` or `"policy"`.


`kind: str`


## Methods

| Name | Description |
|----|----|
| [average_earned_date()](#average_earned_date) | The average date the period's premium is earned, the average |
| [average_written_date()](#average_written_date) | The average date the period's premium was written, for policies of |
| [calendar()](#calendar) | Premium earned (losses occurring) in `[start, end)`. |
| [policy()](#policy) | Policies written in `[start, end)`, over their whole term. |

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


#### average_earned_date()


The average date the period's premium is earned, the average


Usage

``` python
average_earned_date(term)
```


accident date of its losses: losses are trended from and to these dates.


##### Parameters


`term: float`  


##### Returns


`float`  


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


#### average_written_date()


The average date the period's premium was written, for policies of


Usage

``` python
average_written_date(term)
```


`term` years: premium is trended from and to these dates.


##### Parameters


`term: float`  


##### Returns


`float`  


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


#### calendar()


Premium earned (losses occurring) in `[start, end)`.


Usage

``` python
calendar(start, end)
```


##### Parameters


`start: float`  

`end: float`  


##### Returns


`Period`  


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


#### policy()


Policies written in `[start, end)`, over their whole term.


Usage

``` python
policy(start, end)
```


##### Parameters


`start: float`  

`end: float`  


##### Returns


`Period`
