Skip to main content

Heavy Model Actuarial Modelling

Project description

Heavymodel

heavymodel is a class-based library which enables Actuaries (and other modelling professionals) to build actuarial models in Python, using a function-based syntax similar to other actuarial modelling software, combined with the simplicity of writing code in python.

Installation

Install via pip:

pip install heavymodel-lewisfogden

Simple Model Creation

Import heavymodel, and then subclass your own model from Model:

from heavymodel import Model
import pandas as pd

class DemographicModel(Model):
	def num_policies(self, t):
		if t == 0:
			return 1
		else:
			return self.num_policies(t-1) - self.num_lapses(t-1)

	def num_lapses(self, t):
		return 0.1 * self.num_policies(t)

demo = DemographicModel()

demo._run(20)

df = pd.DataFrame({"num_lapses":demo.num_lapses.values, "num_policies":demo.num_policies.values})
print(df)

See https://www.digitalactuary.co.uk/ for further documentation.

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

heavymodel-lewisfogden-0.0.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

heavymodel_lewisfogden-0.0.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file heavymodel-lewisfogden-0.0.2.tar.gz.

File metadata

  • Download URL: heavymodel-lewisfogden-0.0.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3

File hashes

Hashes for heavymodel-lewisfogden-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fb138c01096b609ac7f54f9483389a361df2547ee638eb9a22c8627b5f74e507
MD5 7f15b788657524bfaf505841be9fd2ce
BLAKE2b-256 36c57f274b22d16802b9a95d1e4285dc02a84d86ed56c5b8675d5de2f058709b

See more details on using hashes here.

File details

Details for the file heavymodel_lewisfogden-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: heavymodel_lewisfogden-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3

File hashes

Hashes for heavymodel_lewisfogden-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fd83c88d1c09a846ad8963bd49f5b17e5aa5fd80760daee77e4fef171d8f7afa
MD5 d8b9e99e173959e3b3928255d39d6514
BLAKE2b-256 e793b5dc5764a2294703d50e577e97f38633223930f6e2116570f80abdcae657

See more details on using hashes here.

Supported by

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