Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/genedan/MIES
Miniature Insurance Economic Simulator
https://github.com/genedan/MIES
actuarial economics insurance
Last synced: 8 days ago
JSON representation
Miniature Insurance Economic Simulator
- Host: GitHub
- URL: https://github.com/genedan/MIES
- Owner: genedan
- License: gpl-3.0
- Created: 2017-12-31T00:19:03.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-16T23:10:30.000Z (over 3 years ago)
- Last Synced: 2024-11-24T07:16:10.537Z (18 days ago)
- Topics: actuarial, economics, insurance
- Language: Python
- Homepage:
- Size: 658 KB
- Stars: 23
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - genedan/MIES - Miniature Insurance Economic Simulator (Python)
README
# MIES
[![PyPI version](https://badge.fury.io/py/mies.svg)](https://badge.fury.io/py/mies)Miniature Insurance Economic Simulator
![](docs/claim_schema.png)
## Introduction
The purpose of MIES is to simulate, with the appropriate balance between detail and abstraction, various economic equilibria that result between the interactions between insurance firms, policyholders, and regulators.
The goal is to create an explanatory model that links economic theory with actuarial science.
## Development Blog
Additional examples can be found in a series of blog posts, here:https://genedan.com/category/mies/
## Documentation
Documentation can be found here:https://genedan.com/mies/docs/
## Concepts Modeled
* [Adverse Selection](https://genedan.com/no-135-mies-simulating-an-insurance-market/)
* Availability of insurance
* Predatory pricing
* Impact of insolvency on insureds## Project Goals
* Should be consistent with both macro and microeconomic theory
* Should be consistent with actuarial theory## Installation
```
pip install mies
```## Example Simulation
```python
import pandas as pd
import datetime as dtfrom entities.god import God
from entities.broker import Broker
from entities.insurer import Insurer
```Set up the environment and relative entities - A broker, a population of insureds, and two insurers with 4B in capital:
```python
ahura = God()
ahura.make_population(1000)rayon = Broker()
company_1 = Insurer(4000000, 'company_1')
company_2 = Insurer(4000000, 'company_2')
```Set up the pricing strategy for each company:
```python
company_1_formula = 'incurred_loss ~ age_class + profession + health_status + education_level'
company_2_formula = 'incurred_loss ~ age_class'
```
The broker can now be used to place business, given each insurer's pricing strategy:```python
rayon.place_business(
pricing_date,
company_1,
company_2
)event_date = pricing_date + dt.timedelta(days=1)
```Generate losses, report claims, and then reprice and renew policies:
```python
event_date = pricing_date + dt.timedelta(days=1)
ahura.smite(event_date)
rayon.report_claims(event_date)
company_1.price_book(company_1_formula)
company_2.price_book(company_2_formula)
pricing_date = pricing_date.replace(pricing_date.year + 1)
```