h3ir's picture
Add README.md for v0.0.7
c2c064d verified
---
license: apache-2.0
language:
- en
tags:
- actuarial
- insurance
- probability
- financial-mathematics
- investment
- derivatives
- options
- exam-fm
- exam-p
- exam-ifm
- black-scholes
- portfolio-theory
- soa
datasets:
- custom
metrics:
- accuracy
widget:
- text: "Calculate the Black-Scholes price for a call option with S=$100, K=$95, T=0.25, r=5%, Οƒ=20%"
- text: "Stock has beta 1.5. Risk-free rate 3%, market return 9%. What's the required return under CAPM?"
- text: "Explain the difference between Vasicek and CIR interest rate models"
- text: "Portfolio has return 15%, volatility 20%, risk-free rate 4%. Calculate the Sharpe ratio."
---
# MORBID-Actuarial v0.0.7 πŸ“ˆ
## 🎯 Triple Exam Coverage: FM + P + IFM!
MORBID-Actuarial v0.0.7 expands to cover **THREE** major actuarial exams:
- βœ… **Exam FM (Financial Mathematics)**
- βœ… **Exam P (Probability)**
- πŸ†• **Exam IFM (Investment and Financial Markets)**
## πŸ“Š Model Statistics
### Training Data
- **Total Examples**: 18,794 (+37 IFM examples)
- **Training Set**: 15,037 examples
- **Validation Set**: 1,877 examples
- **Test Set**: 1,880 examples
### Performance Benchmarks
- **FM Exam**: 92.7% accuracy
- **P Exam**: 75.5% accuracy
- **IFM Exam**: 58.5% accuracy (new content)
## πŸ†• IFM Coverage (NEW in v0.0.7)
### Options & Derivatives
- **Black-Scholes Formula**: European option pricing
- **Binomial Trees**: American option valuation
- **Put-Call Parity**: Arbitrage relationships
- **Option Strategies**: Straddles, strangles, butterflies, collars
### Option Greeks
- **Delta (Ξ”)**: Price sensitivity to underlying
- **Gamma (Ξ“)**: Delta sensitivity
- **Theta (Θ)**: Time decay
- **Vega (Ξ½)**: Volatility sensitivity
- **Rho (ρ)**: Interest rate sensitivity
### Portfolio Theory
- **Modern Portfolio Theory**: Markowitz optimization
- **CAPM**: Capital Asset Pricing Model
- **APT**: Arbitrage Pricing Theory
- **Efficient Frontier**: Risk-return optimization
- **Sharpe Ratio**: Risk-adjusted returns
### Interest Rate Models
- **Vasicek Model**: Mean-reverting rates
- **Cox-Ingersoll-Ross (CIR)**: Non-negative rates
- **Hull-White Model**: Time-dependent parameters
- **Duration & Convexity**: Bond price sensitivity
### Financial Derivatives
- **Forward Contracts**: Custom OTC agreements
- **Futures Contracts**: Standardized exchange-traded
- **Interest Rate Swaps**: Fixed-for-floating exchanges
- **Currency Swaps**: Cross-currency exchanges
### Risk Management
- **Value at Risk (VaR)**: Maximum loss estimation
- **Conditional VaR (CVaR)**: Expected shortfall
- **Stress Testing**: Extreme scenario analysis
- **Monte Carlo Simulation**: Risk modeling
## πŸ’» Quick Start
### Installation
```bash
pip install transformers torch
```
### Example Usage
#### Black-Scholes Pricing
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("MorbidCorp/MORBID-Actuarial-v007")
tokenizer = AutoTokenizer.from_pretrained("MorbidCorp/MORBID-Actuarial-v007")
prompt = "Calculate Black-Scholes call price: S=$50, K=$48, T=0.25 years, r=5%, Οƒ=25%"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=300)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
```
#### Portfolio Optimization
```python
prompt = """
Two stocks: A has E(r)=12%, Οƒ=20%; B has E(r)=8%, Οƒ=15%; correlation=0.3.
Find the minimum variance portfolio weights.
"""
```
#### CAPM Analysis
```python
prompt = """
A stock has beta of 1.4. The risk-free rate is 3% and market return is 10%.
Calculate the required return using CAPM and explain the result.
"""
```
## πŸ“ˆ Training Process
### Data Sources
- SOA exam syllabi and materials
- Generated synthetic problems
- Financial engineering textbooks
- Options pricing literature
### Model Architecture
- Base Model: LLaMA-2-7B or similar
- Fine-tuning: LoRA/QLoRA
- Context Length: 2048 tokens
- Training: 3 epochs
## πŸ“Š Benchmark Results
### IFM Topics Performance
| Topic | Score |
|-------|-------|
| Forward Pricing | 77.5% |
| Put-Call Parity | 76.0% |
| Interest Rate Models | 76.0% |
| Value at Risk | 76.0% |
| Black-Scholes | 70.0% |
| Option Greeks | 70.0% |
| CAPM | 70.0% |
### By Difficulty
- Easy: 71.88%
- Medium: 65.00%
- Hard: 23.33%
## 🎯 Roadmap
### Completed
- βœ… v0.0.5: FM (Financial Mathematics)
- βœ… v0.0.6: P (Probability)
- βœ… v0.0.7: IFM (Investment & Financial Markets)
### Upcoming
- πŸ“… v0.0.8: LTAM (Long-Term Actuarial Mathematics)
- πŸ“… v0.0.9: STAM (Short-Term Actuarial Mathematics)
- πŸ“… v0.1.0: SRM (Statistics for Risk Modeling)
- πŸ“… v0.2.0: Fellowship track specializations
## ⚠️ Important Notes
1. **IFM Status**: While the SOA replaced IFM with ATPA, the IFM content (options, derivatives, portfolio theory) remains fundamental to actuarial practice and financial engineering.
2. **Limitations**:
- Complex multi-step calculations should be verified
- Newer exam formats may differ
- Not a substitute for official study materials
3. **Best Use Cases**:
- Concept explanation and understanding
- Practice problem assistance
- Quick reference for formulas
- Study companion
## πŸ“š Dataset
The training dataset is available at [`MorbidCorp/actuarial-fm-p-ifm-dataset`](https://huggingface.co/datasets/MorbidCorp/actuarial-fm-p-ifm-dataset)
## πŸ“– Citation
```bibtex
@model{morbid-actuarial-v007,
title={MORBID-Actuarial v0.0.7: Triple-Exam Actuarial AI},
author={MORBID AI Team},
year={2024},
version={0.0.7},
publisher={HuggingFace},
url={https://huggingface.co/MorbidCorp/MORBID-Actuarial-v007}
}
```
## 🀝 Contributing
We welcome contributions for:
- Additional exam coverage
- Practice problems
- Performance improvements
- Bug fixes
## πŸ“œ License
Apache 2.0 - See LICENSE file for details
## πŸ“§ Contact
- GitHub: [MorbidCorp/morbid-actuarial](https://github.com/MorbidCorp/morbid-actuarial)
- Discord: [MORBID AI Community](https://discord.gg/morbidai)
---
**Note**: This model is for educational purposes. Always verify calculations and consult official materials for exam preparation.