startup-valuation 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. startup_valuation-1.0.0/.github/workflows/ci.yml +36 -0
  2. startup_valuation-1.0.0/.github/workflows/docs.yml +52 -0
  3. startup_valuation-1.0.0/.github/workflows/publish.yml +56 -0
  4. startup_valuation-1.0.0/.gitignore +16 -0
  5. startup_valuation-1.0.0/AGENTS.md +40 -0
  6. startup_valuation-1.0.0/CHANGELOG.md +54 -0
  7. startup_valuation-1.0.0/CITATION.cff +30 -0
  8. startup_valuation-1.0.0/PKG-INFO +184 -0
  9. startup_valuation-1.0.0/README.md +146 -0
  10. startup_valuation-1.0.0/constitution.md +120 -0
  11. startup_valuation-1.0.0/docs/api/advanced.md +1 -0
  12. startup_valuation-1.0.0/docs/api/biotech.md +1 -0
  13. startup_valuation-1.0.0/docs/api/capm.md +1 -0
  14. startup_valuation-1.0.0/docs/api/comparables.md +1 -0
  15. startup_valuation-1.0.0/docs/api/core.md +1 -0
  16. startup_valuation-1.0.0/docs/api/emerging.md +1 -0
  17. startup_valuation-1.0.0/docs/api/fintech.md +1 -0
  18. startup_valuation-1.0.0/docs/api/hardware.md +1 -0
  19. startup_valuation-1.0.0/docs/api/international.md +1 -0
  20. startup_valuation-1.0.0/docs/api/marketplace.md +1 -0
  21. startup_valuation-1.0.0/docs/api/probability.md +3 -0
  22. startup_valuation-1.0.0/docs/api/saas.md +1 -0
  23. startup_valuation-1.0.0/docs/api/stakeholders.md +1 -0
  24. startup_valuation-1.0.0/docs/api/tv.md +1 -0
  25. startup_valuation-1.0.0/docs/assets/images/ascent-logo.png +0 -0
  26. startup_valuation-1.0.0/docs/assets/images/book-cover.jpg +0 -0
  27. startup_valuation-1.0.0/docs/assets/stylesheets/extra.css +306 -0
  28. startup_valuation-1.0.0/docs/chapters.md +168 -0
  29. startup_valuation-1.0.0/docs/examples/advanced-methods.md +31 -0
  30. startup_valuation-1.0.0/docs/examples/core-methods.md +41 -0
  31. startup_valuation-1.0.0/docs/examples/industry-models.md +38 -0
  32. startup_valuation-1.0.0/docs/index.md +122 -0
  33. startup_valuation-1.0.0/mcp_server/server.py +519 -0
  34. startup_valuation-1.0.0/mkdocs.yml +96 -0
  35. startup_valuation-1.0.0/pyproject.toml +75 -0
  36. startup_valuation-1.0.0/skills/valuation-advanced/SKILL.md +36 -0
  37. startup_valuation-1.0.0/skills/valuation-core/SKILL.md +43 -0
  38. startup_valuation-1.0.0/skills/valuation-emerging/SKILL.md +33 -0
  39. startup_valuation-1.0.0/skills/valuation-industry/SKILL.md +41 -0
  40. startup_valuation-1.0.0/skills/valuation-stakeholder/SKILL.md +35 -0
  41. startup_valuation-1.0.0/specs/ascent-partners-branding/plan.md +59 -0
  42. startup_valuation-1.0.0/specs/ascent-partners-branding/spec.md +99 -0
  43. startup_valuation-1.0.0/specs/ascent-partners-branding/tasks.md +37 -0
  44. startup_valuation-1.0.0/specs/book-alignment/plan.md +42 -0
  45. startup_valuation-1.0.0/specs/book-alignment/requirements.md +44 -0
  46. startup_valuation-1.0.0/specs/book-alignment/tasks.md +27 -0
  47. startup_valuation-1.0.0/specs/deployment-bugfix/plan.md +50 -0
  48. startup_valuation-1.0.0/specs/deployment-bugfix/spec.md +86 -0
  49. startup_valuation-1.0.0/specs/deployment-bugfix/tasks.md +49 -0
  50. startup_valuation-1.0.0/specs/docx-to-md-conversion/plan.md +190 -0
  51. startup_valuation-1.0.0/specs/docx-to-md-conversion/spec.md +196 -0
  52. startup_valuation-1.0.0/specs/docx-to-md-conversion/tasks.md +219 -0
  53. startup_valuation-1.0.0/specs/model-enhancement-publish/plan.md +143 -0
  54. startup_valuation-1.0.0/specs/model-enhancement-publish/spec.md +183 -0
  55. startup_valuation-1.0.0/specs/model-enhancement-publish/tasks.md +196 -0
  56. startup_valuation-1.0.0/specs/valuation-engine/plan.md +336 -0
  57. startup_valuation-1.0.0/specs/valuation-engine/spec.md +197 -0
  58. startup_valuation-1.0.0/specs/valuation-engine/tasks.md +395 -0
  59. startup_valuation-1.0.0/src/startup_valuation/__init__.py +16 -0
  60. startup_valuation-1.0.0/src/startup_valuation/advanced.py +375 -0
  61. startup_valuation-1.0.0/src/startup_valuation/biotech.py +161 -0
  62. startup_valuation-1.0.0/src/startup_valuation/capm.py +164 -0
  63. startup_valuation-1.0.0/src/startup_valuation/comparables.py +144 -0
  64. startup_valuation-1.0.0/src/startup_valuation/core.py +264 -0
  65. startup_valuation-1.0.0/src/startup_valuation/emerging.py +443 -0
  66. startup_valuation-1.0.0/src/startup_valuation/fintech.py +195 -0
  67. startup_valuation-1.0.0/src/startup_valuation/hardware.py +95 -0
  68. startup_valuation-1.0.0/src/startup_valuation/international.py +197 -0
  69. startup_valuation-1.0.0/src/startup_valuation/marketplace.py +168 -0
  70. startup_valuation-1.0.0/src/startup_valuation/probability.py +218 -0
  71. startup_valuation-1.0.0/src/startup_valuation/saas.py +167 -0
  72. startup_valuation-1.0.0/src/startup_valuation/stakeholders.py +512 -0
  73. startup_valuation-1.0.0/src/startup_valuation/tv.py +110 -0
  74. startup_valuation-1.0.0/src/startup_valuation/types.py +83 -0
  75. startup_valuation-1.0.0/tests/conftest.py +14 -0
  76. startup_valuation-1.0.0/tests/test_advanced.py +76 -0
  77. startup_valuation-1.0.0/tests/test_biotech.py +39 -0
  78. startup_valuation-1.0.0/tests/test_capm.py +25 -0
  79. startup_valuation-1.0.0/tests/test_comparables.py +38 -0
  80. startup_valuation-1.0.0/tests/test_core.py +42 -0
  81. startup_valuation-1.0.0/tests/test_emerging.py +86 -0
  82. startup_valuation-1.0.0/tests/test_fintech.py +40 -0
  83. startup_valuation-1.0.0/tests/test_hardware.py +28 -0
  84. startup_valuation-1.0.0/tests/test_international.py +49 -0
  85. startup_valuation-1.0.0/tests/test_marketplace.py +43 -0
  86. startup_valuation-1.0.0/tests/test_probability.py +39 -0
  87. startup_valuation-1.0.0/tests/test_saas.py +53 -0
  88. startup_valuation-1.0.0/tests/test_stakeholders.py +95 -0
  89. startup_valuation-1.0.0/tests/test_tv.py +20 -0
@@ -0,0 +1,36 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ env:
10
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
11
+
12
+ jobs:
13
+ test:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ matrix:
17
+ python-version: ["3.10", "3.11", "3.12"]
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - name: Set up Python ${{ matrix.python-version }}
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+
27
+ - name: Install dependencies
28
+ run: |
29
+ python -m pip install --upgrade pip
30
+ pip install -e ".[dev]"
31
+
32
+ - name: Type check
33
+ run: mypy src/startup_valuation --ignore-missing-imports
34
+
35
+ - name: Run tests
36
+ run: pytest --cov=startup_valuation --cov-report=term-missing -v
@@ -0,0 +1,52 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ permissions:
10
+ contents: read
11
+ pages: write
12
+ id-token: write
13
+
14
+ env:
15
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
16
+
17
+ jobs:
18
+ build:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: "3.12"
27
+
28
+ - name: Install dependencies
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ pip install -e ".[docs]"
32
+
33
+ - name: Build docs
34
+ run: mkdocs build --strict
35
+
36
+ - name: Upload artifact
37
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
38
+ uses: actions/upload-pages-artifact@v3
39
+ with:
40
+ path: site
41
+
42
+ deploy:
43
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
44
+ needs: build
45
+ runs-on: ubuntu-latest
46
+ environment:
47
+ name: github-pages
48
+ url: ${{ steps.deployment.outputs.page_url }}
49
+ steps:
50
+ - name: Deploy to GitHub Pages
51
+ id: deployment
52
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,56 @@
1
+ name: Publish
2
+
3
+ on:
4
+ release:
5
+ types: [created]
6
+
7
+ permissions:
8
+ contents: write
9
+ id-token: write
10
+
11
+ jobs:
12
+ build-and-upload:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.12"
21
+
22
+ - name: Install build
23
+ run: python -m pip install --upgrade build
24
+
25
+ - name: Build package
26
+ run: python -m build
27
+
28
+ - name: Upload to release
29
+ uses: softprops/action-gh-release@v2
30
+ with:
31
+ files: dist/*
32
+ env:
33
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34
+
35
+ publish-to-pypi:
36
+ needs: build-and-upload
37
+ runs-on: ubuntu-latest
38
+ environment:
39
+ name: pypi
40
+ url: https://pypi.org/p/startup-valuation
41
+ steps:
42
+ - uses: actions/checkout@v4
43
+
44
+ - name: Set up Python
45
+ uses: actions/setup-python@v5
46
+ with:
47
+ python-version: "3.12"
48
+
49
+ - name: Install build
50
+ run: python -m pip install --upgrade build
51
+
52
+ - name: Build package
53
+ run: python -m build
54
+
55
+ - name: Publish to PyPI
56
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,16 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.egg-info/
4
+ dist/
5
+ build/
6
+ .eggs/
7
+ *.egg
8
+ .pytest_cache/
9
+ .coverage
10
+ htmlcov/
11
+ .mypy_cache/
12
+ output/
13
+ Startup_Valuation.docx
14
+ convert.py
15
+ omml_to_latex.py
16
+ site/
@@ -0,0 +1,40 @@
1
+ # AGENTS.md — Startup Valuation
2
+
3
+ ## Commands
4
+
5
+ ```bash
6
+ pip install -e ".[dev]" # install with dev deps (pytest, ruff, coverage, mypy)
7
+ pytest # run all 101 tests (~6s)
8
+ pytest --cov=startup_valuation # with coverage (88%)
9
+ ruff check . # lint
10
+ mypy src/startup_valuation # type check
11
+ ```
12
+
13
+ CI runs `mypy` + `pytest --cov=... -v` on Python 3.10/3.11/3.12. Docs build with `mkdocs build --strict`.
14
+
15
+ ## Architecture
16
+
17
+ - `src/startup_valuation/` — 14 modules, 100+ functions. All return `ValuationResult` (never bare numbers).
18
+ - `src/startup_valuation/types.py` — `ValuationResult`, `Distribution`, `Scenario`, `SensitivityResult` dataclasses.
19
+ - `mcp_server/server.py` — FastMCP server with 60+ tools. Run: `cd mcp_server && python server.py`. Requires `pip install -e ".[mcp]"`.
20
+ - `skills/` — 5 AI-Agent SKILL.md files (core, advanced, industry, stakeholder, emerging).
21
+ - `docs/` — MkDocs Material site (API reference, examples, chapter index). Deployed to GitHub Pages.
22
+ - `output/` — Textbook source markdown (reference material, not generated).
23
+ - `specs/` — SDD artifacts for valuation-engine and model-enhancement-publish projects.
24
+
25
+ ## Key Conventions
26
+
27
+ - Every library function returns `ValuationResult` with `value`, `method`, `inputs`, `assumptions`, `sensitivity`, `chapter`.
28
+ - MCP tools unwrap `ValuationResult` to plain dicts (`{"value": ..., "method": ...}`) for agent consumption.
29
+ - Tests validate against textbook example values — do not change expected values without verifying against the source book.
30
+ - `scipy.stats` used for Poisson and Black-Scholes `N(d)` calculations (avoids `math.factorial` overflow).
31
+ - `scipy.integrate.quad` used for continuous expected value numerical integration.
32
+ - `numpy` used for Monte Carlo simulations.
33
+ - Per-module test files: one `test_*.py` per module in `tests/`.
34
+
35
+ ## Gotchas
36
+
37
+ - `src/` layout: must use `pip install -e` or set `PYTHONPATH=src` for imports to resolve.
38
+ - `fastmcp` is an optional dependency (`.[mcp]`) — not installed by default with `.[dev]`.
39
+ - Test tolerances use `pytest.approx(abs=N)` — textbook values have ±$1–5 rounding variance.
40
+ - MkDocs uses `mkdocstrings` for auto-generated API docs — docstrings must be Google-style.
@@ -0,0 +1,54 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [1.0.0] — 2026-05-20
11
+
12
+ ### Added
13
+ - Book-aligned documentation site with Amazon purchase link
14
+ - Book hero section on homepage with cover image and description
15
+ - Chapter-to-module mapping table
16
+ - Ascent Partners branding (logo, `#0083AB` color, Titillium Web/Open Sans fonts)
17
+ - `expected_value_continuous` — numerical integration for continuous random variables
18
+ - `binomial_valuation` — high-resolution binomial tree (steps=50) for startup options
19
+ - `payment_processor_valuation` — DCF-based payment processor valuation
20
+ - `neobank_valuation` — customer-based LTV × P/E neobank valuation
21
+ - `buyer_retention` — marketplace buyer retention rate
22
+ - `network_density` — marketplace network density ratio
23
+ - `risk_adjusted_synergy` — PV of risk-adjusted M&A synergies
24
+ - `intrinsic_option_value` — intrinsic value of equity options
25
+ - `probability_weighted_employee_value` — employee option value across scenarios
26
+ - `vesting_adjusted_value` — option value adjusted for vesting schedule
27
+ - `cash_equity_breakeven` — salary vs equity tradeoff analysis
28
+ - `max_asset_based_loan` — collateral-based maximum loan calculation
29
+ - `safe_conversion_cap` — SAFE conversion with valuation cap
30
+ - `safe_expected_value` — expected SAFE value across cap/discount
31
+ - `nvt_ratio` — Network Value to Transactions ratio for crypto
32
+ - `esg_premium_valuation` — ESG premium impact on valuation
33
+ - `esg_discount_valuation` — ESG risk discount on valuation
34
+ - `data_moat_value` — DCF of data competitive advantage
35
+ - `remote_first_premium` — remote-first company valuation premium
36
+ - 19 new MCP server tools for all new functions
37
+ - Per-module test files (14 files, one per module)
38
+ - GitHub Pages documentation site (MkDocs Material)
39
+ - `CITATION.cff` for academic referencing
40
+ - mypy type checking in CI
41
+
42
+ ### Changed
43
+ - Split monolithic test files into per-module test files
44
+ - Expanded test suite from 50 to 101 tests
45
+ - Bumped to production-stable release
46
+
47
+ ## [0.1.0] — 2026-05-19
48
+
49
+ ### Added
50
+ - Initial release: 80+ valuation formulas across 14 modules
51
+ - MCP server with 40+ tools
52
+ - 5 AI-Agent Skills
53
+ - 50 unit tests against textbook example values
54
+ - GitHub Actions CI workflow
@@ -0,0 +1,30 @@
1
+ cff-version: "1.2.0"
2
+ message: "If you use this software, please cite it as below."
3
+ title: "Startup Valuation Engine"
4
+ version: "0.2.0"
5
+ authors:
6
+ - family-names: "Mak"
7
+ given-names: "Simon"
8
+ orcid: "https://orcid.org/0000-0000-0000-0000"
9
+ abstract: >
10
+ A comprehensive Python library implementing 80+ startup valuation formulas
11
+ from the Startup Valuation textbook. Includes an MCP server for AI agents
12
+ and AI-Agent Skills for workflow guidance. Covers probability theory, time
13
+ value of money, CAPM, Scorecard, Berkus, VC Method, Black-Scholes, Monte
14
+ Carlo, SaaS metrics, biotech rNPV, fintech, marketplace, hardware,
15
+ international valuation, stakeholder analysis, and emerging topics.
16
+ keywords:
17
+ - startup valuation
18
+ - venture capital
19
+ - financial modeling
20
+ - Black-Scholes
21
+ - Monte Carlo
22
+ - MCP server
23
+ - AI agents
24
+ - SaaS metrics
25
+ - biotech valuation
26
+ - fintech
27
+ repository-code: "https://github.com/simonplmak-cloud/startup-valuation"
28
+ license: MIT
29
+ type: software
30
+ date-released: "2026-05-20"
@@ -0,0 +1,184 @@
1
+ Metadata-Version: 2.4
2
+ Name: startup-valuation
3
+ Version: 1.0.0
4
+ Summary: Comprehensive startup valuation library implementing 80+ formulas from the Startup Valuation textbook. Includes Python library, MCP server, and AI-Agent Skills.
5
+ Project-URL: Homepage, https://github.com/simonplmak-cloud/startup-valuation
6
+ Project-URL: Documentation, https://simonplmak-cloud.github.io/startup-valuation
7
+ Project-URL: Repository, https://github.com/simonplmak-cloud/startup-valuation
8
+ Project-URL: Bug Tracker, https://github.com/simonplmak-cloud/startup-valuation/issues
9
+ Author: Simon Mak
10
+ License-Expression: MIT
11
+ Keywords: ai-agent,finance,mcp,startup,valuation,vc
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Financial and Insurance Industry
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Office/Business :: Financial
21
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
22
+ Requires-Python: >=3.10
23
+ Requires-Dist: numpy>=1.24.0
24
+ Requires-Dist: scipy>=1.10.0
25
+ Provides-Extra: dev
26
+ Requires-Dist: mypy>=1.0.0; extra == 'dev'
27
+ Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
28
+ Requires-Dist: pytest>=7.4.0; extra == 'dev'
29
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
30
+ Provides-Extra: docs
31
+ Requires-Dist: mkdocs-material>=9.5.0; extra == 'docs'
32
+ Requires-Dist: mkdocs>=1.5.0; extra == 'docs'
33
+ Requires-Dist: mkdocstrings[python]>=0.24.0; extra == 'docs'
34
+ Requires-Dist: pymdown-extensions>=10.0; extra == 'docs'
35
+ Provides-Extra: mcp
36
+ Requires-Dist: fastmcp>=0.1.0; extra == 'mcp'
37
+ Description-Content-Type: text/markdown
38
+
39
+ # Startup Valuation Engine
40
+
41
+ > Comprehensive startup valuation library implementing **80+ formulas** from the Startup Valuation textbook. Python library + MCP server + AI-Agent Skills.
42
+
43
+ [![CI](https://github.com/simonplmak-cloud/startup-valuation/actions/workflows/ci.yml/badge.svg)](https://github.com/simonplmak-cloud/startup-valuation/actions/workflows/ci.yml)
44
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
45
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
46
+ [![Docs](https://img.shields.io/badge/docs-GitHub_Pages-blue)](https://simonplmak-cloud.github.io/startup-valuation/)
47
+
48
+ ## Overview
49
+
50
+ A production-grade Python library for startup valuation, implementing every formula from the **Startup Valuation** textbook. Designed for developers, financial analysts, and AI agents who need auditable, structured valuation computations.
51
+
52
+ **Three-layer architecture:**
53
+ 1. **Python Library** — 14 modules, 80+ typed functions, all returning `ValuationResult` (value + assumptions + sensitivity)
54
+ 2. **MCP Server** — 60+ tools for AI agents (Claude, OpenCode, etc.) via stdio/SSE
55
+ 3. **AI-Agent Skills** — 5 skill definitions with workflow guidance for valuation domains
56
+
57
+ ## Installation
58
+
59
+ ```bash
60
+ pip install startup-valuation # library only
61
+ pip install startup-valuation[mcp] # + MCP server
62
+ pip install startup-valuation[dev] # + pytest, ruff, coverage
63
+ ```
64
+
65
+ ## Quick Start
66
+
67
+ ### Python Library
68
+
69
+ ```python
70
+ from startup_valuation.core import scorecard_valuation, vc_method_post_money
71
+ from startup_valuation.advanced import black_scholes, scenario_analysis
72
+ from startup_valuation.types import Scenario
73
+
74
+ # Scorecard Method (pre-revenue startups)
75
+ result = scorecard_valuation(
76
+ average_valuation=1_500_000,
77
+ weights=[0.30, 0.25, 0.15, 0.10, 0.10, 0.05, 0.05],
78
+ scores=[1.25, 1.50, 1.20, 0.75, 1.00, 0.90, 1.00],
79
+ )
80
+ print(f"Scorecard: ${result.value:,.0f}") # $1,800,000
81
+
82
+ # Black-Scholes for real options (startup equity)
83
+ result = black_scholes(
84
+ underlying=20_000_000, strike=5_000_000,
85
+ risk_free_rate=0.05, volatility=0.40, time_to_maturity=1.0,
86
+ )
87
+ print(f"Option value: ${result.value:,.0f}") # $15,240,000
88
+
89
+ # Scenario Analysis
90
+ scenarios = [
91
+ Scenario("bull", 0.20, 10_000_000),
92
+ Scenario("base", 0.60, 5_000_000),
93
+ Scenario("bear", 0.20, 1_000_000),
94
+ ]
95
+ result = scenario_analysis(scenarios)
96
+ print(f"Expected value: ${result.value:,.0f}") # $5,200,000
97
+ ```
98
+
99
+ ### MCP Server (for AI Agents)
100
+
101
+ ```bash
102
+ cd mcp_server && python server.py
103
+ ```
104
+
105
+ Connect with any MCP-compatible AI agent. All 60+ valuation tools available.
106
+
107
+ ### AI-Agent Skills
108
+
109
+ Copy the `skills/` directory to your agent's skills folder:
110
+ - **`valuation-core`** — Scorecard, Berkus, VC Method, Risk Factor Summation
111
+ - **`valuation-advanced`** — Black-Scholes, Binomial, Monte Carlo, Scenario Analysis
112
+ - **`valuation-industry`** — SaaS, Biotech, Fintech, Marketplace, Hardware
113
+ - **`valuation-stakeholder`** — Dilution, OPM, PWERM, Liquidation Preference
114
+ - **`valuation-emerging`** — SAFE, Crypto (MV=PQ), ESG, Metcalfe's Law
115
+
116
+ ## Valuation Methods by Category
117
+
118
+ | Category | Methods | Chapter |
119
+ |----------|---------|---------|
120
+ | **Probability** | Expected value, joint probability, Poisson | 2 |
121
+ | **Time Value** | PV, NPV, annuity | 2 |
122
+ | **CAPM** | CAPM, portfolio beta, startup-adjusted | 2 |
123
+ | **Core** | Scorecard, Berkus, Risk Factor, VC Method | 3 |
124
+ | **Advanced** | Black-Scholes, Binomial, Monte Carlo, Scenario | 4 |
125
+ | **Comparables** | P/E, P/S, EV/EBITDA, regression-adjusted | 5 |
126
+ | **SaaS** | LTV, CAC, NRR, Magic Number, Rule of 40 | 11 |
127
+ | **Biotech** | rNPV, decision tree, peak sales, pipeline | 11 |
128
+ | **Fintech** | Payment revenue, lending, neobank, network effects | 11 |
129
+ | **Marketplace** | GMV, take rate, liquidity, network density | 11 |
130
+ | **Hardware** | TRL-adjusted, break-even, P-weighted DCF | 11 |
131
+ | **International** | PPP, CRP, currency-adjusted DCF, Damodaran | 12 |
132
+ | **Stakeholders** | Dilution, OPM, PWERM, liquidation, synergies | 13 |
133
+ | **Emerging** | SAFE, MV=PQ, ESG, Metcalfe's, data moat | 14 |
134
+
135
+ ## Why This Library?
136
+
137
+ - **Auditable** — Every function returns `ValuationResult` with value, method, inputs, assumptions, and sensitivity analysis
138
+ - **Textbook-accurate** — All formulas verified against book example values with unit tests
139
+ - **AI-ready** — MCP server and Skills for seamless AI agent integration
140
+ - **Industry-specific** — Dedicated modules for SaaS, biotech, fintech, marketplace, and hardware startups
141
+ - **Open source** — MIT license, extensible, well-documented
142
+
143
+ ## Development
144
+
145
+ ```bash
146
+ # Install dev dependencies
147
+ pip install -e ".[dev]"
148
+
149
+ # Run tests (146 tests, ~6s)
150
+ pytest
151
+
152
+ # Run with coverage
153
+ pytest --cov=startup_valuation --cov-report=term-missing
154
+
155
+ # Lint
156
+ ruff check .
157
+
158
+ # Type check
159
+ mypy src/startup_valuation
160
+ ```
161
+
162
+ ## Documentation
163
+
164
+ - **API Reference:** [GitHub Pages](https://simonplmak-cloud.github.io/startup-valuation/)
165
+ - **Chapter Index:** Maps every function to its textbook chapter
166
+ - **Examples:** Interactive code snippets for each valuation category
167
+
168
+ ## Citing This Project
169
+
170
+ ```bibtex
171
+ @software{startup_valuation_engine,
172
+ author = {Mak, Simon},
173
+ title = {Startup Valuation Engine},
174
+ year = {2026},
175
+ url = {https://github.com/simonplmak-cloud/startup-valuation},
176
+ license = {MIT},
177
+ }
178
+ ```
179
+
180
+ Based on formulas from the **Startup Valuation** textbook. See `output/` for the full textbook source in markdown.
181
+
182
+ ## License
183
+
184
+ MIT — see [LICENSE](LICENSE) for details.
@@ -0,0 +1,146 @@
1
+ # Startup Valuation Engine
2
+
3
+ > Comprehensive startup valuation library implementing **80+ formulas** from the Startup Valuation textbook. Python library + MCP server + AI-Agent Skills.
4
+
5
+ [![CI](https://github.com/simonplmak-cloud/startup-valuation/actions/workflows/ci.yml/badge.svg)](https://github.com/simonplmak-cloud/startup-valuation/actions/workflows/ci.yml)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
8
+ [![Docs](https://img.shields.io/badge/docs-GitHub_Pages-blue)](https://simonplmak-cloud.github.io/startup-valuation/)
9
+
10
+ ## Overview
11
+
12
+ A production-grade Python library for startup valuation, implementing every formula from the **Startup Valuation** textbook. Designed for developers, financial analysts, and AI agents who need auditable, structured valuation computations.
13
+
14
+ **Three-layer architecture:**
15
+ 1. **Python Library** — 14 modules, 80+ typed functions, all returning `ValuationResult` (value + assumptions + sensitivity)
16
+ 2. **MCP Server** — 60+ tools for AI agents (Claude, OpenCode, etc.) via stdio/SSE
17
+ 3. **AI-Agent Skills** — 5 skill definitions with workflow guidance for valuation domains
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ pip install startup-valuation # library only
23
+ pip install startup-valuation[mcp] # + MCP server
24
+ pip install startup-valuation[dev] # + pytest, ruff, coverage
25
+ ```
26
+
27
+ ## Quick Start
28
+
29
+ ### Python Library
30
+
31
+ ```python
32
+ from startup_valuation.core import scorecard_valuation, vc_method_post_money
33
+ from startup_valuation.advanced import black_scholes, scenario_analysis
34
+ from startup_valuation.types import Scenario
35
+
36
+ # Scorecard Method (pre-revenue startups)
37
+ result = scorecard_valuation(
38
+ average_valuation=1_500_000,
39
+ weights=[0.30, 0.25, 0.15, 0.10, 0.10, 0.05, 0.05],
40
+ scores=[1.25, 1.50, 1.20, 0.75, 1.00, 0.90, 1.00],
41
+ )
42
+ print(f"Scorecard: ${result.value:,.0f}") # $1,800,000
43
+
44
+ # Black-Scholes for real options (startup equity)
45
+ result = black_scholes(
46
+ underlying=20_000_000, strike=5_000_000,
47
+ risk_free_rate=0.05, volatility=0.40, time_to_maturity=1.0,
48
+ )
49
+ print(f"Option value: ${result.value:,.0f}") # $15,240,000
50
+
51
+ # Scenario Analysis
52
+ scenarios = [
53
+ Scenario("bull", 0.20, 10_000_000),
54
+ Scenario("base", 0.60, 5_000_000),
55
+ Scenario("bear", 0.20, 1_000_000),
56
+ ]
57
+ result = scenario_analysis(scenarios)
58
+ print(f"Expected value: ${result.value:,.0f}") # $5,200,000
59
+ ```
60
+
61
+ ### MCP Server (for AI Agents)
62
+
63
+ ```bash
64
+ cd mcp_server && python server.py
65
+ ```
66
+
67
+ Connect with any MCP-compatible AI agent. All 60+ valuation tools available.
68
+
69
+ ### AI-Agent Skills
70
+
71
+ Copy the `skills/` directory to your agent's skills folder:
72
+ - **`valuation-core`** — Scorecard, Berkus, VC Method, Risk Factor Summation
73
+ - **`valuation-advanced`** — Black-Scholes, Binomial, Monte Carlo, Scenario Analysis
74
+ - **`valuation-industry`** — SaaS, Biotech, Fintech, Marketplace, Hardware
75
+ - **`valuation-stakeholder`** — Dilution, OPM, PWERM, Liquidation Preference
76
+ - **`valuation-emerging`** — SAFE, Crypto (MV=PQ), ESG, Metcalfe's Law
77
+
78
+ ## Valuation Methods by Category
79
+
80
+ | Category | Methods | Chapter |
81
+ |----------|---------|---------|
82
+ | **Probability** | Expected value, joint probability, Poisson | 2 |
83
+ | **Time Value** | PV, NPV, annuity | 2 |
84
+ | **CAPM** | CAPM, portfolio beta, startup-adjusted | 2 |
85
+ | **Core** | Scorecard, Berkus, Risk Factor, VC Method | 3 |
86
+ | **Advanced** | Black-Scholes, Binomial, Monte Carlo, Scenario | 4 |
87
+ | **Comparables** | P/E, P/S, EV/EBITDA, regression-adjusted | 5 |
88
+ | **SaaS** | LTV, CAC, NRR, Magic Number, Rule of 40 | 11 |
89
+ | **Biotech** | rNPV, decision tree, peak sales, pipeline | 11 |
90
+ | **Fintech** | Payment revenue, lending, neobank, network effects | 11 |
91
+ | **Marketplace** | GMV, take rate, liquidity, network density | 11 |
92
+ | **Hardware** | TRL-adjusted, break-even, P-weighted DCF | 11 |
93
+ | **International** | PPP, CRP, currency-adjusted DCF, Damodaran | 12 |
94
+ | **Stakeholders** | Dilution, OPM, PWERM, liquidation, synergies | 13 |
95
+ | **Emerging** | SAFE, MV=PQ, ESG, Metcalfe's, data moat | 14 |
96
+
97
+ ## Why This Library?
98
+
99
+ - **Auditable** — Every function returns `ValuationResult` with value, method, inputs, assumptions, and sensitivity analysis
100
+ - **Textbook-accurate** — All formulas verified against book example values with unit tests
101
+ - **AI-ready** — MCP server and Skills for seamless AI agent integration
102
+ - **Industry-specific** — Dedicated modules for SaaS, biotech, fintech, marketplace, and hardware startups
103
+ - **Open source** — MIT license, extensible, well-documented
104
+
105
+ ## Development
106
+
107
+ ```bash
108
+ # Install dev dependencies
109
+ pip install -e ".[dev]"
110
+
111
+ # Run tests (146 tests, ~6s)
112
+ pytest
113
+
114
+ # Run with coverage
115
+ pytest --cov=startup_valuation --cov-report=term-missing
116
+
117
+ # Lint
118
+ ruff check .
119
+
120
+ # Type check
121
+ mypy src/startup_valuation
122
+ ```
123
+
124
+ ## Documentation
125
+
126
+ - **API Reference:** [GitHub Pages](https://simonplmak-cloud.github.io/startup-valuation/)
127
+ - **Chapter Index:** Maps every function to its textbook chapter
128
+ - **Examples:** Interactive code snippets for each valuation category
129
+
130
+ ## Citing This Project
131
+
132
+ ```bibtex
133
+ @software{startup_valuation_engine,
134
+ author = {Mak, Simon},
135
+ title = {Startup Valuation Engine},
136
+ year = {2026},
137
+ url = {https://github.com/simonplmak-cloud/startup-valuation},
138
+ license = {MIT},
139
+ }
140
+ ```
141
+
142
+ Based on formulas from the **Startup Valuation** textbook. See `output/` for the full textbook source in markdown.
143
+
144
+ ## License
145
+
146
+ MIT — see [LICENSE](LICENSE) for details.