Update README.md
Browse files
README.md
CHANGED
|
@@ -1,12 +1,11 @@
|
|
| 1 |
---
|
| 2 |
-
---
|
| 3 |
title: "Actuarial Model Point Generator"
|
| 4 |
emoji: 🏗️
|
| 5 |
-
colorFrom:
|
| 6 |
colorTo: red
|
| 7 |
sdk: gradio
|
| 8 |
sdk_version: 5.31.0
|
| 9 |
-
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
license: mit
|
| 12 |
short_description: Generate synthetic actuarial model points
|
|
@@ -18,44 +17,76 @@ tags:
|
|
| 18 |
- data-generation
|
| 19 |
- gradio
|
| 20 |
- dashboard
|
| 21 |
-
-
|
| 22 |
---
|
| 23 |
|
| 24 |
-
|
| 25 |
# 🏗️ Actuarial Model Point Generator
|
| 26 |
|
| 27 |
-
A
|
| 28 |
-
Designed for actuaries and data scientists who need realistic portfolio data for testing, training, and analysis.
|
| 29 |
|
| 30 |
[](https://huggingface.co/spaces/alidenewade/actuarial-model-point-generator)
|
| 31 |
|
| 32 |
---
|
| 33 |
|
| 34 |
-
## 🌟
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
| **📋 Professional Output** | • View table of generated policies<br>• Export to CSV<br>• Summary statistics by variable |
|
| 41 |
-
| **🎯 Actuarial Applications** | Ideal for:<br>• Model clustering<br>• Stress testing<br>• Product development<br>• Risk exposure profiling<br>• Simulation input |
|
| 42 |
-
| **🔧 Customization Options** | - Policy count: 100–50,000<br>- Age: 18–80<br>- Sum assured: custom min–max<br>- Policy term: multi-select (5–30 years)<br>- Sex: optional<br>- Policy count per row: fixed or variable |
|
| 43 |
|
| 44 |
---
|
| 45 |
|
| 46 |
-
##
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
---
|
| 54 |
|
| 55 |
## 🛠️ Local Installation
|
| 56 |
|
| 57 |
```bash
|
| 58 |
-
# Clone
|
| 59 |
git clone https://github.com/YOUR-USERNAME/actuarial-model-point-generator.git
|
| 60 |
cd actuarial-model-point-generator
|
| 61 |
|
|
@@ -64,3 +95,19 @@ pip install -r requirements.txt
|
|
| 64 |
|
| 65 |
# Run the app
|
| 66 |
python app.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
title: "Actuarial Model Point Generator"
|
| 3 |
emoji: 🏗️
|
| 4 |
+
colorFrom: green
|
| 5 |
colorTo: red
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 5.31.0
|
| 8 |
+
app_file: app.py # update this if your main file name is different
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
short_description: Generate synthetic actuarial model points
|
|
|
|
| 17 |
- data-generation
|
| 18 |
- gradio
|
| 19 |
- dashboard
|
| 20 |
+
- excel
|
| 21 |
---
|
| 22 |
|
|
|
|
| 23 |
# 🏗️ Actuarial Model Point Generator
|
| 24 |
|
| 25 |
+
A flexible Gradio app to generate fully customized **synthetic seriatim model points** for use in actuarial testing, clustering, or analytics.
|
|
|
|
| 26 |
|
| 27 |
[](https://huggingface.co/spaces/alidenewade/actuarial-model-point-generator)
|
| 28 |
|
| 29 |
---
|
| 30 |
|
| 31 |
+
## 🌟 What’s New
|
| 32 |
+
|
| 33 |
+
This version adds **complete UI control** over generation logic:
|
| 34 |
+
|
| 35 |
+
- 👥 Number of policies (100 to 50,000)
|
| 36 |
+
- 🎲 Random seed for reproducibility
|
| 37 |
+
- 👶 Age range (min/max)
|
| 38 |
+
- 💵 Sum assured range
|
| 39 |
+
- 📆 Multiple selectable policy terms (5–30 years)
|
| 40 |
+
- 🧑 Include or exclude sex (M/F)
|
| 41 |
+
- 📦 Choose between fixed or variable policy count
|
| 42 |
+
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
## 🧮 Output Columns
|
| 46 |
+
|
| 47 |
+
Each generated row represents a policy and includes:
|
| 48 |
+
|
| 49 |
+
- `age_at_entry`: Issue age
|
| 50 |
+
- `sex`: "M", "F", or "U" (unspecified)
|
| 51 |
+
- `policy_term`: Chosen from selected terms
|
| 52 |
+
- `policy_count`: Fixed (1) or random (1–100)
|
| 53 |
+
- `sum_assured`: Uniformly distributed between min/max
|
| 54 |
+
- `duration_mth`: In-force duration, capped by policy term
|
| 55 |
+
|
| 56 |
+
All rows are indexed by `policy_id`.
|
| 57 |
+
|
| 58 |
+
---
|
| 59 |
+
|
| 60 |
+
## ✅ How to Use
|
| 61 |
|
| 62 |
+
1. Adjust your filters on the left
|
| 63 |
+
2. Click **“Generate Model Points”**
|
| 64 |
+
3. Preview the results in the table
|
| 65 |
+
4. Click **“Download Excel”** to save the data
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
---
|
| 68 |
|
| 69 |
+
## 🧠 Use Cases
|
| 70 |
|
| 71 |
+
- Cluster-based model point selection
|
| 72 |
+
- Stress testing & actuarial simulations
|
| 73 |
+
- Product mix scenario planning
|
| 74 |
+
- Teaching or training actuarial students
|
| 75 |
+
- Model validation tools
|
| 76 |
+
|
| 77 |
+
---
|
| 78 |
+
|
| 79 |
+
## 📦 File Export
|
| 80 |
+
|
| 81 |
+
The download button exports the data to Excel (`.xlsx`) with the index (`policy_id`) included.
|
| 82 |
+
Warnings will be shown if inputs are invalid (e.g., min age ≥ max age).
|
| 83 |
|
| 84 |
---
|
| 85 |
|
| 86 |
## 🛠️ Local Installation
|
| 87 |
|
| 88 |
```bash
|
| 89 |
+
# Clone the repo
|
| 90 |
git clone https://github.com/YOUR-USERNAME/actuarial-model-point-generator.git
|
| 91 |
cd actuarial-model-point-generator
|
| 92 |
|
|
|
|
| 95 |
|
| 96 |
# Run the app
|
| 97 |
python app.py
|
| 98 |
+
```
|
| 99 |
+
---
|
| 100 |
+
## 🙌 Acknowledgements
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
Huge thanks to the Lifelib community for their open-source contributions to life actuarial modeling in Python.
|
| 104 |
+
This project draws inspiration from their work on model point clustering and stochastic modeling tools.
|
| 105 |
+
|
| 106 |
+
Check them out at: https://github.com/lifelib-dev/lifelib
|
| 107 |
+
|
| 108 |
+
---
|
| 109 |
+
|
| 110 |
+
## 📄 License
|
| 111 |
+
This project is released under the MIT License.
|
| 112 |
+
|
| 113 |
+
Created with ❤️ by @alidenewade for the actuarial analytics community.
|