# ard714/rare_event_simulation architecture

> Architecture diagram of the GitHub repository ard714/rare_event_simulation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ard714/rare_event_simulation
- Repository: https://github.com/ard714/rare_event_simulation

## Overview

This repository is a collection of standalone quantitative-finance experiments, not a shared application: scripts estimate option prices or rare-event probabilities using Monte Carlo and neural-network importance sampling, then report or plot results. The principal workflow is to run a selected experiment, simulate paths or terminal outcomes, estimate and compare results, and inspect diagnostics. The graph groups the main experiment families and preserves the central scripts. The README is empty, and the excerpts show no cross-script calls, so the scripts are represented as independent entry points.

Main entry points: [`mc_bs_results.py`](https://github.com/ard714/rare_event_simulation/blob/main/mc_bs_results.py) (GBM MC Pricing), [`pricing_deep_otm (1).py`](https://github.com/ard714/rare_event_simulation/blob/main/pricing_deep_otm%20(1).py) (Deep OTM Pricing), [`mc_advanced_models.py`](https://github.com/ard714/rare_event_simulation/blob/main/mc_advanced_models.py) (Advanced MC Models), [`rare_event (1) (1).py`](https://github.com/ard714/rare_event_simulation/blob/main/rare_event%20(1)%20(1).py) (Multi-SDE Importance Sampling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pricing["Option Pricing"]
  node_mc_bs["GBM MC Pricing<br/>[mc_bs_results.py]"]
  node_deep_otm["Deep OTM Pricing"]
  node_advanced_mc["Advanced MC Models"]
end

subgraph group_rare["Rare Events"]
  node_rare_sde["Multi-SDE Importance Sampling"]
  node_rare_gbm["GBM Rare Events"]
  node_rare_cir["CIR Rare Events"]
  node_rare_fbm["Fractional GBM Events"]
  node_fbm_methods["fGBM Method Comparison"]
end

subgraph group_diagnostics["Diagnostics"]
  node_diag_price["Pricing Diagnostics<br/>[diagnostics-2.py]"]
  node_diag_probability["Probability Diagnostics"]
  node_diag_final["Final Diagnostics<br/>[final_diag &#40;1&#41;.py]"]
end

subgraph group_models["Model Variants"]
  node_advanced_models["Additional Model Experiments"]
end

node_analyst(("Researcher"))

node_analyst -->|"runs"| node_mc_bs
node_analyst -->|"runs"| node_deep_otm
node_analyst -->|"runs"| node_advanced_mc
node_analyst -->|"runs"| node_rare_sde
node_analyst -->|"runs"| node_rare_gbm
node_analyst -->|"runs"| node_rare_cir
node_analyst -->|"runs"| node_rare_fbm
node_analyst -->|"runs"| node_fbm_methods
node_analyst -->|"runs"| node_diag_price
node_analyst -->|"runs"| node_diag_probability
node_analyst -->|"runs"| node_diag_final

click node_mc_bs "https://github.com/ard714/rare_event_simulation/blob/main/mc_bs_results.py"
click node_deep_otm "https://github.com/ard714/rare_event_simulation/blob/main/pricing_deep_otm%20(1).py"
click node_advanced_mc "https://github.com/ard714/rare_event_simulation/blob/main/mc_advanced_models.py"
click node_rare_sde "https://github.com/ard714/rare_event_simulation/blob/main/rare_event%20(1)%20(1).py"
click node_rare_gbm "https://github.com/ard714/rare_event_simulation/blob/main/rare_event_gbm%20(1)%20(1).py"
click node_rare_cir "https://github.com/ard714/rare_event_simulation/blob/main/rare_event_cir%20(1)%20(1).py"
click node_rare_fbm "https://github.com/ard714/rare_event_simulation/blob/main/rare_event_fbm%20(1).py"
click node_fbm_methods "https://github.com/ard714/rare_event_simulation/blob/main/rare_event_fbm_methods%20(1)%20(1).py"
click node_diag_price "https://github.com/ard714/rare_event_simulation/blob/main/diagnostics-2.py"
click node_diag_probability "https://github.com/ard714/rare_event_simulation/blob/main/diagnostics_comparison.py"
click node_diag_final "https://github.com/ard714/rare_event_simulation/blob/main/final_diag%20(1).py"
click node_advanced_models "https://github.com/ard714/rare_event_simulation/blob/main/mc_advanced_models.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mc_bs,node_deep_otm,node_advanced_mc toneBlue
class node_rare_sde,node_rare_gbm,node_rare_cir,node_rare_fbm,node_fbm_methods toneAmber
class node_diag_price,node_diag_probability,node_diag_final toneMint
class node_advanced_models toneRose
class node_analyst toneIndigo
```

## Components

### Option Pricing

- [GBM MC Pricing](https://github.com/ard714/rare_event_simulation/blob/main/mc_bs_results.py): `mc_bs_results.py`
- [Deep OTM Pricing](https://github.com/ard714/rare_event_simulation/blob/main/pricing_deep_otm%20(1).py): `pricing_deep_otm (1).py`
- [Advanced MC Models](https://github.com/ard714/rare_event_simulation/blob/main/mc_advanced_models.py): `mc_advanced_models.py`

### Rare Events

- [Multi-SDE Importance Sampling](https://github.com/ard714/rare_event_simulation/blob/main/rare_event%20(1)%20(1).py): `rare_event (1) (1).py`
- [GBM Rare Events](https://github.com/ard714/rare_event_simulation/blob/main/rare_event_gbm%20(1)%20(1).py): `rare_event_gbm (1) (1).py`
- [CIR Rare Events](https://github.com/ard714/rare_event_simulation/blob/main/rare_event_cir%20(1)%20(1).py): `rare_event_cir (1) (1).py`
- [Fractional GBM Events](https://github.com/ard714/rare_event_simulation/blob/main/rare_event_fbm%20(1).py): `rare_event_fbm (1).py`
- [fGBM Method Comparison](https://github.com/ard714/rare_event_simulation/blob/main/rare_event_fbm_methods%20(1)%20(1).py): `rare_event_fbm_methods (1) (1).py`

### Diagnostics

- [Pricing Diagnostics](https://github.com/ard714/rare_event_simulation/blob/main/diagnostics-2.py): `diagnostics-2.py`
- [Probability Diagnostics](https://github.com/ard714/rare_event_simulation/blob/main/diagnostics_comparison.py): `diagnostics_comparison.py`
- [Final Diagnostics](https://github.com/ard714/rare_event_simulation/blob/main/final_diag%20(1).py): `final_diag (1).py`

### Model Variants

- [Additional Model Experiments](https://github.com/ard714/rare_event_simulation/blob/main/mc_advanced_models.py): `mc_advanced_models.py`

### Other components

- **Researcher**

## Connections

- Researcher → GBM MC Pricing: runs (evidence: `mc_bs_results.py`)
- Researcher → Deep OTM Pricing: runs (evidence: `pricing_deep_otm (1).py`)
- Researcher → Advanced MC Models: runs (evidence: `mc_advanced_models.py`)
- Researcher → Multi-SDE Importance Sampling: runs (evidence: `rare_event (1) (1).py`)
- Researcher → GBM Rare Events: runs (evidence: `rare_event_gbm (1) (1).py`)
- Researcher → CIR Rare Events: runs (evidence: `rare_event_cir (1) (1).py`)
- Researcher → Fractional GBM Events: runs (evidence: `rare_event_fbm (1).py`)
- Researcher → fGBM Method Comparison: runs (evidence: `rare_event_fbm_methods (1) (1).py`)
- Researcher → Pricing Diagnostics: runs (evidence: `diagnostics-2.py`)
- Researcher → Probability Diagnostics: runs (evidence: `diagnostics_comparison.py`)
- Researcher → Final Diagnostics: runs (evidence: `final_diag (1).py`)
