Heavymodel
Actuarial Heavy Modelling
Install / Use
/learn @lewisfogden/HeavymodelREADME
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.
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
