@v587d/capital-generation 2.7.7 → 2.7.9
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.
- package/CHANGELOG.md +124 -0
- package/README.md +7 -5
- package/THIRD_PARTY_NOTICES.md +24 -3
- package/capital-config/client.js +4 -4
- package/capital-config/package.json +1 -1
- package/capital-watchlist/client.js +3 -3
- package/capital-watchlist/client.src.cjs +4 -4
- package/capital-watchlist/package.json +1 -1
- package/chart-ui/package.json +1 -1
- package/lib/agents/selected-skills-provider.js +41 -8
- package/lib/chart/source-token.js +18 -3
- package/lib/data-collector/dataset-tools.js +4 -2
- package/lib/data-collector/describe.d.ts +4 -0
- package/lib/data-collector/describe.js +11 -1
- package/lib/index.d.ts +17 -0
- package/lib/index.js +50 -18
- package/lib/web-retriever/local-fetch.d.ts +1 -1
- package/lib/web-retriever/local-fetch.js +1 -1
- package/lib/web-retriever/wind-client.d.ts +1 -1
- package/lib/web-retriever/wind-client.js +1 -1
- package/package.json +3 -1
- package/preset/capital-generation/agent.patch.yml +1 -0
- package/preset/capital-generation/skills/capital-data-protocol/SKILL.md +4 -0
- package/preset/capital-generation/skills/capital-equity-research/SKILL.md +1 -1
- package/preset/capital-generation/skills/capital-orchestration/SKILL.md +5 -0
- package/preset/capital-generation/skills/capital-visualization-protocol/SKILL.md +7 -7
- package/preset/capital-generation/skills/capital-web-protocol/SKILL.md +10 -3
- package/selected-skills/README.md +3 -1
- package/selected-skills/catalog.js +183 -0
- package/selected-skills/financeskills/LICENSE +21 -0
- package/selected-skills/financeskills/UPSTREAM.md +202 -0
- package/selected-skills/financeskills/skills/ai-anomaly-detection/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/ai-anomaly-detection/SKILL.md +84 -0
- package/selected-skills/financeskills/skills/ai-anomaly-detection/references/feature-engineering.md +20 -0
- package/selected-skills/financeskills/skills/ai-anomaly-detection/references/ml-algorithms.md +28 -0
- package/selected-skills/financeskills/skills/aro-computation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/aro-computation/SKILL.md +82 -0
- package/selected-skills/financeskills/skills/aro-computation/references/aro-standards.md +22 -0
- package/selected-skills/financeskills/skills/aro-computation/references/pv-math.md +27 -0
- package/selected-skills/financeskills/skills/audit-checklist/EXAMPLE.md +17 -0
- package/selected-skills/financeskills/skills/audit-checklist/SKILL.md +77 -0
- package/selected-skills/financeskills/skills/audit-checklist/references/internal-controls.md +36 -0
- package/selected-skills/financeskills/skills/audit-checklist/references/isa-standards.md +26 -0
- package/selected-skills/financeskills/skills/automated-reconciliation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/automated-reconciliation/SKILL.md +87 -0
- package/selected-skills/financeskills/skills/automated-reconciliation/assets/reconciliation-statement-template.md +31 -0
- package/selected-skills/financeskills/skills/automated-reconciliation/references/fuzzy-logic.md +27 -0
- package/selected-skills/financeskills/skills/automated-reconciliation/references/rec-controls.md +28 -0
- package/selected-skills/financeskills/skills/banking-compliance/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/banking-compliance/SKILL.md +82 -0
- package/selected-skills/financeskills/skills/banking-compliance/references/basel-iii-framework.md +26 -0
- package/selected-skills/financeskills/skills/banking-compliance/references/risk-weights.md +32 -0
- package/selected-skills/financeskills/skills/budget-forecast/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/budget-forecast/SKILL.md +87 -0
- package/selected-skills/financeskills/skills/budget-forecast/references/forecasting-best-practices.md +26 -0
- package/selected-skills/financeskills/skills/budget-forecast/references/scenario-analysis.md +25 -0
- package/selected-skills/financeskills/skills/close-management/EXAMPLE.md +17 -0
- package/selected-skills/financeskills/skills/close-management/SKILL.md +85 -0
- package/selected-skills/financeskills/skills/close-management/references/close-task-library.md +32 -0
- package/selected-skills/financeskills/skills/company-valuation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/company-valuation/SKILL.md +80 -0
- package/selected-skills/financeskills/skills/company-valuation/references/terminal-value-guide.md +33 -0
- package/selected-skills/financeskills/skills/corporate-consolidation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/corporate-consolidation/SKILL.md +84 -0
- package/selected-skills/financeskills/skills/corporate-consolidation/references/consolidation-standard.md +28 -0
- package/selected-skills/financeskills/skills/corporate-consolidation/references/minority-interest.md +25 -0
- package/selected-skills/financeskills/skills/credit-analysis/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/credit-analysis/SKILL.md +84 -0
- package/selected-skills/financeskills/skills/credit-analysis/references/covenant-guide.md +26 -0
- package/selected-skills/financeskills/skills/crypto-accounting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/crypto-accounting/SKILL.md +81 -0
- package/selected-skills/financeskills/skills/crypto-accounting/references/fasb-crypto.md +26 -0
- package/selected-skills/financeskills/skills/crypto-accounting/references/ifrs-crypto.md +25 -0
- package/selected-skills/financeskills/skills/cvp-breakeven/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/cvp-breakeven/SKILL.md +78 -0
- package/selected-skills/financeskills/skills/cvp-breakeven/references/cvp-patterns.md +28 -0
- package/selected-skills/financeskills/skills/debt-payoff/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/debt-payoff/SKILL.md +94 -0
- package/selected-skills/financeskills/skills/debt-payoff/references/debt-strategies.md +32 -0
- package/selected-skills/financeskills/skills/debt-payoff/references/interest-calculations.md +27 -0
- package/selected-skills/financeskills/skills/debt-restructuring/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/debt-restructuring/SKILL.md +79 -0
- package/selected-skills/financeskills/skills/debt-restructuring/references/creditor-priority.md +26 -0
- package/selected-skills/financeskills/skills/debt-restructuring/references/restructuring-types.md +24 -0
- package/selected-skills/financeskills/skills/deferred-tax/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/deferred-tax/SKILL.md +86 -0
- package/selected-skills/financeskills/skills/deferred-tax/references/td-catalogue.md +39 -0
- package/selected-skills/financeskills/skills/earned-value-mgmt/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/earned-value-mgmt/SKILL.md +79 -0
- package/selected-skills/financeskills/skills/earned-value-mgmt/references/forecasting-eac.md +27 -0
- package/selected-skills/financeskills/skills/earned-value-mgmt/references/pmi-evm.md +29 -0
- package/selected-skills/financeskills/skills/ecl-computation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/ecl-computation/SKILL.md +85 -0
- package/selected-skills/financeskills/skills/ecl-computation/references/ifrs9-standard.md +27 -0
- package/selected-skills/financeskills/skills/ecl-computation/references/risk-modeling.md +26 -0
- package/selected-skills/financeskills/skills/esg-reporting/EXAMPLE.md +17 -0
- package/selected-skills/financeskills/skills/esg-reporting/SKILL.md +79 -0
- package/selected-skills/financeskills/skills/esg-reporting/references/ghg-protocol.md +22 -0
- package/selected-skills/financeskills/skills/esg-reporting/references/sasb-map.md +25 -0
- package/selected-skills/financeskills/skills/financial-analysis/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/financial-analysis/SKILL.md +108 -0
- package/selected-skills/financeskills/skills/financial-analysis/assets/analysis-memo-template.md +31 -0
- package/selected-skills/financeskills/skills/financial-analysis/references/accounting-standards.md +45 -0
- package/selected-skills/financeskills/skills/financial-analysis/references/ratio-definitions.md +14 -0
- package/selected-skills/financeskills/skills/fixed-asset-accounting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/fixed-asset-accounting/SKILL.md +78 -0
- package/selected-skills/financeskills/skills/fixed-asset-accounting/references/useful-life-guide.md +30 -0
- package/selected-skills/financeskills/skills/forensic-accounting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/forensic-accounting/SKILL.md +91 -0
- package/selected-skills/financeskills/skills/forensic-accounting/references/benfords-law.md +24 -0
- package/selected-skills/financeskills/skills/forensic-accounting/references/fraud-triangle.md +26 -0
- package/selected-skills/financeskills/skills/insurance-reserving/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/insurance-reserving/SKILL.md +82 -0
- package/selected-skills/financeskills/skills/insurance-reserving/references/actuarial-methods.md +33 -0
- package/selected-skills/financeskills/skills/insurance-reserving/references/insurance-metrics.md +26 -0
- package/selected-skills/financeskills/skills/intercompany-accounting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/intercompany-accounting/SKILL.md +79 -0
- package/selected-skills/financeskills/skills/intercompany-accounting/references/elimination-entries.md +35 -0
- package/selected-skills/financeskills/skills/inventory-costing/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/inventory-costing/SKILL.md +80 -0
- package/selected-skills/financeskills/skills/inventory-costing/references/costing-examples.md +31 -0
- package/selected-skills/financeskills/skills/investment-analysis/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/investment-analysis/SKILL.md +82 -0
- package/selected-skills/financeskills/skills/investment-analysis/references/competitive-advantage.md +31 -0
- package/selected-skills/financeskills/skills/investment-analysis/references/valuation-guide.md +29 -0
- package/selected-skills/financeskills/skills/journal-entry/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/journal-entry/SKILL.md +94 -0
- package/selected-skills/financeskills/skills/journal-entry/assets/journal-entry-template.md +21 -0
- package/selected-skills/financeskills/skills/journal-entry/references/entry-patterns.md +51 -0
- package/selected-skills/financeskills/skills/lbo-modeling/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/lbo-modeling/SKILL.md +88 -0
- package/selected-skills/financeskills/skills/lbo-modeling/references/debt-structures.md +22 -0
- package/selected-skills/financeskills/skills/lbo-modeling/references/lbo-best-practices.md +27 -0
- package/selected-skills/financeskills/skills/lease-accounting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/lease-accounting/SKILL.md +88 -0
- package/selected-skills/financeskills/skills/lease-accounting/assets/commencement-summary-template.md +28 -0
- package/selected-skills/financeskills/skills/lease-accounting/references/ibr-guide.md +26 -0
- package/selected-skills/financeskills/skills/net-worth-tracker/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/net-worth-tracker/SKILL.md +98 -0
- package/selected-skills/financeskills/skills/net-worth-tracker/references/asset-valuation.md +40 -0
- package/selected-skills/financeskills/skills/net-worth-tracker/references/net-worth-benchmarks.md +33 -0
- package/selected-skills/financeskills/skills/nlp-earnings-sentiment/EXAMPLE.md +17 -0
- package/selected-skills/financeskills/skills/nlp-earnings-sentiment/SKILL.md +77 -0
- package/selected-skills/financeskills/skills/nlp-earnings-sentiment/references/finbert-guide.md +26 -0
- package/selected-skills/financeskills/skills/nlp-earnings-sentiment/references/linguistic-finance.md +23 -0
- package/selected-skills/financeskills/skills/oil-gas-valuation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/oil-gas-valuation/SKILL.md +86 -0
- package/selected-skills/financeskills/skills/oil-gas-valuation/references/sec-reporting.md +22 -0
- package/selected-skills/financeskills/skills/oil-gas-valuation/references/spe-standards.md +25 -0
- package/selected-skills/financeskills/skills/personal-budgeting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/personal-budgeting/SKILL.md +100 -0
- package/selected-skills/financeskills/skills/personal-budgeting/references/budgeting-methods.md +40 -0
- package/selected-skills/financeskills/skills/personal-budgeting/references/spending-categories.md +40 -0
- package/selected-skills/financeskills/skills/predictive-burn-rate/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/predictive-burn-rate/SKILL.md +82 -0
- package/selected-skills/financeskills/skills/predictive-burn-rate/references/startup-metrics.md +27 -0
- package/selected-skills/financeskills/skills/predictive-burn-rate/references/time-series-forecasting.md +22 -0
- package/selected-skills/financeskills/skills/product-profitability/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/product-profitability/SKILL.md +83 -0
- package/selected-skills/financeskills/skills/product-profitability/references/allocation-logic.md +28 -0
- package/selected-skills/financeskills/skills/product-profitability/references/unit-economics.md +30 -0
- package/selected-skills/financeskills/skills/retirement-planning/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/retirement-planning/SKILL.md +98 -0
- package/selected-skills/financeskills/skills/retirement-planning/references/compound-growth.md +38 -0
- package/selected-skills/financeskills/skills/retirement-planning/references/retirement-fundamentals.md +29 -0
- package/selected-skills/financeskills/skills/revenue-recognition/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/revenue-recognition/SKILL.md +86 -0
- package/selected-skills/financeskills/skills/revenue-recognition/assets/allocation-workpaper-template.md +30 -0
- package/selected-skills/financeskills/skills/revenue-recognition/references/ifrs15-guide.md +28 -0
- package/selected-skills/financeskills/skills/revenue-recognition/references/saas-rev-rec.md +26 -0
- package/selected-skills/financeskills/skills/risk-assessment/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/risk-assessment/SKILL.md +83 -0
- package/selected-skills/financeskills/skills/risk-assessment/references/hedging-guide.md +24 -0
- package/selected-skills/financeskills/skills/risk-assessment/references/risk-metrics.md +24 -0
- package/selected-skills/financeskills/skills/sox-compliance/EXAMPLE.md +17 -0
- package/selected-skills/financeskills/skills/sox-compliance/SKILL.md +88 -0
- package/selected-skills/financeskills/skills/sox-compliance/references/sampling-methodology.md +27 -0
- package/selected-skills/financeskills/skills/startup-valuation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/startup-valuation/SKILL.md +88 -0
- package/selected-skills/financeskills/skills/startup-valuation/references/berkus-method.md +25 -0
- package/selected-skills/financeskills/skills/startup-valuation/references/vc-method.md +23 -0
- package/selected-skills/financeskills/skills/statement-preparation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/statement-preparation/SKILL.md +86 -0
- package/selected-skills/financeskills/skills/statement-preparation/references/accruals-deferrals.md +24 -0
- package/selected-skills/financeskills/skills/statement-preparation/references/cash-flow-method.md +32 -0
- package/selected-skills/financeskills/skills/tax-efficient-investing/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/tax-efficient-investing/SKILL.md +97 -0
- package/selected-skills/financeskills/skills/tax-efficient-investing/references/account-types.md +33 -0
- package/selected-skills/financeskills/skills/tax-efficient-investing/references/asset-location.md +36 -0
- package/selected-skills/financeskills/skills/tax-planning/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/tax-planning/SKILL.md +93 -0
- package/selected-skills/financeskills/skills/tax-planning/references/common-deductions.md +28 -0
- package/selected-skills/financeskills/skills/tax-planning/references/tax-code-lookup.md +25 -0
- package/selected-skills/financeskills/skills/three-statement-modeling/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/three-statement-modeling/SKILL.md +84 -0
- package/selected-skills/financeskills/skills/three-statement-modeling/references/model-checks.md +32 -0
- package/selected-skills/financeskills/skills/treasury-management/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/treasury-management/SKILL.md +83 -0
- package/selected-skills/financeskills/skills/treasury-management/references/fx-hedging.md +27 -0
- package/selected-skills/financeskills/skills/treasury-management/references/liquidity-metrics.md +24 -0
- package/selected-skills/financeskills/skills/variance-analysis/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/variance-analysis/SKILL.md +78 -0
- package/selected-skills/financeskills/skills/variance-analysis/references/overhead-logic.md +24 -0
- package/selected-skills/financeskills/skills/variance-analysis/references/variance-math.md +35 -0
- package/selected-skills/financeskills/skills/venture-debt/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/venture-debt/SKILL.md +84 -0
- package/selected-skills/financeskills/skills/venture-debt/references/saas-debt-metrics.md +26 -0
- package/selected-skills/financeskills/skills/venture-debt/references/venture-lending.md +23 -0
- package/selected-skills/financeskills/skills/wacc-computation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/wacc-computation/SKILL.md +98 -0
- package/selected-skills/financeskills/skills/wacc-computation/assets/wacc-memo-template.md +40 -0
- package/selected-skills/financeskills/skills/wacc-computation/references/beta-math.md +24 -0
- package/selected-skills/financeskills/skills/wacc-computation/references/capm-basics.md +24 -0
- package/selected-skills/financeskills/skills/working-capital-analysis/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/working-capital-analysis/SKILL.md +83 -0
- package/selected-skills/financeskills/skills/working-capital-analysis/references/wc-metrics.md +30 -0
- package/selected-skills/quant-agent-skills/LICENSE +21 -0
- package/selected-skills/quant-agent-skills/UPSTREAM.md +111 -0
- package/selected-skills/quant-agent-skills/skills/cross-market-listing-choice/SKILL.md +105 -0
- package/selected-skills/quant-agent-skills/skills/cross-market-listing-choice/references/adr-hk-overlay.md +45 -0
- package/selected-skills/quant-agent-skills/skills/cross-market-listing-choice/references/ah-overlay.md +44 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: treasury-management
|
|
3
|
+
description: When the user wants to manage corporate liquidity, investments, or financial risks like FX and interest rates. Also use when the user mentions "cash positioning," "foreign exchange risk," "interest rate hedging," "corporate investment policy," "liquidity planning," or "managing bank relationships."
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Treasury Management
|
|
9
|
+
|
|
10
|
+
You are a Corporate Treasurer. Your goal is to ensure the company has enough liquidity to meet its obligations while optimizing the return on excess cash and mitigating financial risks.
|
|
11
|
+
|
|
12
|
+
## Initial Assessment
|
|
13
|
+
|
|
14
|
+
1. **Liquidity Context**
|
|
15
|
+
- What is the current cash balance across all entities/accounts?
|
|
16
|
+
- What are the upcoming major cash outflows (Payroll, Debt repayment, CapEx)?
|
|
17
|
+
|
|
18
|
+
2. **Risk Exposure**
|
|
19
|
+
- Does the company operate in multiple currencies (FX risk)?
|
|
20
|
+
- Does the company have floating-rate debt (Interest rate risk)?
|
|
21
|
+
|
|
22
|
+
3. **Investment Constraints**
|
|
23
|
+
- What is the company's "Investment Policy Statement" (IPS)? (e.g., Only AAA-rated short-term bonds).
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Treasury Framework
|
|
28
|
+
|
|
29
|
+
### Priority Order
|
|
30
|
+
1. **Cash Positioning** (Knowing exactly where the money is).
|
|
31
|
+
2. **Liquidity Forecasting** (Predicting future cash needs).
|
|
32
|
+
3. **Risk Mitigation** (Hedging FX and interest rate exposure).
|
|
33
|
+
4. **Yield Optimization** (Investing excess cash within policy limits).
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Technical Treasury Steps
|
|
38
|
+
|
|
39
|
+
### 1. Cash Ladder Construction
|
|
40
|
+
- Map out cash inflows and outflows by day/week/month to identify potential "dry spells."
|
|
41
|
+
|
|
42
|
+
### 2. FX Exposure Analysis
|
|
43
|
+
- Calculate the "Value at Risk" (VaR) for foreign currency holdings.
|
|
44
|
+
- Recommend Forward contracts or Options to lock in exchange rates.
|
|
45
|
+
|
|
46
|
+
### 3. Investment Sweep
|
|
47
|
+
- Identify balances sitting in non-interest-bearing accounts that could be moved to money market funds or overnight sweeps.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Output Format
|
|
52
|
+
|
|
53
|
+
### Treasury Report Structure
|
|
54
|
+
|
|
55
|
+
**Executive Summary**
|
|
56
|
+
- Total Liquidity Position.
|
|
57
|
+
- Net FX Exposure by Currency.
|
|
58
|
+
|
|
59
|
+
**Cash Flow Forecast**
|
|
60
|
+
- 13-week rolling cash forecast table.
|
|
61
|
+
- Identification of "funding gaps."
|
|
62
|
+
|
|
63
|
+
**Risk Management**
|
|
64
|
+
- Recommended hedging actions.
|
|
65
|
+
- Compliance check against Investment Policy.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Scripts
|
|
70
|
+
- [calculate.py](./scripts/calculate.py): Deterministic functions for this skill's core computations. Run `python3 scripts/calculate.py` to self-test; import the functions instead of doing mental math.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## References
|
|
75
|
+
- [FX Hedging Basics](./references/fx-hedging.md): Tools and strategies.
|
|
76
|
+
- [Liquidity Ratios](./references/liquidity-metrics.md): Focus on Cash Ratio and Burn Rate.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Related Skills
|
|
81
|
+
- **risk-assessment**: For deeper dive into market volatility impacts.
|
|
82
|
+
- **financial-analysis**: For auditing the source of cash from operations.
|
|
83
|
+
- **budget-forecast**: For aligning the treasury plan with the master budget.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# FX Hedging for Treasury
|
|
2
|
+
|
|
3
|
+
## Exposure Taxonomy
|
|
4
|
+
- **Transaction**: booked receivables/payables in foreign currency — hedge mechanically.
|
|
5
|
+
- **Forecast**: probable future revenues/costs — hedge a declining ratio (e.g., 80% next quarter, 50% out 12 months).
|
|
6
|
+
- **Translation**: net investment in foreign subsidiaries — usually NOT hedged with cash instruments unless covenant/ratio-driven.
|
|
7
|
+
- **Economic/competitive**: pricing-power erosion — managed structurally (sourcing, pricing), not with derivatives.
|
|
8
|
+
|
|
9
|
+
## Instrument Selection
|
|
10
|
+
| Instrument | Use | Cost Profile |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| Forward/NDF | Firm exposures, illiquid currencies (NDF for NGN, partial convertibility) | Zero premium; locks rate (forward points = carry) |
|
|
13
|
+
| Vanilla option | Uncertain exposures (bids, forecasts) | Premium; keeps upside |
|
|
14
|
+
| Collar | Premium reduction | Caps both directions |
|
|
15
|
+
| Cross-currency swap | Debt in foreign currency | Converts principal + coupons |
|
|
16
|
+
| Natural hedge | Match currency of revenue and cost/debt | Free — exhaust first |
|
|
17
|
+
|
|
18
|
+
## High-Carry Currency Reality (NGN and peers)
|
|
19
|
+
Forward points on high-interest-differential currencies make systematic forward hedging expensive (you pay the carry). Alternatives: increase natural hedging, hold hard-currency buffers, hedge selectively around known events, use options when implied vol is cheap relative to realized.
|
|
20
|
+
|
|
21
|
+
## Hedge Accounting (IFRS 9)
|
|
22
|
+
- Cash flow hedge: effective portion → OCI, recycle when hedged item hits P&L. Documentation at inception: risk, instrument, hedged item, effectiveness method (1:1 critical terms or regression).
|
|
23
|
+
- Forward points/option time value: may be treated as cost of hedging (OCI amortization) — reduces P&L noise.
|
|
24
|
+
- Without hedge accounting, MTM volatility lands in P&L — decide deliberately.
|
|
25
|
+
|
|
26
|
+
## Policy Skeleton
|
|
27
|
+
Hedge ratios by horizon, approved instruments (no written naked options), counterparty limits by rating, mandatory competitive quotes (≥ 2), monthly effectiveness and exposure reporting to treasury committee.
|
package/selected-skills/financeskills/skills/treasury-management/references/liquidity-metrics.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Liquidity Metrics and Cash Management
|
|
2
|
+
|
|
3
|
+
## Core Metrics
|
|
4
|
+
- **Daily cash position** = Σ available balances (by currency, by bank) + committed undrawn facilities − same-day obligations.
|
|
5
|
+
- **Cash conversion cycle (CCC)** = DSO + DIO − DPO. Shorter = less funding needed. Track quarterly by business unit.
|
|
6
|
+
- DSO = AR / Revenue × days; DIO = Inventory / COGS × days; DPO = AP / COGS × days.
|
|
7
|
+
- **Minimum liquidity threshold**: ≥ (1 month opex + debt service + a stress buffer); board-approved, never breached silently.
|
|
8
|
+
- **Liquidity headroom** = unrestricted cash + undrawn committed facilities − minimum threshold.
|
|
9
|
+
|
|
10
|
+
## Forecasting Discipline
|
|
11
|
+
- **13-week rolling forecast** (weekly buckets): receipts from AR aging × collection curve; disbursements from AP, payroll calendar, tax calendar, debt service, capex schedule.
|
|
12
|
+
- Direct method for 13 weeks; indirect (P&L-derived) for 12 months.
|
|
13
|
+
- Variance discipline: weekly actual-vs-forecast, investigate > 10% line variances; rolling re-forecast every week, not month.
|
|
14
|
+
|
|
15
|
+
## Concentration & Structure
|
|
16
|
+
- Cash pooling: physical sweep vs. notional; watch intercompany loan creation (transfer pricing + thin cap + CBN approvals for cross-border).
|
|
17
|
+
- Counterparty limits: max % of cash per bank, by rating tier; government securities ladder for excess.
|
|
18
|
+
- Trapped cash map: balances by jurisdiction with repatriation constraints (FX controls, dividend capacity) — Nigeria: CBN documentation requirements make this a real planning item.
|
|
19
|
+
|
|
20
|
+
## Stress Testing
|
|
21
|
+
Run quarterly: top customer non-payment (30/60/90-day), 20% FX devaluation, revolver unavailable, 1-month revenue stop. Headroom must survive the combined moderate scenario; document management actions per trigger.
|
|
22
|
+
|
|
23
|
+
## Early-Warning Indicators
|
|
24
|
+
DSO creep > 5 days vs. trailing year; payee-initiated payment-term renegotiations; utilization of revolver for payroll (red line); supplier prepayment demands.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Worked Example - variance-analysis
|
|
2
|
+
|
|
3
|
+
## Ask
|
|
4
|
+
|
|
5
|
+
> We expected to use 1,000 lbs of steel at $5/lb. We actually used 1,100 lbs at $4.50/lb. Calculate the variances.
|
|
6
|
+
|
|
7
|
+
## What a correct response contains
|
|
8
|
+
|
|
9
|
+
Should calculate Material Price Variance ($0.50 favorable * 1,100 lbs = $550 F). Should calculate Material Usage Variance (100 lbs unfavorable * $5 = $500 U). Should provide a Production Variance Report.
|
|
10
|
+
|
|
11
|
+
## File-driven variant
|
|
12
|
+
|
|
13
|
+
With fixture(s) `evals/files/production_data.xlsx`:
|
|
14
|
+
|
|
15
|
+
> Compute material price, material usage, labor rate, and labor efficiency variances from the attached production workbook (evals/files/production_data.xlsx). Label each favourable/adverse and explain the most material driver.
|
|
16
|
+
|
|
17
|
+
Expected: MPV -25,500 (adverse), MUV -30,000, LRV -15,620 (adverse), LEV 20,000.
|
|
18
|
+
|
|
19
|
+
## Compute, don't estimate
|
|
20
|
+
|
|
21
|
+
All figures above come from [`scripts/calculate.py`](./scripts/calculate.py) - import its functions rather than doing arithmetic in prose.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: variance-analysis
|
|
3
|
+
description: When the user wants to analyze the difference between actual and standard costs in manufacturing. Also use when the user mentions "material price variance," "labor efficiency," "overhead variance," "standard costing," or "production audit."
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Standard Cost Variance Analysis
|
|
9
|
+
|
|
10
|
+
You are a Plant Controller. Your goal is to identify exactly *why* actual production costs differed from the budget—whether due to price, volume, or efficiency.
|
|
11
|
+
|
|
12
|
+
## Initial Assessment
|
|
13
|
+
|
|
14
|
+
1. **Standard Inputs**
|
|
15
|
+
- Standard Price ($P_s$) and Standard Quantity ($Q_s$) per unit.
|
|
16
|
+
- Standard Labor Rate ($R_s$) and Standard Hours ($H_s$) per unit.
|
|
17
|
+
|
|
18
|
+
2. **Actual Results**
|
|
19
|
+
- Actual Price ($P_a$) and Actual Quantity used ($Q_a$).
|
|
20
|
+
- Actual Labor Rate ($R_a$) and Actual Hours worked ($H_a$).
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Variance Framework
|
|
25
|
+
|
|
26
|
+
### Material Variances
|
|
27
|
+
1. **Price Variance**: `(Standard Price - Actual Price) * Actual Quantity`.
|
|
28
|
+
2. **Usage Variance**: `(Standard Quantity - Actual Quantity) * Standard Price`.
|
|
29
|
+
|
|
30
|
+
### Labor Variances
|
|
31
|
+
1. **Rate Variance**: `(Standard Rate - Actual Rate) * Actual Hours`.
|
|
32
|
+
2. **Efficiency Variance**: `(Standard Hours - Actual Hours) * Standard Rate`.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Technical Analysis Steps
|
|
37
|
+
|
|
38
|
+
### 1. Root Cause Identification
|
|
39
|
+
- Was the **Price Variance** due to a bad purchasing deal or a market spike?
|
|
40
|
+
- Was the **Efficiency Variance** due to machine downtime or poor training?
|
|
41
|
+
|
|
42
|
+
### 2. Overhead Variance
|
|
43
|
+
- Fixed Overhead Spending Variance.
|
|
44
|
+
- Fixed Overhead Volume Variance (Over/Under absorption).
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Output Format
|
|
49
|
+
|
|
50
|
+
### Production Variance Report
|
|
51
|
+
|
|
52
|
+
**Summary Dashboard**
|
|
53
|
+
- **Total Variance**: $X (Favorable/Unfavorable).
|
|
54
|
+
- **Primary Driver**: (e.g., "70% of variance driven by material price").
|
|
55
|
+
|
|
56
|
+
**Variance Table**
|
|
57
|
+
- Material Price | Material Usage | Labor Rate | Labor Efficiency | Overhead.
|
|
58
|
+
|
|
59
|
+
**Corrective Actions**
|
|
60
|
+
- Recommended fixes for unfavorable variances (e.g., "Retrain shift B," "Search for new copper supplier").
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Scripts
|
|
65
|
+
- [calculate.py](./scripts/calculate.py): Material, labor, and overhead variance functions. Run with `python3 scripts/calculate.py` to self-test; import the functions for actual computations.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## References
|
|
70
|
+
- [Variance Formulas](./references/variance-math.md): Quick look-up for all manufacturing variances.
|
|
71
|
+
- [Absorption vs. Variable Costing](./references/overhead-logic.md): Understanding fixed overhead.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Related Skills
|
|
76
|
+
- **product-profitability**: To see how variances impact SKU-level margins.
|
|
77
|
+
- **budget-forecast**: For setting the "Standard Costs" for the next period.
|
|
78
|
+
- **audit-checklist**: For auditing the accuracy of production reporting.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Overhead Variance Logic: Absorption vs. Variable Costing
|
|
2
|
+
|
|
3
|
+
## The Four-Way Overhead Variance Split
|
|
4
|
+
**Variable overhead:**
|
|
5
|
+
- Spending: `(Actual VOH rate − Standard rate) × Actual hours` — price of the overhead inputs.
|
|
6
|
+
- Efficiency: `(Actual hours − Standard hours allowed) × Standard VOH rate` — driven by the same hours as labor efficiency.
|
|
7
|
+
|
|
8
|
+
**Fixed overhead:**
|
|
9
|
+
- Spending (budget): `Actual FOH − Budgeted FOH` — the only "real" fixed overhead control variance.
|
|
10
|
+
- Volume: `Budgeted FOH − Applied FOH` where `Applied = Standard hours allowed × FOH rate` — an ARTIFACT of unitizing fixed costs, not a cost control signal. Unfavorable volume variance = produced below denominator level.
|
|
11
|
+
|
|
12
|
+
## Denominator Choice Matters
|
|
13
|
+
FOH rate = Budgeted FOH / denominator activity. Choosing theoretical vs. practical vs. normal vs. budgeted capacity changes the rate and the volume variance. Practical capacity (recommended, and required for some costing under ASC 330/IAS 2 logic) exposes the cost of idle capacity rather than burying it in product cost.
|
|
14
|
+
|
|
15
|
+
## Absorption vs. Variable Costing P&L Effect
|
|
16
|
+
- `Absorption income − Variable income = ΔInventory units × FOH rate`
|
|
17
|
+
- Production > sales → absorption income HIGHER (fixed cost parked in inventory). This creates the classic overproduction incentive — producing for the warehouse to flatter margins. Watch for it in bonus-driven plants.
|
|
18
|
+
- IAS 2 / GAAP external reporting REQUIRES absorption; use variable costing internally for CVP and control.
|
|
19
|
+
|
|
20
|
+
## Under/Over-Applied Overhead Disposal
|
|
21
|
+
Immaterial → close to COGS. Material → prorate across WIP, FG, COGS based on applied overhead in each. Abnormal idle capacity cost → expense immediately, never inventory.
|
|
22
|
+
|
|
23
|
+
## Interpretation Discipline
|
|
24
|
+
Volume variance tells you about CAPACITY UTILIZATION, spending variance about COST CONTROL. Reporting them as one number invites the wrong fix.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Manufacturing Variance Formulas
|
|
2
|
+
|
|
3
|
+
Quick-reference for calculating standard costing variances in a production environment.
|
|
4
|
+
|
|
5
|
+
## 🏛️ Material Variances
|
|
6
|
+
|
|
7
|
+
### Material Price Variance (MPV)
|
|
8
|
+
`MPV = (Standard Price - Actual Price) * Actual Quantity`
|
|
9
|
+
- **Favorable**: If Actual Price < Standard Price.
|
|
10
|
+
|
|
11
|
+
### Material Usage Variance (MUV)
|
|
12
|
+
`MUV = (Standard Quantity - Actual Quantity) * Standard Price`
|
|
13
|
+
- **Favorable**: If Actual Quantity < Standard Quantity.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 🏛️ Labor Variances
|
|
18
|
+
|
|
19
|
+
### Labor Rate Variance (LRV)
|
|
20
|
+
`LRV = (Standard Rate - Actual Rate) * Actual Hours`
|
|
21
|
+
- **Favorable**: If Actual Rate < Standard Rate.
|
|
22
|
+
|
|
23
|
+
### Labor Efficiency Variance (LEV)
|
|
24
|
+
`LEV = (Standard Hours - Actual Hours) * Standard Rate`
|
|
25
|
+
- **Favorable**: If Actual Hours < Standard Hours.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 🔍 Overhead Variances
|
|
30
|
+
- **Variable Overhead Spending**: `(Standard Rate - Actual Rate) * Actual Hours`.
|
|
31
|
+
- **Variable Overhead Efficiency**: `(Standard Hours - Actual Hours) * Standard Rate`.
|
|
32
|
+
|
|
33
|
+
## 🔗 Sources
|
|
34
|
+
- [CFI: Variance Analysis](https://corporatefinanceinstitute.com/resources/accounting/variance-analysis/)
|
|
35
|
+
- [AccountingCoach: Standard Costing](https://www.accountingcoach.com/standard-costing/explanation)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Worked Example - venture-debt
|
|
2
|
+
|
|
3
|
+
## Ask
|
|
4
|
+
|
|
5
|
+
> We're a Series B startup with $5M in MRR. We want to borrow $10M in venture debt to avoid dilution. What should we expect for terms?
|
|
6
|
+
|
|
7
|
+
## What a correct response contains
|
|
8
|
+
|
|
9
|
+
Should identify that venture debt is typically 20-30% of the last equity round or linked to MRR multiples. Should discuss Warrants and Covenants (Minimum Cash/MRR). Should provide a Venture Debt Term Sheet structure.
|
|
10
|
+
|
|
11
|
+
## File-driven variant
|
|
12
|
+
|
|
13
|
+
With fixture(s) `evals/files/term_sheet.csv`:
|
|
14
|
+
|
|
15
|
+
> Analyze the attached venture-debt term sheet (evals/files/term_sheet.csv): build the 36-month payment schedule (12 IO + 24 amortizing), total cost of debt including fees, warrant shares, and runway extension from net proceeds.
|
|
16
|
+
|
|
17
|
+
Expected: Total interest+fees $1,498,817; warrants 200,000 shares; runway extension 7.1 months; monthly payment in amortization ~$235,367.
|
|
18
|
+
|
|
19
|
+
## Compute, don't estimate
|
|
20
|
+
|
|
21
|
+
All figures above come from [`scripts/calculate.py`](./scripts/calculate.py) - import its functions rather than doing arithmetic in prose.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: venture-debt
|
|
3
|
+
description: When the user wants to evaluate or structure debt for high-growth, venture-backed startups. Also use when the user mentions "startup loan," "warrants," "venture lending," "debt covenants for tech," "non-dilutive funding," or "growth capital debt."
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Venture Debt Analysis
|
|
9
|
+
|
|
10
|
+
You are a Venture Lender. Your goal is to provide non-dilutive capital to startups by structuring debt that accounts for high growth but lacks traditional collateral.
|
|
11
|
+
|
|
12
|
+
## Initial Assessment
|
|
13
|
+
|
|
14
|
+
1. **The Equity Context**
|
|
15
|
+
- Who are the lead VC investors? (Lender follows the equity).
|
|
16
|
+
- How much equity capital has been raised to date?
|
|
17
|
+
- What is the current "Cash Runway"?
|
|
18
|
+
|
|
19
|
+
2. **The Traction**
|
|
20
|
+
- Monthly Recurring Revenue (MRR) and growth rate.
|
|
21
|
+
- Gross Margins (Software vs. Hardware matters).
|
|
22
|
+
|
|
23
|
+
3. **Use of Funds**
|
|
24
|
+
- Is this for runway extension, equipment financing, or acquisition?
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Venture Debt Framework
|
|
29
|
+
|
|
30
|
+
### Priority Order
|
|
31
|
+
1. **Underwriting** (Assessing the probability of the next equity round).
|
|
32
|
+
2. **Structuring** (Determining the loan amount, interest, and warrants).
|
|
33
|
+
3. **Covenant Design** (Setting growth/liquidity markers).
|
|
34
|
+
4. **Monitoring** (Tracking burn rate and traction post-funding).
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Technical Lending Steps
|
|
39
|
+
|
|
40
|
+
### 1. Warrant Calculation
|
|
41
|
+
- Determine the "Warrant Coverage" (e.g., 10% of the loan amount).
|
|
42
|
+
- Calculate the number of shares the lender can buy at the current valuation.
|
|
43
|
+
|
|
44
|
+
### 2. Debt Service Coverage (DSCR)
|
|
45
|
+
- Unlike traditional companies, startups often have negative DSCR. The underwriter looks at "Runway Extension"—does the debt add 6-9 months to the zero-cash date?
|
|
46
|
+
|
|
47
|
+
### 3. "MAC" Clause Review
|
|
48
|
+
- Evaluate the "Material Adverse Change" clauses that allow the lender to freeze the line of credit if the startup's health deteriorates.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Output Format
|
|
53
|
+
|
|
54
|
+
### Venture Debt Term Sheet
|
|
55
|
+
|
|
56
|
+
**The Terms**
|
|
57
|
+
- Loan Amount and Interest Rate (usually Prime + Margin).
|
|
58
|
+
- Repayment Period (Interest-only vs. Amortizing).
|
|
59
|
+
- Warrant Coverage and Strike Price.
|
|
60
|
+
|
|
61
|
+
**Covenants**
|
|
62
|
+
- Minimum Cash requirements.
|
|
63
|
+
- Minimum MRR targets.
|
|
64
|
+
|
|
65
|
+
**Risk Assessment**
|
|
66
|
+
- Probability of "Refinance Risk" (Can they raise the next equity round?).
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Scripts
|
|
71
|
+
- [calculate.py](./scripts/calculate.py): Deterministic functions for this skill's core computations. Run `python3 scripts/calculate.py` to self-test; import the functions instead of doing mental math.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## References
|
|
76
|
+
- [Venture Debt 101](./references/venture-lending.md): Warrants and covenants.
|
|
77
|
+
- [SaaS Lending Metrics](./references/saas-debt-metrics.md): Underwriting based on MRR.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Related Skills
|
|
82
|
+
- **predictive-burn-rate**: To see if the debt provides enough runway.
|
|
83
|
+
- **startup-valuation**: To determine the value of the warrants.
|
|
84
|
+
- **risk-assessment**: For evaluating the default risk.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# SaaS Lending Metrics and Covenants
|
|
2
|
+
|
|
3
|
+
## Borrowing Base Concepts
|
|
4
|
+
- **ARR-based facilities**: commitment = multiple of ARR (0.3–0.8x), stepping with NRR and growth.
|
|
5
|
+
- **MRR lines**: borrowing base = 3–6x MRR with retention haircuts; recalculated monthly.
|
|
6
|
+
|
|
7
|
+
## Metrics Lenders Track (and covenant)
|
|
8
|
+
| Metric | Typical Threshold | Notes |
|
|
9
|
+
|---|---|---|
|
|
10
|
+
| Minimum cash / runway | ≥ 6 months runway or fixed floor | The covenant that bites first |
|
|
11
|
+
| ARR growth | > 0–20% YoY minimum | Tested quarterly |
|
|
12
|
+
| Net revenue retention | ≥ 90–100% | Below 90% = churn problem, expect default discussion |
|
|
13
|
+
| Gross margin | ≥ 60–70% | Confirms it's actually software |
|
|
14
|
+
| Burn covenant | actual burn ≤ 110–120% of plan | Plan attached to credit agreement |
|
|
15
|
+
| Performance-to-plan | ≥ 70–80% of board plan revenue | Subjective danger zone |
|
|
16
|
+
|
|
17
|
+
## Churn and Cohort Analysis for Debt Capacity
|
|
18
|
+
- Gross revenue churn > 2%/month makes MRR-based borrowing bases unstable — lenders haircut aggressively.
|
|
19
|
+
- Logo vs. revenue churn divergence reveals dependence on a few expanding whales (concentration covenant: top customer < 15–20% of ARR).
|
|
20
|
+
|
|
21
|
+
## Negotiation Priorities (borrower side)
|
|
22
|
+
1. Kill or objectify MAC/investor-abandonment defaults.
|
|
23
|
+
2. Cure rights and equity-cure provisions for financial covenants.
|
|
24
|
+
3. Interest-only period through the next planned raise + 2 quarters.
|
|
25
|
+
4. Prepayment penalty step-downs (3/2/1) and no make-whole after month 18.
|
|
26
|
+
5. Warrant coverage on drawn (not committed) amounts.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Venture Lending Fundamentals
|
|
2
|
+
|
|
3
|
+
## What It Is
|
|
4
|
+
Term debt to VC-backed, typically pre-profit companies, underwritten on enterprise value, investor support, and runway extension logic — not cash flow coverage. Sized at 25–35% of the last equity round.
|
|
5
|
+
|
|
6
|
+
## Standard Structure
|
|
7
|
+
- **Term**: 36–48 months; 6–12 month interest-only period, then straight-line amortization.
|
|
8
|
+
- **Pricing**: 10–15% all-in — coupon (prime/SOFR + 400–700) + final payment fee (3–8% of principal) + facility fee.
|
|
9
|
+
- **Warrants**: 5–15% warrant coverage (= warrant value / loan amount), struck at last round price, 7–10 year exercise window.
|
|
10
|
+
- **Security**: all-asset lien; IP often via negative pledge rather than direct lien.
|
|
11
|
+
- **MAC/investor-support clauses**: subjective default triggers — negotiate hard.
|
|
12
|
+
|
|
13
|
+
## All-In Cost (model it, don't trust the coupon)
|
|
14
|
+
IRR of all cash flows: draw − interest − amortization − final fee − warrant value. A "12% coupon" deal with 5% final fee and warrants commonly prices 16–20% all-in.
|
|
15
|
+
|
|
16
|
+
## Lender Underwriting Lens (useful when negotiating)
|
|
17
|
+
- Quality of the cap table (will insiders bridge?).
|
|
18
|
+
- Runway with the debt ≥ next milestone + 6 months.
|
|
19
|
+
- Loan-to-enterprise-value < 10–20%.
|
|
20
|
+
- Repayment source: next round, not operations — refinancing risk is THE risk.
|
|
21
|
+
|
|
22
|
+
## When It Makes Sense
|
|
23
|
+
Extend runway between rounds without dilution; finance hardware/inventory working capital. When it doesn't: substituting for unrentable equity, or when amortization starts before revenue inflects — debt service accelerates the death spiral.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Worked Example - wacc-computation
|
|
2
|
+
|
|
3
|
+
## Ask
|
|
4
|
+
|
|
5
|
+
> Our stock beta is 1.2, the 10-year Treasury is at 4%, and the Equity Risk Premium is 5%. We have $1M in debt at 6% interest and $2M in market cap. Tax rate is 25%. What's our WACC?
|
|
6
|
+
|
|
7
|
+
## What a correct response contains
|
|
8
|
+
|
|
9
|
+
Should calculate Cost of Equity (4% + 1.2 * 5% = 10%). Should calculate After-tax Cost of Debt (6% * (1 - 0.25) = 4.5%). Should weight the components (1/3 Debt, 2/3 Equity). Should calculate the final WACC ((1/3 * 4.5%) + (2/3 * 10%) = 8.16%). Should provide a WACC Computation Memo.
|
|
10
|
+
|
|
11
|
+
## File-driven variant
|
|
12
|
+
|
|
13
|
+
With fixture(s) `evals/files/comparables.csv`:
|
|
14
|
+
|
|
15
|
+
> Using the attached peer set (evals/files/comparables.csv), estimate WACC for a target with: target D/E 0.60, tax rate 30%, risk-free rate 4.5%, ERP 5.5%, pre-tax cost of debt 8.5%. Unlever each peer at its own structure, take the median unlevered beta, relever at the target structure, and produce your WACC Computation Memo.
|
|
16
|
+
|
|
17
|
+
Expected: Median unlevered beta approx 0.833; relevered beta approx 1.183; cost of equity approx 11.01%; weights 62.5% equity / 37.5% debt; WACC approx 9.11%.
|
|
18
|
+
|
|
19
|
+
## Compute, don't estimate
|
|
20
|
+
|
|
21
|
+
All figures above come from [`scripts/calculate.py`](./scripts/calculate.py) - import its functions rather than doing arithmetic in prose.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wacc-computation
|
|
3
|
+
description: When the user wants to calculate the Weighted Average Cost of Capital (WACC) for valuation or capital budgeting. Also use when the user mentions "cost of equity," "cost of debt," "CAPM," "beta unlevering," "risk-free rate," or "equity risk premium."
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# WACC Computation
|
|
9
|
+
|
|
10
|
+
You are a Corporate Finance Manager. Your goal is to determine the minimum return a company must earn on its existing asset base to satisfy its creditors, owners, and other providers of capital.
|
|
11
|
+
|
|
12
|
+
## Initial Assessment
|
|
13
|
+
|
|
14
|
+
1. **Capital Structure**
|
|
15
|
+
- Market Value of Equity (Market Cap).
|
|
16
|
+
- Market Value of Debt (or Book Value if Market Value is unavailable).
|
|
17
|
+
- Preferred Stock (if any).
|
|
18
|
+
|
|
19
|
+
2. **Cost of Equity (CAPM)**
|
|
20
|
+
- Risk-Free Rate ($R_f$): (e.g., 10-year Treasury yield).
|
|
21
|
+
- Beta ($\beta$): (Raw or Unlevered/Relevered).
|
|
22
|
+
- Equity Risk Premium (ERP).
|
|
23
|
+
|
|
24
|
+
3. **Cost of Debt**
|
|
25
|
+
- Pre-tax Cost of Debt ($R_d$): (Yield to Maturity on existing bonds or marginal borrowing rate).
|
|
26
|
+
- Marginal Tax Rate ($T$).
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## WACC Framework
|
|
31
|
+
|
|
32
|
+
### The Formula
|
|
33
|
+
`WACC = (E/V * Re) + (D/V * Rd * (1 - T)) + (P/V * Rp)`
|
|
34
|
+
- **E**: Market Value of Equity.
|
|
35
|
+
- **D**: Market Value of Debt.
|
|
36
|
+
- **P**: Value of Preferred Stock.
|
|
37
|
+
- **V**: Total Value (E + D + P).
|
|
38
|
+
- **Re**: Cost of Equity.
|
|
39
|
+
- **Rd**: Cost of Debt.
|
|
40
|
+
- **Rp**: Cost of Preferred Stock.
|
|
41
|
+
|
|
42
|
+
### Priority Order
|
|
43
|
+
1. **Data Collection** (Gathering market prices and rates).
|
|
44
|
+
2. **Cost of Equity Calculation** (Using CAPM).
|
|
45
|
+
3. **Cost of Debt Calculation** (After-tax).
|
|
46
|
+
4. **Weighting** (Using Market Values, not Book Values).
|
|
47
|
+
5. **Final Computation & Sensitivity**.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Technical Computation Steps
|
|
52
|
+
|
|
53
|
+
### 1. Unlevering/Relevering Beta
|
|
54
|
+
- If the target company is private or has a weird capital structure, unlever a peer group's beta and relever it based on the target's D/E ratio.
|
|
55
|
+
- `β_unlevered = β_levered / (1 + (1-T)*(D/E))`.
|
|
56
|
+
|
|
57
|
+
### 2. Market Value of Debt
|
|
58
|
+
- If market prices are unavailable, treat the book value as a proxy or use the "Synthetic Rating" method based on the Interest Coverage Ratio.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Output Format
|
|
63
|
+
|
|
64
|
+
### WACC Computation Memo
|
|
65
|
+
|
|
66
|
+
**Summary Table**
|
|
67
|
+
- **Final WACC**: (e.g., 8.4%).
|
|
68
|
+
- **Weight of Equity**: (e.g., 70%).
|
|
69
|
+
- **Weight of Debt**: (e.g., 30%).
|
|
70
|
+
|
|
71
|
+
**Component Detail**
|
|
72
|
+
- **Cost of Equity**: Breakdown of CAPM inputs ($R_f$, $\beta$, ERP).
|
|
73
|
+
- **Cost of Debt**: Pre-tax rate and tax adjustment.
|
|
74
|
+
|
|
75
|
+
**Sensitivity Matrix**
|
|
76
|
+
- WACC variance based on different Beta and Equity Risk Premium assumptions.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Scripts
|
|
81
|
+
- [calculate.py](./scripts/calculate.py): CAPM, beta unlevering/relevering, and WACC functions, kept as reviewable material. This plugin's research role has no shell and the scripts are not part of the installed package, so nothing here runs them: work the arithmetic from [CAPM Guide](./references/capm-basics.md) and [Beta Unlevering](./references/beta-math.md), write each step out in the answer, and hand anything that needs real compute to the delegated `data_junior`.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## References
|
|
86
|
+
- [CAPM Guide](./references/capm-basics.md): Understanding the components.
|
|
87
|
+
- [Beta Unlevering](./references/beta-math.md): The Hamada equation and adjustments.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Assets
|
|
92
|
+
- [wacc-memo-template.md](./assets/wacc-memo-template.md): WACC memo with beta workpaper and sensitivity grid.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Related Skills
|
|
97
|
+
- **investment-analysis**: WACC is the discount rate for DCF models.
|
|
98
|
+
- **capital-budgeting**: WACC is the hurdle rate for project NPV.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# WACC Computation Memo
|
|
2
|
+
|
|
3
|
+
**Target:** {entity} | **Valuation date:** {date} | **Currency:** {ccy}
|
|
4
|
+
|
|
5
|
+
## Result
|
|
6
|
+
| Component | Value | Weight | Contribution |
|
|
7
|
+
|---|---|---|---|
|
|
8
|
+
| Cost of equity | {Re}% | {We}% | {x.xx}% |
|
|
9
|
+
| After-tax cost of debt | {Rd_at}% | {Wd}% | {x.xx}% |
|
|
10
|
+
| **WACC** | | | **{wacc}%** |
|
|
11
|
+
|
|
12
|
+
## Cost of Equity Build (CAPM)
|
|
13
|
+
| Input | Value | Source |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| Risk-free rate | | {govt benchmark, tenor} |
|
|
16
|
+
| Beta (relevered) | | {peer set, median unlevered x target D/E} |
|
|
17
|
+
| Equity risk premium | | |
|
|
18
|
+
| Country risk premium | | {if applicable} |
|
|
19
|
+
| Size premium | | {if applicable} |
|
|
20
|
+
|
|
21
|
+
## Beta Workpaper
|
|
22
|
+
| Peer | Levered beta | D/E | Tax | Unlevered beta |
|
|
23
|
+
|---|---|---|---|---|
|
|
24
|
+
|
|
25
|
+
Median unlevered: {x.xx} -> relevered at target D/E {x.xx}, tax {xx}%: **{x.xx}**
|
|
26
|
+
|
|
27
|
+
## Sensitivity
|
|
28
|
+
| WACC | ERP -1% | Base | ERP +1% |
|
|
29
|
+
|---|---|---|---|
|
|
30
|
+
| Beta -0.2 | | | |
|
|
31
|
+
| Base | | | |
|
|
32
|
+
| Beta +0.2 | | | |
|
|
33
|
+
|
|
34
|
+
## Consistency Checks
|
|
35
|
+
- [ ] Rate currency matches cash-flow currency
|
|
36
|
+
- [ ] Market-value weights (not book)
|
|
37
|
+
- [ ] Marginal (not historical) cost of debt; tax shield usable
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
*Each figure above traces to the formula and inputs shown beside it. Prepared by an AI agent - review before use in a transaction.*
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Beta Unlevering and Relevering
|
|
2
|
+
|
|
3
|
+
## Why
|
|
4
|
+
Observed (levered) betas embed each comparable's capital structure. To apply a peer's beta to a target, strip out the peer's leverage, average, then relever at the target's structure.
|
|
5
|
+
|
|
6
|
+
## Hamada Formulas (debt beta = 0, tax shield discounted at Rd)
|
|
7
|
+
- **Unlever**: `βu = βl / (1 + (1 - T) × D/E)`
|
|
8
|
+
- **Relever**: `βl = βu × (1 + (1 - T) × D/E_target)`
|
|
9
|
+
|
|
10
|
+
## Harris-Pringle (tax shield as risky as assets — common in continuous rebalancing)
|
|
11
|
+
- **Unlever**: `βu = βl / (1 + D/E)`
|
|
12
|
+
- Use when the firm maintains a constant leverage ratio rather than fixed debt.
|
|
13
|
+
|
|
14
|
+
## Procedure
|
|
15
|
+
1. Select 5–8 pure-play comparables.
|
|
16
|
+
2. Pull 2–5 year weekly/monthly regression betas.
|
|
17
|
+
3. Unlever each at its own D/E (market values) and marginal tax rate.
|
|
18
|
+
4. Take the median unlevered beta (median resists outliers better than mean).
|
|
19
|
+
5. Relever at the target's capital structure (target or industry-normal D/E for private firms).
|
|
20
|
+
|
|
21
|
+
## Sanity Checks
|
|
22
|
+
- Unlevered betas across true comparables should cluster (spread < ~0.3).
|
|
23
|
+
- Asset beta for stable utilities ≈ 0.3–0.5; tech ≈ 1.0–1.4; commodity E&P ≈ 0.9–1.3.
|
|
24
|
+
- If relevered beta > 2.5, re-examine D/E inputs — likely book values leaked in.
|