Skip to main content

Miniature Insurance Economic Simulator

Project description

MIES

Miniature Insurance Economic Simulator

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

  • 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

Example Simulation

import pandas as pd
import datetime as dt

from 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:

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:

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:

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:

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mies-0.0.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mies-0.0.0-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file mies-0.0.0.tar.gz.

File metadata

  • Download URL: mies-0.0.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for mies-0.0.0.tar.gz
Algorithm Hash digest
SHA256 67f7676b0c971da1c5507ef7a2d159766bcfc5f046d8748ed3e0f6ef84b18ccf
MD5 619590c6a5ebd4ee73bc90dbd8042f62
BLAKE2b-256 98c12b2bd6f87207b4b6ebe626dedd4c7c200415fe15dad5a4b606c64ac805b4

See more details on using hashes here.

File details

Details for the file mies-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: mies-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for mies-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f203612311128497ce10acab066ae575f9dfa3866124a6d06d6a4ce4b217e12
MD5 c412c23dcd84332cc5b4300f0d717008
BLAKE2b-256 850a6c237828cb614042aeb78658f862137cdc9b60a9c7cc25ac4ec491b26823

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page