### Development setup commands Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/CONTRIBUTING.md Commands to clone the repository, install dependencies, run tests, check coverage, lint, and type-check. ```bash git clone https://github.com/simonplmak-cloud/startup-valuation.git cd startup-valuation pip install -e ".[dev]" # Run tests pytest # Run with coverage pytest --cov=startup_valuation --cov-report=term-missing # Lint ruff check . # Type check mypy src/startup_valuation --ignore-missing-imports ``` -------------------------------- ### Python library quick start Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/README.md Demonstrates the Python library's core functions: scorecard_valuation, black_scholes, and scenario_analysis. Shows expected outputs for each example. ```python from startup_valuation.core import scorecard_valuation, vc_method_post_money from startup_valuation.advanced import black_scholes, scenario_analysis from startup_valuation.types import Scenario # Scorecard Method (pre-revenue startups) result = scorecard_valuation( average_valuation=1_500_000, weights=[0.30, 0.25, 0.15, 0.10, 0.10, 0.05, 0.05], scores=[1.25, 1.50, 1.20, 0.75, 1.00, 0.90, 1.00], ) print(f"Scorecard: ${result.value:,.0f}") # $1,800,000 # Black-Scholes for real options (startup equity) result = black_scholes( underlying=20_000_000, strike=5_000_000, risk_free_rate=0.05, volatility=0.40, time_to_maturity=1.0, ) print(f"Option value: ${result.value:,.0f}") # $15,240,000 # Scenario Analysis scenarios = [ Scenario("bull", 0.20, 10_000_000), Scenario("base", 0.60, 5_000_000), Scenario("bear", 0.20, 1_000_000), ] result = scenario_analysis(scenarios) print(f"Expected value: ${result.value:,.0f}") # $5,200,000 ``` -------------------------------- ### Development setup and testing commands Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/index.md Install the package in editable mode with dev dependencies, run tests with coverage, and check code style with ruff. ```bash pip install -e ".[dev]" pytest --cov=startup_valuation --cov-report=term-missing ruff check . ``` -------------------------------- ### Install MCP server and run stdio server Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/index.md Install the MCP extra and start the stdio server. The command can also be run via uvx. The server exposes all 14 valuation tools to MCP-compatible AI agents. ```bash pip install "startup-valuation[mcp]" startup-valuation-mcp # stdio server; or: uvx --from startup-valuation startup-valuation-mcp ``` -------------------------------- ### Show installed version Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/troubleshooting.md Check the installed version of startup-valuation. ```bash pip show startup-valuation ``` -------------------------------- ### Template for Worked Example (Markdown) Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/examples/README.md A markdown template for creating a worked example. It includes placeholders for method, module, textbook reference, and sections for business context, data preparation, method selection, step-by-step calculation, sensitivity analysis, and interpretation. Use this as a starting point for new examples. ```markdown # Worked Example: [Title] > Method: [Method Name] | Module: `[module].py` | Textbook: Chapter [N], Section [N.N] ## 1. Business Context **The Situation:** [2-3 sentences: who, what stage, what they need] **The Question:** [1 sentence: what are we calculating?] **The Approach:** [1 sentence: which method and why] ## 2. Data Preparation [All input data with sources and justifications. Tables preferred.] ## 3. Method Selection [Why this method over alternatives. What assumptions make it appropriate.] ## 4. Step-by-Step Calculation [Show each calculation step with intermediate values. Include Python code.] ### Step 1: [Name] ### Step 2: [Name] [Final result displayed prominently] ### Python Implementation [Complete, copy-pasteable code block with imports and output] ## 5. Sensitivity Analysis [Test extremes. What happens if key inputs change? Use a table.] ## 6. Interpretation **For the founders:** [What does this valuation mean for equity, fundraising?] **For investors:** [Is the valuation justified? What are the risks?] **What this valuation means:** [Actionable takeaway] ## Next Steps - [Link to related methods] - [Link to Wiki theory page] - [Link to full workflow] --- *Example uses hypothetical data for illustrative purposes. All formula implementations verified against the Startup Valuation textbook.* ``` -------------------------------- ### Install startup-valuation via pip Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/index.md Install the library using pip. This is the first step to use the library. ```bash pip install startup-valuation ``` -------------------------------- ### Install startup-valuation with extras Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/README.md Install the startup-valuation package with optional extras: [mcp] adds the MCP server, [dev] adds pytest, ruff, and mypy. ```bash pip install startup-valuation # library only pip install startup-valuation[mcp] # + MCP server pip install startup-valuation[dev] # + pytest, ruff, mypy ``` -------------------------------- ### Start MCP server Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/troubleshooting.md Start the MCP server to resolve connection refused errors. ```bash startup-valuation-mcp ``` -------------------------------- ### Install and verify AI Agent Skills for OpenCode Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/agent-skills.md Copy the skills directory to the OpenCode skills folder and verify the installation. The second command lists the installed skills, showing the six available skill folders. ```bash cp -r /path/to/startup-valuation/skills ~/.config/opencode/skills/ ``` ```bash ls ~/.config/opencode/skills/ # valuation-core valuation-advanced valuation-industry valuation-stakeholder valuation-emerging valuation-foundations ``` -------------------------------- ### Install pre-commit hooks Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/CONTRIBUTING.md Commands to install pre-commit hooks that run ruff automatically on each commit. ```bash pip install pre-commit pre-commit install ``` -------------------------------- ### portfolio_expected_return example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/probability.md Calculates the expected return of a portfolio using `portfolio_expected_return`. The example supplies probabilities and corresponding returns, and prints the result as a percentage. ```python from startup_valuation.probability import portfolio_expected_return result = portfolio_expected_return( probabilities=[0.10, 0.60, 0.20, 0.10], returns=[-1.00, 0.10, 0.50, 2.00], ) print(f"Expected return: {result.value:.2%}") # 15.00% ``` -------------------------------- ### Run MCP server locally (stdio) Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/README.md Install and run the MCP server locally via stdio. The console script startup-valuation-mcp is installed with the [mcp] extra; alternatives include python -m startup_valuation.mcp or uvx --from startup-valuation startup-valuation-mcp. ```bash pip install "startup-valuation[mcp]" startup-valuation-mcp # console script installed with the [mcp] extra # or: python -m startup_valuation.mcp # or ephemeral, no clone: uvx --from startup-valuation startup-valuation-mcp ``` -------------------------------- ### venture_debt_dilution example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/stakeholders.md Calculates dilution from venture debt based on loan amount, warrant coverage, and post-money valuation. The example yields 2.00% dilution. ```python from startup_valuation.stakeholders import venture_debt_dilution result = venture_debt_dilution( loan_amount=5_000_000, warrant_coverage=0.20, post_money=50_000_000, ) print(f"Dilution: {result.value:.2%}") # 2.00% ``` -------------------------------- ### acquisition_value example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/stakeholders.md Computes the acquisition value by adding synergies and subtracting integration costs from the standalone value. The example yields $125,000,000. ```python from startup_valuation.stakeholders import acquisition_value result = acquisition_value( standalone_value=100_000_000, synergies=30_000_000, integration_costs=5_000_000, ) print(f"Acquisition value: ${result.value:,.0f}") # $125,000,000 ``` -------------------------------- ### Gross margin hardware example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/hardware.md Computes the gross margin for hardware using the gross_margin_hardware function. With an ASP of $500 and COGS of $200, the example prints a 60% gross margin. ```python from startup_valuation.hardware import gross_margin_hardware result = gross_margin_hardware(asp=500, cogs=200) print(f"Gross margin: {result.value:.0%}") # 60% ``` -------------------------------- ### Install MCP extras Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/troubleshooting.md Install the MCP extras to resolve the 'fastmcp not found' error. ```bash pip install startup-valuation[mcp] ``` -------------------------------- ### max_loan_portfolio example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/fintech.md Calculates the maximum loan portfolio size based on equity and capital ratio. The example shows a result of $100,000,000 for $10M equity at a 10% capital ratio. ```python from startup_valuation.fintech import max_loan_portfolio result = max_loan_portfolio(equity=10_000_000, capital_ratio=0.10) print(f"Max portfolio: ${result.value:,.0f}") # $100,000,000 ``` -------------------------------- ### pwerm example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/stakeholders.md Calculates the Probability-Weighted Expected Return Method (PWERM) value from a list of scenarios with probabilities and common values. The example yields $40,000,000. ```python from startup_valuation.stakeholders import pwerm scenarios = [ {"probability": 0.20, "common_value": 80_000_000}, {"probability": 0.60, "common_value": 40_000_000}, {"probability": 0.20, "common_value": 0}, ] result = pwerm(scenarios) print(f"PWERM value: ${result.value:,.0f}") # $40,000,000 ``` -------------------------------- ### scorecard_valuation example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/core.md Calculates a startup valuation using the scorecard method. The function takes an average valuation, weights for each factor, and scores, returning a result with a value attribute. The example prints the resulting value formatted as currency, showing an output of $1,800,000. ```python from startup_valuation.core import scorecard_valuation result = scorecard_valuation( average_valuation=1_500_000, weights=[0.30, 0.25, 0.15, 0.10, 0.10, 0.05, 0.05], scores=[1.25, 1.50, 1.20, 0.75, 1.00, 0.90, 1.00], ) print(f"Scorecard: ${result.value:,.0f}") # $1,800,000 ``` -------------------------------- ### vc_method_pre_money example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/core.md Calculates the pre-money valuation using the venture capital method. The function takes the post-money valuation and the investment amount, returning a result with a value attribute. The example prints the resulting value as currency, showing an output of $45,000,000. ```python from startup_valuation.core import vc_method_pre_money result = vc_method_pre_money(post_money=50_000_000, investment=5_000_000) print(f"Pre-money: ${result.value:,.0f}") # $45,000,000 ``` -------------------------------- ### payment_revenue example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/fintech.md Calculates revenue from payment processing based on transaction volume and take rate. The example shows a result of $20,000,000 for a $1B transaction volume at a 2% take rate. ```python from startup_valuation.fintech import payment_revenue result = payment_revenue(transaction_volume=1_000_000_000, take_rate=0.02) print(f"Revenue: ${result.value:,.0f}") # $20,000,000 ``` -------------------------------- ### Break-even volume example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/hardware.md Calculates the break-even volume using the break_even_volume function. With fixed costs of $1M, an ASP of $500, and variable cost of $200, the example prints 3,333 units. ```python from startup_valuation.hardware import break_even_volume result = break_even_volume(fixed_costs=1_000_000, asp=500, variable_cost=200) print(f"Break-even volume: {result.value:,.0f} units") # 3,333 units ``` -------------------------------- ### lending_fintech_valuation example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/fintech.md Calculates the valuation of a lending fintech based on loan book, return on equity, PE multiple, and non-performing loan reserves. The example shows a result of $890,000,000. ```python from startup_valuation.fintech import lending_fintech_valuation result = lending_fintech_valuation( loan_book=500_000_000, roe=0.15, pe_multiple=12, npl_reserves=10_000_000, ) print(f"Valuation: ${result.value:,.0f}") # $890,000,000 ``` -------------------------------- ### liquidity example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/marketplace.md Calculates marketplace liquidity as the ratio of successful attempts to total attempts. The result is printed as a percentage, e.g., 80%. ```python from startup_valuation.marketplace import liquidity result = liquidity(successful_attempts=800, total_attempts=1_000) print(f"Liquidity: {result.value:.0%}") # 80% ``` -------------------------------- ### Probability-weighted DCF example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/hardware.md Computes a probability-weighted DCF using the probability_weighted_dcf function. The example defines three scenarios with probabilities and cash flows, uses a 15% discount rate, and prints the expected value. ```python from startup_valuation.hardware import probability_weighted_dcf scenarios = [ {"probability": 0.20, "cash_flows": [0, 0, 50_000_000, 100_000_000]}, {"probability": 0.60, "cash_flows": [0, 0, 20_000_000, 40_000_000]}, {"probability": 0.20, "cash_flows": [0, 0, -10_000_000, 0]}, ] result = probability_weighted_dcf(scenarios, discount_rate=0.15) print(f"Expected value: ${result.value:,.0f}") ``` -------------------------------- ### berkus_valuation example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/core.md Calculates a startup valuation using the Berkus method. The function takes monetary values for five key factors (sound idea, prototype, quality team, strategic relationships, product rollout) and returns a result with a value attribute. The example prints the resulting value as currency, showing an output of $1,900,000. ```python from startup_valuation.core import berkus_valuation result = berkus_valuation( sound_idea=500_000, prototype=400_000, quality_team=500_000, strategic_relationships=500_000, product_rollout=0, ) print(f"Berkus: ${result.value:,.0f}") # $1,900,000 ``` -------------------------------- ### neobank_valuation example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/fintech.md Calculates the valuation of a neobank based on customer count, average revenue per user, gross margin, churn rate, and PE multiple. The example shows a result of $45,000,000. ```python from startup_valuation.fintech import neobank_valuation result = neobank_valuation( customers=500_000, arpu=100, gross_margin=0.60, churn_rate=0.10, pe_multiple=15, ) print(f"Neobank value: ${result.value:,.0f}") # $45,000,000 ``` -------------------------------- ### take_rate example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/marketplace.md Calculates the take rate as a percentage of revenue over GMV. The result is printed as a percentage with two decimal places, e.g., 2.00%. ```python from startup_valuation.marketplace import take_rate result = take_rate(revenue=200_000, gmv=10_000_000) print(f"Take rate: {result.value:.2%}") # 2.00% ``` -------------------------------- ### risk_adjusted_synergy example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/stakeholders.md Calculates risk-adjusted synergy value by discounting revenue and cost synergies with their respective probabilities over a given period. ```python from startup_valuation.stakeholders import risk_adjusted_synergy result = risk_adjusted_synergy( revenue_synergies=20_000_000, cost_synergies=10_000_000, prob_revenue=0.40, prob_cost=0.80, discount_rate=0.10, years=3, ) print(f"Risk-adjusted synergy: ${result.value:,.0f}") ``` -------------------------------- ### vc_method_post_money example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/core.md Calculates the post-money valuation using the venture capital method. The function takes a terminal value and a target return multiple, returning a result with a value attribute. The example prints the resulting value as currency, showing an output of $50,000,000. ```python from startup_valuation.core import vc_method_post_money result = vc_method_post_money(terminal_value=500_000_000, target_return=10) print(f"Post-money: ${result.value:,.0f}") # $50,000,000 ``` -------------------------------- ### Check SKILL.md header Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/troubleshooting.md Displays the first line of the SKILL.md file to verify it starts with the required '# Skill:' header. The expected output is '# Skill: valuation-core'. ```bash head -1 ~/.config/opencode/skills/valuation-core/SKILL.md # Should show: # Skill: valuation-core ``` -------------------------------- ### assumptions.json example with provenance fields Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/etl/data/README.md Example JSON structure for market/economic assumptions. Each row must include source_url, source_name, source_retrieved_at, and source_version; rows missing any field are rejected at import. Values shown are illustrative and must be replaced with real data before running pnpm etl:import. ```json [ { "name": "Risk-Free Rate (10Y Treasury)", "value": 0.042, "unit": "decimal", "valid_from": "2026-08-01T00:00:00Z", "source_url": "https://www.federalreserve.gov/releases/h15/", "source_name": "Federal Reserve H.15", "source_retrieved_at": "2026-08-12T00:00:00Z", "source_version": "2026-08-11 release" } ] ``` -------------------------------- ### buyer_retention example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/marketplace.md Calculates buyer retention as the ratio of repeat buyers to total buyers in a period. The result is printed as a percentage, e.g., 60%. ```python from startup_valuation.marketplace import buyer_retention result = buyer_retention(buyers_period_1=1_000, buyers_repeat=600) print(f"Buyer retention: {result.value:.0%}") # 60% ``` -------------------------------- ### net_present_value example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/tv.md Calculates the net present value of a series of cash flows using the net_present_value function. The example uses an initial investment of -$1,000,000 followed by positive cash flows, a 10% rate, and prints the NPV formatted to zero decimal places. ```python from startup_valuation.tv import net_present_value result = net_present_value( cash_flows=[-1_000_000, 300_000, 400_000, 500_000, 600_000], rate=0.10, ) print(f"NPV: ${result.value:,.0f}") # $348,941 ``` -------------------------------- ### risk_factor_summation example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/core.md Calculates a startup valuation using the risk factor summation method. The function takes a base valuation and a list of risk ratings (each typically -1, 0, or 1) and returns a result with a value attribute. The example prints the resulting value as currency, showing an output of $2,750,000. ```python from startup_valuation.core import risk_factor_summation result = risk_factor_summation( base_valuation=2_000_000, risk_ratings=[1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0], ) print(f"Risk-adjusted: ${result.value:,.0f}") # $2,750,000 ``` -------------------------------- ### network_value example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/marketplace.md Calculates network value based on user count, alpha, and k. The result is printed with a dollar sign and comma formatting. ```python from startup_valuation.marketplace import network_value result = network_value(users=1_000_000, alpha=1.5, k=0.01) print(f"Network value: ${result.value:,.0f}") ``` -------------------------------- ### Calculate NRR with net_revenue_retention() Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/saas.md Calculates net revenue retention (NRR) as a percentage. The example uses starting revenue of $1,000,000 and ending revenue of $1,200,000, yielding 120%. ```python from startup_valuation.saas import net_revenue_retention result = net_revenue_retention(revenue_start=1_000_000, revenue_end=1_200_000) print(f"NRR: {result.value:.0%}") # 120% ``` -------------------------------- ### Development setup and testing commands Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/README.md Commands for setting up the development environment, running tests with coverage, linting with Ruff, and type checking with mypy. Use after cloning the repository to verify the codebase. ```bash # Install dev dependencies pip install -e ".[dev]" # Run tests pytest # Run with coverage pytest --cov=startup_valuation --cov-report=term-missing # Lint ruff check . # Type check mypy src/startup_valuation --ignore-missing-imports ``` -------------------------------- ### Upgrade startup-valuation Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/troubleshooting.md Upgrade to the latest version to fix unexpected behavior or missing functions. ```bash pip install --upgrade startup-valuation ``` -------------------------------- ### Marketplace: Calculate Take Rate and GMV Valuation Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/examples/industry-models.md Use the take_rate and gmv_multiple_valuation functions from startup_valuation.marketplace. The example shows a take rate of 11.7% for revenue $2.9B and GMV $24.7B, and a valuation of $59.3B for GMV $24.7B with a multiple of 2.4. ```python from startup_valuation.marketplace import gmv_multiple_valuation, take_rate tr = take_rate(revenue=2_900_000_000, gmv=24_700_000_000) print(f"Take rate: {tr.value:.1%}") # 11.7% val = gmv_multiple_valuation(gmv=24_700_000_000, multiple=2.4) print(f"Valuation: ${val.value/1e9:.1f}B") # $59.3B ``` -------------------------------- ### liquidation_value example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/stakeholders.md Computes liquidation value by applying recovery rates to asset categories. The example yields $16,200,000. ```python from startup_valuation.stakeholders import liquidation_value assets = {"cash": 5_000_000, "ar": 10_000_000, "inventory": 8_000_000} recovery_rates = {"cash": 1.0, "ar": 0.80, "inventory": 0.40} result = liquidation_value(assets, recovery_rates) print(f"Liquidation: ${result.value:,.0f}") # $16,200,000 ``` -------------------------------- ### multi_round_dilution example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/stakeholders.md Calculates ownership dilution across multiple investment rounds. The example shows a final ownership of 76.5% after three rounds. ```python from startup_valuation.stakeholders import multi_round_dilution rounds = [ {"investment": 2_000_000, "post_money": 20_000_000}, {"investment": 5_000_000, "post_money": 50_000_000}, {"investment": 10_000_000, "post_money": 100_000_000}, ] result = multi_round_dilution(ownership_before=1.0, rounds=rounds) print(f"Final ownership: {result.value:.0%}") # 76.5% ``` -------------------------------- ### Import functions from correct modules Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/troubleshooting.md Correct import statements for the startup_valuation library, resolving ImportError by importing from the proper modules. ```python # Core methods from startup_valuation.core import scorecard_valuation, berkus_valuation # Advanced methods from startup_valuation.advanced import black_scholes, monte_carlo_valuation # Industry-specific from startup_valuation.saas import ltv_saas, cac from startup_valuation.biotech import rnPV, decision_tree_ev # All types from startup_valuation.types import ValuationResult, Scenario, Distribution ``` -------------------------------- ### valuation_core Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/mcp-server.md Pre-revenue core methods: Scorecard, Berkus, Risk-Factor Summation, VC Method, and exit terminal value. Use these first for early-stage startups. ```APIDOC ## valuation_core ### Description Pre-revenue core methods: Scorecard, Berkus, Risk-Factor Summation, VC Method, and exit terminal value. Use these first for early-stage startups. ### Method `valuation_core` ### Parameters - `method` (string) - Required - The formula to use. One of: `scorecard`, `berkus`, `risk_factor`, `vc_post_money`, `vc_pre_money`, `terminal_value`, `triangulated`. - `average_valuation` (number) - Required for `scorecard` and `triangulated` - Average valuation of comparable startups. - `weights` (array) - Required for `scorecard` and `triangulated` - Weights for the 7 factors. - `scores` (array) - Required for `scorecard` and `triangulated` - Scores for the 7 factors. - `sound_idea` (number) - Required for `berkus` - Award for sound idea. - `prototype` (number) - Required for `berkus` - Award for prototype. - `quality_team` (number) - Required for `berkus` - Award for quality team. - `strategic_relationships` (number) - Required for `berkus` - Award for strategic relationships. - `product_rollout` (number) - Required for `berkus` - Award for product rollout. - `base_valuation` (number) - Required for `risk_factor` - Base valuation. - `risk_ratings` (array) - Required for `risk_factor` - Ratings for 12 risks. - `terminal_value` (number) - Required for `vc_post_money` and `triangulated` - Terminal value. - `target_return` (number) - Required for `vc_post_money` and `triangulated` - Target return on investment. - `post_money` (number) - Required for `vc_pre_money` - Post-money valuation. - `investment` (number) - Required for `vc_pre_money` and `triangulated` - Investment amount. - `projected_revenue` (number) - Required for `terminal_value` - Projected revenue. - `multiple` (number) - Required for `terminal_value` - Valuation multiple. ### Response Returns an object with fields: `value`, `method`, `inputs`, `assumptions`, `chapter`, `formula_number`, `steps`. ### Methods #### scorecard Computes V = V_avg · Σ(wᵢ·sᵢ) across 7 factors. #### berkus Computes V = Σ factor awards, each capped at $500K. #### risk_factor Computes V = V_base + Σ(rᵢ·$250K) over 12 risks. #### vc_post_money Computes Post = Terminal / target ROI. #### vc_pre_money Computes Pre = Post - Investment. #### terminal_value Computes Terminal = projected revenue × multiple. #### triangulated Runs Scorecard and the VC Method together and returns their mean. ``` -------------------------------- ### Add trigger keywords to SKILL.md Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/troubleshooting.md Example of a 'When to Use' section in a SKILL.md file that includes trigger keywords to help the agent recognize when to apply the skill. Include phrases users commonly say, such as 'value my SaaS' or 'SaaS valuation', and terms like ARR, MRR, churn, or LTV. ```markdown ## When to Use - User says "value my SaaS" or "SaaS valuation" - User mentions ARR, MRR, churn, or LTV ``` -------------------------------- ### probability_weighted_value example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/probability.md Computes a probability-weighted value using `probability_weighted_value`. The example provides parallel lists of probabilities and values, and prints the result as currency. ```python from startup_valuation.probability import probability_weighted_value result = probability_weighted_value( probabilities=[0.10, 0.70, 0.20], values=[0, 5_000_000, 20_000_000], ) print(f"Weighted value: ${result.value:,.0f}") # $7,500,000 ``` -------------------------------- ### SaaS: Calculate LTV and Rule of 40 Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/examples/industry-models.md Use the ltv_saas and rule_of_40 functions from startup_valuation.saas. The example shows an LTV of $1,600 for ARPU $100, gross margin 80%, and churn 5%, and a Rule of 40 score of 60% for growth 50% and profit margin 10%. ```python from startup_valuation.saas import ltv_saas, rule_of_40 ltv = ltv_saas(arpu=100, gross_margin=0.80, churn_rate=0.05) print(f"LTV: ${ltv.value:,.0f}") # $1,600 rule = rule_of_40(growth_rate=0.50, profit_margin=0.10) print(f"Rule of 40: {rule.value:.0%}") # 60% ✓ ``` -------------------------------- ### Verification commands for new valuation method Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/CONTRIBUTING.md Commands to run tests, lint, type check, and build documentation to verify a new valuation method. ```bash pytest --cov=startup_valuation -v ruff check . mypy src/startup_valuation --ignore-missing-imports mkdocs build --strict ``` -------------------------------- ### probability_weighted_employee_value example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/stakeholders.md Calculates the probability-weighted expected value of employee equity based on scenario probabilities and value per share. The example yields $170,000. ```python from startup_valuation.stakeholders import probability_weighted_employee_value scenarios = [ {"probability": 0.10, "value_per_share": 50}, {"probability": 0.60, "value_per_share": 20}, {"probability": 0.30, "value_per_share": 0}, ] result = probability_weighted_employee_value(scenarios, shares=10_000) print(f"Expected value: ${result.value:,.0f}") # $170,000 ``` -------------------------------- ### single_round_dilution example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/stakeholders.md Calculates ownership dilution after a single investment round. The example shows a 90% ownership after a $5M investment on a $50M post-money valuation. ```python from startup_valuation.stakeholders import single_round_dilution result = single_round_dilution( ownership_before=1.0, investment=5_000_000, post_money=50_000_000, ) print(f"Ownership after: {result.value:.0%}") # 90% ``` -------------------------------- ### intrinsic_option_value example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/stakeholders.md Computes the intrinsic value of stock options based on strike price, fair market value, and number of shares. The example yields $1,500,000. ```python from startup_valuation.stakeholders import intrinsic_option_value result = intrinsic_option_value( strike_price=10, fair_market_value=25, shares=100_000, ) print(f"Intrinsic value: ${result.value:,.0f}") # $1,500,000 ``` -------------------------------- ### network_effects_value example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/fintech.md Calculates the value of network effects based on user count, alpha, and a scaling constant. The example uses 1M users, alpha=1.5, and k=0.01. ```python from startup_valuation.fintech import network_effects_value result = network_effects_value(users=1_000_000, alpha=1.5, k=0.01) print(f"Network value: ${result.value:,.0f}") ``` -------------------------------- ### Scorecard Valuation with startup_valuation.core Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/examples/valuing-pre-revenue-saas.md Uses the scorecard_valuation function from the startup_valuation package to compute a pre-money valuation for a pre-revenue SaaS company. Pass the average valuation of comparable deals, the factor weights, and the factor scores. The result object exposes the computed value, the multiplier, and the assumptions used. ```python from startup_valuation.core import scorecard_valuation result = scorecard_valuation( average_valuation=2_000_000, weights=[0.30, 0.25, 0.15, 0.10, 0.10, 0.05, 0.05], scores=[1.50, 1.25, 1.20, 0.75, 1.00, 0.90, 1.00], ) print(f"Scorecard Valuation: ${result.value:,.0f}") # Scorecard Valuation: $2,425,000 print(f"Multiplier: {result.value / 2_000_000:.4f}x") # Multiplier: 1.2125x print(f"Assumptions: {result.assumptions}") # ['Average valuation is from comparable regional deals', # 'Scores are relative to average (1.0 = average)', # 'Weights reflect factor importance for this stage'] ``` -------------------------------- ### poisson_probability example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/probability.md Computes the Poisson probability for a given rate and count using `poisson_probability`. The example uses `lambda_rate=3` and `k=2`, printing the result to four decimal places. ```python from startup_valuation.probability import poisson_probability result = poisson_probability(lambda_rate=3, k=2) print(f"P(X=2) with λ=3: {result.value:.4f}") # 0.2240 ``` -------------------------------- ### List OpenCode skills directory Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/troubleshooting.md Lists the skills directory for OpenCode to verify that all expected skill folders are present. The expected output shows the five skill directories: valuation-core, valuation-advanced, valuation-industry, valuation-stakeholder, and valuation-emerging. ```bash ls ~/.config/opencode/skills/ # Should show: valuation-core valuation-advanced valuation-industry valuation-stakeholder valuation-emerging ``` -------------------------------- ### joint_probability example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/probability.md Calculates the joint probability of independent events using `joint_probability`. The example passes a list of probabilities and prints the result formatted to four decimal places. ```python from startup_valuation.probability import joint_probability result = joint_probability([0.80, 0.70, 0.90]) print(f"Joint probability: {result.value:.4f}") # 0.5040 ``` -------------------------------- ### expected_value_discrete example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/probability.md Calculates the expected value of a discrete distribution using the `expected_value_discrete` function. The example uses outcomes and probabilities arrays, and prints the result formatted as currency. ```python from startup_valuation.probability import expected_value_discrete result = expected_value_discrete( outcomes=[1_000_000, 5_000_000, 10_000_000], probabilities=[0.20, 0.60, 0.20], ) print(f"Expected value: ${result.value:,.0f}") # $5,200,000 ``` -------------------------------- ### network_density example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/marketplace.md Calculates network density based on active buyers, active sellers, and total users. The result is printed as a decimal with four places. ```python from startup_valuation.marketplace import network_density result = network_density(active_buyers=500, active_sellers=300, total_users=1_000) print(f"Network density: {result.value:.4f}") ``` -------------------------------- ### expected_value_continuous example Source: https://github.com/simonplmak-cloud/startup-valuation/blob/main/docs/api/probability.md Computes the expected value of a continuous distribution using `expected_value_continuous`. The example passes a normal PDF from `scipy.stats` and integration bounds, printing the result to four decimal places. ```python import scipy.stats from startup_valuation.probability import expected_value_continuous result = expected_value_continuous( pdf_func=scipy.stats.norm(0, 1).pdf, lower=-10, upper=10, ) print(f"Expected value: {result.value:.4f}") # 0.0000 ```