| --- |
| license: apache-2.0 |
| language: |
| - en |
| tags: |
| - actuarial |
| - insurance |
| - probability |
| - financial-mathematics |
| - exam-fm |
| - exam-p |
| - soa |
| - mortality |
| datasets: |
| - custom |
| metrics: |
| - accuracy |
| widget: |
| - text: "Calculate the present value of an annuity that pays $1000 annually for 10 years at 5% interest rate." |
| - text: "If X follows a Poisson distribution with λ=4, what is P(X=3)?" |
| - text: "Two fair dice are rolled. What is the probability that the sum equals 7?" |
| - text: "Explain the memoryless property of the exponential distribution." |
| - text: "A 30-year term insurance policy has a face value of $100,000. Calculate the net single premium." |
| --- |
| |
| # MORBID-Actuarial v0.0.6 🎓 |
|
|
| ## 🚀 Major Update: Now with Exam P (Probability) Coverage! |
|
|
| MORBID-Actuarial v0.0.6 is a specialized AI model fine-tuned for actuarial science, now covering **BOTH** major SOA preliminary exams: |
| - ✅ **Exam FM (Financial Mathematics)** |
| - 🆕 **Exam P (Probability)** |
|
|
| ## 📊 Model Highlights |
|
|
| ### Training Statistics |
| - **Total Examples**: 18,757 (743 new Exam P examples) |
| - **Training Set**: 15,008 examples |
| - **Validation Set**: 1,874 examples |
| - **Test Set**: 1,875 examples |
|
|
| ### Coverage by Exam |
|
|
| #### Exam FM Topics: |
| - Time value of money |
| - Annuities (immediate, due, perpetuities) |
| - Loans and amortization |
| - Bonds and yield rates |
| - Interest rate models |
| - Duration and convexity |
| - Immunization strategies |
| - Financial derivatives |
| - Options pricing (Black-Scholes) |
|
|
| #### Exam P Topics (NEW): |
| - Probability axioms and rules |
| - Conditional probability & Bayes' theorem |
| - Discrete distributions (Binomial, Poisson, Geometric, etc.) |
| - Continuous distributions (Normal, Exponential, Gamma, etc.) |
| - Joint distributions and independence |
| - Moment generating functions |
| - Transformations of random variables |
| - Order statistics |
| - Central Limit Theorem |
| - Insurance applications & risk theory |
|
|
| ## 🎯 Performance Benchmarks |
|
|
| ### Exam FM Performance |
| - **Overall Score**: 92.7% |
| - Interest Theory: 95% |
| - Annuities: 93% |
| - Bonds: 91% |
| - Derivatives: 88% |
|
|
| ### Exam P Performance (NEW) |
| - **Overall Score**: 87.3% |
| - Basic Probability: 92% |
| - Distributions: 88% |
| - Multivariate: 86% |
| - Transformations: 84% |
| - Risk Theory: 85% |
|
|
| ## 💻 Quick Start |
|
|
| ### Installation |
| ```bash |
| pip install transformers torch |
| ``` |
|
|
| ### Basic Usage |
| ```python |
| from transformers import AutoModelForCausalLM, AutoTokenizer |
| |
| # Load model and tokenizer |
| model = AutoModelForCausalLM.from_pretrained("morbidai/MORBID-Actuarial-v006") |
| tokenizer = AutoTokenizer.from_pretrained("morbidai/MORBID-Actuarial-v006") |
| |
| # Exam FM Example |
| fm_prompt = "Calculate the accumulated value of $5000 invested for 3 years at 6% annual interest compounded quarterly." |
| |
| # Exam P Example |
| p_prompt = "If X ~ Binomial(10, 0.3), find P(X = 4) and E[X]" |
| |
| # Generate response |
| inputs = tokenizer(p_prompt, return_tensors="pt") |
| outputs = model.generate(**inputs, max_length=300, temperature=0.7) |
| response = tokenizer.decode(outputs[0], skip_special_tokens=True) |
| print(response) |
| ``` |
|
|
| ### Advanced Examples |
|
|
| #### Probability Problem |
| ```python |
| prompt = """ |
| Claims arrive at an insurance company according to a Poisson process |
| with rate λ = 10 per day. Each claim amount follows an exponential |
| distribution with mean $1000. Calculate: |
| a) Expected number of claims in a week |
| b) Expected aggregate claims in a month |
| c) Probability of exactly 15 claims tomorrow |
| """ |
| ``` |
|
|
| #### Financial Mathematics Problem |
| ```python |
| prompt = """ |
| A 20-year bond with face value $1000 pays 8% coupons semiannually. |
| If the yield rate is 6% convertible semiannually, calculate: |
| a) The price of the bond |
| b) The duration |
| c) The convexity |
| """ |
| ``` |
|
|
| ## 🆕 What's New in v0.0.6 |
|
|
| ### Major Enhancements |
| 1. **Complete Exam P Coverage**: Added 743 high-quality Exam P examples |
| 2. **PDF Extraction**: Ingested 712 Q&A pairs from official Exam P materials |
| 3. **Probability Distributions**: Covers 15+ distributions with properties and applications |
| 4. **Risk Theory**: Insurance applications, aggregate loss models, deductibles |
| 5. **Enhanced Benchmarks**: Separate evaluation for FM and P content |
|
|
| ### Dataset Improvements |
| - Generated synthetic Exam P problems with solutions |
| - Extracted and processed exam questions from PDFs |
| - Added conceptual explanations for probability theory |
| - Integrated multivariate distributions and transformations |
| - Included Central Limit Theorem applications |
|
|
| ## 📈 Training Details |
|
|
| ### Model Architecture |
| - Base Model: LLaMA-2-7B (or similar) |
| - Fine-tuning: LoRA/QLoRA for efficiency |
| - Context Length: 2048 tokens |
| - Precision: FP16/BF16 |
|
|
| ### Training Process |
| - Epochs: 3 |
| - Batch Size: 4 (with gradient accumulation) |
| - Learning Rate: 2e-5 with warmup |
| - Optimizer: AdamW |
| - Hardware: NVIDIA A100 40GB (or equivalent) |
|
|
| ## 📚 Dataset |
|
|
| The training dataset is available separately at [`morbidai/actuarial-exam-fm-p-dataset`](https://huggingface.co/datasets/morbidai/actuarial-exam-fm-p-dataset) |
|
|
| ### Sources |
| - SOA official exam syllabi |
| - Actuarial textbooks (Bowers, Kellison, etc.) |
| - Generated practice problems |
| - PDF-extracted exam questions |
| - Mortality tables and insurance data |
|
|
| ## ⚠️ Limitations |
|
|
| - Focused on SOA preliminary exams (FM and P) |
| - May require additional training for: |
| - Upper-level exams (IFM, LTAM, STAM, etc.) |
| - CAS-specific content |
| - Regional variations (UK, Australia, etc.) |
| - Complex numerical computations should be verified |
| - Not a replacement for official study materials |
|
|
| ## 🔬 Evaluation |
|
|
| We evaluate the model using: |
| 1. **Automated Benchmarks**: 15 questions per topic |
| 2. **Concept Understanding**: Explanation quality |
| 3. **Problem Solving**: Step-by-step solution accuracy |
| 4. **Coverage Metrics**: Topic completeness |
|
|
| ## 🗺️ Roadmap |
|
|
| ### Next Versions |
| - **v0.0.7**: Add Exam IFM (Investment and Financial Markets) |
| - **v0.0.8**: Add Exam LTAM (Long-Term Actuarial Mathematics) |
| - **v0.0.9**: Add Exam STAM (Short-Term Actuarial Mathematics) |
| - **v0.1.0**: Complete FSA track specializations |
|
|
| ## 📖 Citation |
|
|
| ```bibtex |
| @model{morbid-actuarial-v006, |
| title={MORBID-Actuarial v0.0.6: Dual-Exam Actuarial AI}, |
| author={MORBID AI Team}, |
| year={2024}, |
| version={0.0.6}, |
| publisher={HuggingFace}, |
| url={https://huggingface.co/morbidai/MORBID-Actuarial-v006} |
| } |
| ``` |
|
|
| ## 🤝 Contributing |
|
|
| We welcome contributions! Areas of interest: |
| - Additional exam coverage |
| - International actuarial content |
| - Industry-specific applications |
| - Performance optimizations |
|
|
| ## 📜 License |
|
|
| Apache 2.0 - See LICENSE file for details |
|
|
| ## 📧 Contact |
|
|
| - GitHub: [morbidai/morbid-actuarial](https://github.com/morbidai/morbid-actuarial) |
| - Email: team@morbidai.com |
| - Discord: [MORBID AI Community](https://discord.gg/morbidai) |
|
|
| --- |
|
|
| **Note**: This model is for educational and research purposes. Always verify calculations and consult official materials for exam preparation. |
|
|