@v587d/capital-generation 2.7.6 → 2.7.8

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 (203) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +5 -4
  3. package/THIRD_PARTY_NOTICES.md +14 -3
  4. package/capital-config/client.js +4 -4
  5. package/capital-config/package.json +1 -1
  6. package/capital-watchlist/package.json +1 -1
  7. package/chart-ui/package.json +1 -1
  8. package/lib/agents/selected-skills-provider.js +91 -41
  9. package/lib/index.js +3 -2
  10. package/lib/web-retriever/local-fetch.d.ts +1 -1
  11. package/lib/web-retriever/local-fetch.js +1 -1
  12. package/lib/web-retriever/wind-client.d.ts +1 -1
  13. package/lib/web-retriever/wind-client.js +1 -1
  14. package/package.json +2 -1
  15. package/selected-skills/README.md +3 -1
  16. package/selected-skills/catalog.js +155 -0
  17. package/selected-skills/financeskills/LICENSE +21 -0
  18. package/selected-skills/financeskills/UPSTREAM.md +202 -0
  19. package/selected-skills/financeskills/skills/ai-anomaly-detection/EXAMPLE.md +21 -0
  20. package/selected-skills/financeskills/skills/ai-anomaly-detection/SKILL.md +84 -0
  21. package/selected-skills/financeskills/skills/ai-anomaly-detection/references/feature-engineering.md +20 -0
  22. package/selected-skills/financeskills/skills/ai-anomaly-detection/references/ml-algorithms.md +28 -0
  23. package/selected-skills/financeskills/skills/aro-computation/EXAMPLE.md +21 -0
  24. package/selected-skills/financeskills/skills/aro-computation/SKILL.md +82 -0
  25. package/selected-skills/financeskills/skills/aro-computation/references/aro-standards.md +22 -0
  26. package/selected-skills/financeskills/skills/aro-computation/references/pv-math.md +27 -0
  27. package/selected-skills/financeskills/skills/audit-checklist/EXAMPLE.md +17 -0
  28. package/selected-skills/financeskills/skills/audit-checklist/SKILL.md +77 -0
  29. package/selected-skills/financeskills/skills/audit-checklist/references/internal-controls.md +36 -0
  30. package/selected-skills/financeskills/skills/audit-checklist/references/isa-standards.md +26 -0
  31. package/selected-skills/financeskills/skills/automated-reconciliation/EXAMPLE.md +21 -0
  32. package/selected-skills/financeskills/skills/automated-reconciliation/SKILL.md +87 -0
  33. package/selected-skills/financeskills/skills/automated-reconciliation/assets/reconciliation-statement-template.md +31 -0
  34. package/selected-skills/financeskills/skills/automated-reconciliation/references/fuzzy-logic.md +27 -0
  35. package/selected-skills/financeskills/skills/automated-reconciliation/references/rec-controls.md +28 -0
  36. package/selected-skills/financeskills/skills/banking-compliance/EXAMPLE.md +21 -0
  37. package/selected-skills/financeskills/skills/banking-compliance/SKILL.md +82 -0
  38. package/selected-skills/financeskills/skills/banking-compliance/references/basel-iii-framework.md +26 -0
  39. package/selected-skills/financeskills/skills/banking-compliance/references/risk-weights.md +32 -0
  40. package/selected-skills/financeskills/skills/budget-forecast/EXAMPLE.md +21 -0
  41. package/selected-skills/financeskills/skills/budget-forecast/SKILL.md +87 -0
  42. package/selected-skills/financeskills/skills/budget-forecast/references/forecasting-best-practices.md +26 -0
  43. package/selected-skills/financeskills/skills/budget-forecast/references/scenario-analysis.md +25 -0
  44. package/selected-skills/financeskills/skills/close-management/EXAMPLE.md +17 -0
  45. package/selected-skills/financeskills/skills/close-management/SKILL.md +85 -0
  46. package/selected-skills/financeskills/skills/close-management/references/close-task-library.md +32 -0
  47. package/selected-skills/financeskills/skills/company-valuation/EXAMPLE.md +21 -0
  48. package/selected-skills/financeskills/skills/company-valuation/SKILL.md +80 -0
  49. package/selected-skills/financeskills/skills/company-valuation/references/terminal-value-guide.md +33 -0
  50. package/selected-skills/financeskills/skills/corporate-consolidation/EXAMPLE.md +21 -0
  51. package/selected-skills/financeskills/skills/corporate-consolidation/SKILL.md +84 -0
  52. package/selected-skills/financeskills/skills/corporate-consolidation/references/consolidation-standard.md +28 -0
  53. package/selected-skills/financeskills/skills/corporate-consolidation/references/minority-interest.md +25 -0
  54. package/selected-skills/financeskills/skills/credit-analysis/EXAMPLE.md +21 -0
  55. package/selected-skills/financeskills/skills/credit-analysis/SKILL.md +84 -0
  56. package/selected-skills/financeskills/skills/credit-analysis/references/covenant-guide.md +26 -0
  57. package/selected-skills/financeskills/skills/crypto-accounting/EXAMPLE.md +21 -0
  58. package/selected-skills/financeskills/skills/crypto-accounting/SKILL.md +81 -0
  59. package/selected-skills/financeskills/skills/crypto-accounting/references/fasb-crypto.md +26 -0
  60. package/selected-skills/financeskills/skills/crypto-accounting/references/ifrs-crypto.md +25 -0
  61. package/selected-skills/financeskills/skills/cvp-breakeven/EXAMPLE.md +21 -0
  62. package/selected-skills/financeskills/skills/cvp-breakeven/SKILL.md +78 -0
  63. package/selected-skills/financeskills/skills/cvp-breakeven/references/cvp-patterns.md +28 -0
  64. package/selected-skills/financeskills/skills/debt-payoff/EXAMPLE.md +21 -0
  65. package/selected-skills/financeskills/skills/debt-payoff/SKILL.md +94 -0
  66. package/selected-skills/financeskills/skills/debt-payoff/references/debt-strategies.md +32 -0
  67. package/selected-skills/financeskills/skills/debt-payoff/references/interest-calculations.md +27 -0
  68. package/selected-skills/financeskills/skills/debt-restructuring/EXAMPLE.md +21 -0
  69. package/selected-skills/financeskills/skills/debt-restructuring/SKILL.md +79 -0
  70. package/selected-skills/financeskills/skills/debt-restructuring/references/creditor-priority.md +26 -0
  71. package/selected-skills/financeskills/skills/debt-restructuring/references/restructuring-types.md +24 -0
  72. package/selected-skills/financeskills/skills/deferred-tax/EXAMPLE.md +21 -0
  73. package/selected-skills/financeskills/skills/deferred-tax/SKILL.md +86 -0
  74. package/selected-skills/financeskills/skills/deferred-tax/references/td-catalogue.md +39 -0
  75. package/selected-skills/financeskills/skills/earned-value-mgmt/EXAMPLE.md +21 -0
  76. package/selected-skills/financeskills/skills/earned-value-mgmt/SKILL.md +79 -0
  77. package/selected-skills/financeskills/skills/earned-value-mgmt/references/forecasting-eac.md +27 -0
  78. package/selected-skills/financeskills/skills/earned-value-mgmt/references/pmi-evm.md +29 -0
  79. package/selected-skills/financeskills/skills/ecl-computation/EXAMPLE.md +21 -0
  80. package/selected-skills/financeskills/skills/ecl-computation/SKILL.md +85 -0
  81. package/selected-skills/financeskills/skills/ecl-computation/references/ifrs9-standard.md +27 -0
  82. package/selected-skills/financeskills/skills/ecl-computation/references/risk-modeling.md +26 -0
  83. package/selected-skills/financeskills/skills/esg-reporting/EXAMPLE.md +17 -0
  84. package/selected-skills/financeskills/skills/esg-reporting/SKILL.md +79 -0
  85. package/selected-skills/financeskills/skills/esg-reporting/references/ghg-protocol.md +22 -0
  86. package/selected-skills/financeskills/skills/esg-reporting/references/sasb-map.md +25 -0
  87. package/selected-skills/financeskills/skills/financial-analysis/EXAMPLE.md +21 -0
  88. package/selected-skills/financeskills/skills/financial-analysis/SKILL.md +108 -0
  89. package/selected-skills/financeskills/skills/financial-analysis/assets/analysis-memo-template.md +31 -0
  90. package/selected-skills/financeskills/skills/financial-analysis/references/accounting-standards.md +45 -0
  91. package/selected-skills/financeskills/skills/financial-analysis/references/ratio-definitions.md +14 -0
  92. package/selected-skills/financeskills/skills/fixed-asset-accounting/EXAMPLE.md +21 -0
  93. package/selected-skills/financeskills/skills/fixed-asset-accounting/SKILL.md +78 -0
  94. package/selected-skills/financeskills/skills/fixed-asset-accounting/references/useful-life-guide.md +30 -0
  95. package/selected-skills/financeskills/skills/forensic-accounting/EXAMPLE.md +21 -0
  96. package/selected-skills/financeskills/skills/forensic-accounting/SKILL.md +91 -0
  97. package/selected-skills/financeskills/skills/forensic-accounting/references/benfords-law.md +24 -0
  98. package/selected-skills/financeskills/skills/forensic-accounting/references/fraud-triangle.md +26 -0
  99. package/selected-skills/financeskills/skills/insurance-reserving/EXAMPLE.md +21 -0
  100. package/selected-skills/financeskills/skills/insurance-reserving/SKILL.md +82 -0
  101. package/selected-skills/financeskills/skills/insurance-reserving/references/actuarial-methods.md +33 -0
  102. package/selected-skills/financeskills/skills/insurance-reserving/references/insurance-metrics.md +26 -0
  103. package/selected-skills/financeskills/skills/intercompany-accounting/EXAMPLE.md +21 -0
  104. package/selected-skills/financeskills/skills/intercompany-accounting/SKILL.md +79 -0
  105. package/selected-skills/financeskills/skills/intercompany-accounting/references/elimination-entries.md +35 -0
  106. package/selected-skills/financeskills/skills/inventory-costing/EXAMPLE.md +21 -0
  107. package/selected-skills/financeskills/skills/inventory-costing/SKILL.md +80 -0
  108. package/selected-skills/financeskills/skills/inventory-costing/references/costing-examples.md +31 -0
  109. package/selected-skills/financeskills/skills/investment-analysis/EXAMPLE.md +21 -0
  110. package/selected-skills/financeskills/skills/investment-analysis/SKILL.md +82 -0
  111. package/selected-skills/financeskills/skills/investment-analysis/references/competitive-advantage.md +31 -0
  112. package/selected-skills/financeskills/skills/investment-analysis/references/valuation-guide.md +29 -0
  113. package/selected-skills/financeskills/skills/journal-entry/EXAMPLE.md +21 -0
  114. package/selected-skills/financeskills/skills/journal-entry/SKILL.md +94 -0
  115. package/selected-skills/financeskills/skills/journal-entry/assets/journal-entry-template.md +21 -0
  116. package/selected-skills/financeskills/skills/journal-entry/references/entry-patterns.md +51 -0
  117. package/selected-skills/financeskills/skills/lbo-modeling/EXAMPLE.md +21 -0
  118. package/selected-skills/financeskills/skills/lbo-modeling/SKILL.md +88 -0
  119. package/selected-skills/financeskills/skills/lbo-modeling/references/debt-structures.md +22 -0
  120. package/selected-skills/financeskills/skills/lbo-modeling/references/lbo-best-practices.md +27 -0
  121. package/selected-skills/financeskills/skills/lease-accounting/EXAMPLE.md +21 -0
  122. package/selected-skills/financeskills/skills/lease-accounting/SKILL.md +88 -0
  123. package/selected-skills/financeskills/skills/lease-accounting/assets/commencement-summary-template.md +28 -0
  124. package/selected-skills/financeskills/skills/lease-accounting/references/ibr-guide.md +26 -0
  125. package/selected-skills/financeskills/skills/net-worth-tracker/EXAMPLE.md +21 -0
  126. package/selected-skills/financeskills/skills/net-worth-tracker/SKILL.md +98 -0
  127. package/selected-skills/financeskills/skills/net-worth-tracker/references/asset-valuation.md +40 -0
  128. package/selected-skills/financeskills/skills/net-worth-tracker/references/net-worth-benchmarks.md +33 -0
  129. package/selected-skills/financeskills/skills/nlp-earnings-sentiment/EXAMPLE.md +17 -0
  130. package/selected-skills/financeskills/skills/nlp-earnings-sentiment/SKILL.md +77 -0
  131. package/selected-skills/financeskills/skills/nlp-earnings-sentiment/references/finbert-guide.md +26 -0
  132. package/selected-skills/financeskills/skills/nlp-earnings-sentiment/references/linguistic-finance.md +23 -0
  133. package/selected-skills/financeskills/skills/oil-gas-valuation/EXAMPLE.md +21 -0
  134. package/selected-skills/financeskills/skills/oil-gas-valuation/SKILL.md +86 -0
  135. package/selected-skills/financeskills/skills/oil-gas-valuation/references/sec-reporting.md +22 -0
  136. package/selected-skills/financeskills/skills/oil-gas-valuation/references/spe-standards.md +25 -0
  137. package/selected-skills/financeskills/skills/personal-budgeting/EXAMPLE.md +21 -0
  138. package/selected-skills/financeskills/skills/personal-budgeting/SKILL.md +100 -0
  139. package/selected-skills/financeskills/skills/personal-budgeting/references/budgeting-methods.md +40 -0
  140. package/selected-skills/financeskills/skills/personal-budgeting/references/spending-categories.md +40 -0
  141. package/selected-skills/financeskills/skills/predictive-burn-rate/EXAMPLE.md +21 -0
  142. package/selected-skills/financeskills/skills/predictive-burn-rate/SKILL.md +82 -0
  143. package/selected-skills/financeskills/skills/predictive-burn-rate/references/startup-metrics.md +27 -0
  144. package/selected-skills/financeskills/skills/predictive-burn-rate/references/time-series-forecasting.md +22 -0
  145. package/selected-skills/financeskills/skills/product-profitability/EXAMPLE.md +21 -0
  146. package/selected-skills/financeskills/skills/product-profitability/SKILL.md +83 -0
  147. package/selected-skills/financeskills/skills/product-profitability/references/allocation-logic.md +28 -0
  148. package/selected-skills/financeskills/skills/product-profitability/references/unit-economics.md +30 -0
  149. package/selected-skills/financeskills/skills/retirement-planning/EXAMPLE.md +21 -0
  150. package/selected-skills/financeskills/skills/retirement-planning/SKILL.md +98 -0
  151. package/selected-skills/financeskills/skills/retirement-planning/references/compound-growth.md +38 -0
  152. package/selected-skills/financeskills/skills/retirement-planning/references/retirement-fundamentals.md +29 -0
  153. package/selected-skills/financeskills/skills/revenue-recognition/EXAMPLE.md +21 -0
  154. package/selected-skills/financeskills/skills/revenue-recognition/SKILL.md +86 -0
  155. package/selected-skills/financeskills/skills/revenue-recognition/assets/allocation-workpaper-template.md +30 -0
  156. package/selected-skills/financeskills/skills/revenue-recognition/references/ifrs15-guide.md +28 -0
  157. package/selected-skills/financeskills/skills/revenue-recognition/references/saas-rev-rec.md +26 -0
  158. package/selected-skills/financeskills/skills/risk-assessment/EXAMPLE.md +21 -0
  159. package/selected-skills/financeskills/skills/risk-assessment/SKILL.md +83 -0
  160. package/selected-skills/financeskills/skills/risk-assessment/references/hedging-guide.md +24 -0
  161. package/selected-skills/financeskills/skills/risk-assessment/references/risk-metrics.md +24 -0
  162. package/selected-skills/financeskills/skills/sox-compliance/EXAMPLE.md +17 -0
  163. package/selected-skills/financeskills/skills/sox-compliance/SKILL.md +88 -0
  164. package/selected-skills/financeskills/skills/sox-compliance/references/sampling-methodology.md +27 -0
  165. package/selected-skills/financeskills/skills/startup-valuation/EXAMPLE.md +21 -0
  166. package/selected-skills/financeskills/skills/startup-valuation/SKILL.md +88 -0
  167. package/selected-skills/financeskills/skills/startup-valuation/references/berkus-method.md +25 -0
  168. package/selected-skills/financeskills/skills/startup-valuation/references/vc-method.md +23 -0
  169. package/selected-skills/financeskills/skills/statement-preparation/EXAMPLE.md +21 -0
  170. package/selected-skills/financeskills/skills/statement-preparation/SKILL.md +86 -0
  171. package/selected-skills/financeskills/skills/statement-preparation/references/accruals-deferrals.md +24 -0
  172. package/selected-skills/financeskills/skills/statement-preparation/references/cash-flow-method.md +32 -0
  173. package/selected-skills/financeskills/skills/tax-efficient-investing/EXAMPLE.md +21 -0
  174. package/selected-skills/financeskills/skills/tax-efficient-investing/SKILL.md +97 -0
  175. package/selected-skills/financeskills/skills/tax-efficient-investing/references/account-types.md +33 -0
  176. package/selected-skills/financeskills/skills/tax-efficient-investing/references/asset-location.md +36 -0
  177. package/selected-skills/financeskills/skills/tax-planning/EXAMPLE.md +21 -0
  178. package/selected-skills/financeskills/skills/tax-planning/SKILL.md +93 -0
  179. package/selected-skills/financeskills/skills/tax-planning/references/common-deductions.md +28 -0
  180. package/selected-skills/financeskills/skills/tax-planning/references/tax-code-lookup.md +25 -0
  181. package/selected-skills/financeskills/skills/three-statement-modeling/EXAMPLE.md +21 -0
  182. package/selected-skills/financeskills/skills/three-statement-modeling/SKILL.md +84 -0
  183. package/selected-skills/financeskills/skills/three-statement-modeling/references/model-checks.md +32 -0
  184. package/selected-skills/financeskills/skills/treasury-management/EXAMPLE.md +21 -0
  185. package/selected-skills/financeskills/skills/treasury-management/SKILL.md +83 -0
  186. package/selected-skills/financeskills/skills/treasury-management/references/fx-hedging.md +27 -0
  187. package/selected-skills/financeskills/skills/treasury-management/references/liquidity-metrics.md +24 -0
  188. package/selected-skills/financeskills/skills/variance-analysis/EXAMPLE.md +21 -0
  189. package/selected-skills/financeskills/skills/variance-analysis/SKILL.md +78 -0
  190. package/selected-skills/financeskills/skills/variance-analysis/references/overhead-logic.md +24 -0
  191. package/selected-skills/financeskills/skills/variance-analysis/references/variance-math.md +35 -0
  192. package/selected-skills/financeskills/skills/venture-debt/EXAMPLE.md +21 -0
  193. package/selected-skills/financeskills/skills/venture-debt/SKILL.md +84 -0
  194. package/selected-skills/financeskills/skills/venture-debt/references/saas-debt-metrics.md +26 -0
  195. package/selected-skills/financeskills/skills/venture-debt/references/venture-lending.md +23 -0
  196. package/selected-skills/financeskills/skills/wacc-computation/EXAMPLE.md +21 -0
  197. package/selected-skills/financeskills/skills/wacc-computation/SKILL.md +98 -0
  198. package/selected-skills/financeskills/skills/wacc-computation/assets/wacc-memo-template.md +40 -0
  199. package/selected-skills/financeskills/skills/wacc-computation/references/beta-math.md +24 -0
  200. package/selected-skills/financeskills/skills/wacc-computation/references/capm-basics.md +24 -0
  201. package/selected-skills/financeskills/skills/working-capital-analysis/EXAMPLE.md +21 -0
  202. package/selected-skills/financeskills/skills/working-capital-analysis/SKILL.md +83 -0
  203. package/selected-skills/financeskills/skills/working-capital-analysis/references/wc-metrics.md +30 -0
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: lbo-modeling
3
+ description: When the user wants to model a Leveraged Buyout (LBO) for private equity analysis. Also use when the user mentions "private equity model," "debt capacity analysis," "exit IRR," "MOIC calculation," "sources and uses," or "entry multiple."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # LBO Modeling
9
+
10
+ You are a Private Equity Associate. Your goal is to determine if a company is a viable LBO candidate by modeling debt repayment, cash flow generation, and exit returns (IRR/MOIC).
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Transaction Context**
15
+ - What is the Entry Multiple (e.g., 10x EBITDA)?
16
+ - What is the estimated Exit Multiple?
17
+ - What is the target holding period (usually 3-7 years)?
18
+
19
+ 2. **Financing Assumptions**
20
+ - How much debt can the company support (Debt/EBITDA)?
21
+ - What are the interest rates for different tranches (Senior, Mezzanine)?
22
+
23
+ 3. **Operations & Growth**
24
+ - What is the projected EBITDA growth?
25
+ - What are the ongoing CapEx requirements?
26
+
27
+ ---
28
+
29
+ ## LBO Framework
30
+
31
+ ### Priority Order
32
+ 1. **Sources & Uses** (Calculating the total purchase price and how it's funded).
33
+ 2. **Operations Forecast** (Projecting Revenue to Free Cash Flow).
34
+ 3. **Debt Schedule** (Modeling the mandatory and optional repayment of debt).
35
+ 4. **Returns Analysis** (Calculating Internal Rate of Return (IRR) and Multiple of Invested Capital (MOIC)).
36
+ 5. **Sensitivity Analysis** (Testing returns against entry/exit multiples and growth rates).
37
+
38
+ ---
39
+
40
+ ## Technical Modeling Steps
41
+
42
+ ### 1. Sources & Uses Table
43
+ - **Uses**: Purchase Equity, Refinance Existing Debt, Transaction Fees.
44
+ - **Sources**: New Debt, Sponsor Equity.
45
+
46
+ ### 2. Cash Flow for Debt Service (CFADS)
47
+ - Calculate EBITDA -> Less Taxes -> Less Interest -> Less CapEx -> Less Δ Working Capital.
48
+ - This represents the cash available to pay down principal.
49
+
50
+ ### 3. IRR Calculation
51
+ - `IRR = (Exit Proceeds / Entry Equity)^(1/n) - 1`.
52
+ - MOIC (Multiple of Money) = `Exit Proceeds / Entry Equity`.
53
+
54
+ ---
55
+
56
+ ## Output Format
57
+
58
+ ### LBO Analysis Summary
59
+
60
+ **The Deal**
61
+ - Total Transaction Value.
62
+ - Equity Contribution vs. Debt Funding.
63
+
64
+ **The Returns (Base Case)**
65
+ - **IRR**: (e.g., 22.5%).
66
+ - **MOIC**: (e.g., 2.4x).
67
+ - Exit Date: (e.g., Year 5).
68
+
69
+ **Returns Matrix**
70
+ - Table showing IRR across different Exit Multiples and Revenue Growth scenarios.
71
+
72
+ ---
73
+
74
+ ## Scripts
75
+ - [calculate.py](./scripts/calculate.py): Sources & uses, cash sweep debt schedule, and IRR/MoM functions. Run with `python3 scripts/calculate.py` to self-test; import the functions for actual computations.
76
+
77
+ ---
78
+
79
+ ## References
80
+ - [LBO Modeling Standards](./references/lbo-best-practices.md): Industry conventions.
81
+ - [Debt Tranches Explained](./references/debt-structures.md): Senior vs. Subordinated.
82
+
83
+ ---
84
+
85
+ ## Related Skills
86
+ - **investment-analysis**: For the baseline business quality assessment.
87
+ - **financial-analysis**: For auditing the EBITDA sustainability.
88
+ - **risk-assessment**: For evaluating the bankruptcy risk of high leverage.
@@ -0,0 +1,22 @@
1
+ # LBO Debt Structures
2
+
3
+ ## Typical Capital Stack (top = paid first)
4
+ | Tranche | Leverage | Pricing (indicative) | Features |
5
+ |---|---|---|---|
6
+ | Revolver | undrawn at close | SOFR + 200–350 | Liquidity backstop; springing covenant |
7
+ | Term Loan A | with TLB, 0.5–1.5x | SOFR + 250–350 | Bank-held, 5–10% annual amortization |
8
+ | Term Loan B | 3–4.5x cumulative | SOFR + 350–500, 0–0.5% floor | Institutional, 1% amort, covenant-lite common |
9
+ | Senior Notes / High Yield | +1–2x | Fixed 7–10% | No amort, call protection (NC-2/3) |
10
+ | Mezzanine / PIK | +0.5–1x | 11–14% cash+PIK | Warrants sometimes attached |
11
+ | Sponsor Equity | 40–60% of capital | — | Residual claim |
12
+
13
+ ## Key Terms to Model
14
+ - **Amortization**: TLA meaningful; TLB 1%/yr; notes bullet.
15
+ - **Cash sweep / ECF sweep**: % of excess cash flow, often leverage-ratcheted.
16
+ - **PIK toggle**: interest accrues to principal — compounds against the exit equity.
17
+ - **Call protection**: HY non-call periods and premiums (e.g., 105/102.5/100) matter for refi scenarios.
18
+ - **Covenants**: maintenance (leverage, coverage — tested quarterly, TLA/revolver) vs. incurrence (HY). Model headroom ≥ 15–25% cushion to projections.
19
+ - **OID & financing fees**: amortize into interest expense (effective yield); add cash cost at close.
20
+
21
+ ## Structuring Logic
22
+ More TLA/amortizing debt = faster deleveraging, better IRR from paydown but tighter covenants. More HY/PIK = flexibility, higher cost, returns lean on growth. Match amortization burden to FCF stability of the business.
@@ -0,0 +1,27 @@
1
+ # LBO Modeling Best Practices
2
+
3
+ ## Model Architecture (order matters)
4
+ 1. Transaction assumptions: entry EV (multiple × LTM EBITDA), sources & uses, fees.
5
+ 2. Debt schedule with mandatory amortization + cash sweep.
6
+ 3. Integrated 3-statement projection (or EBITDA-to-FCF bridge for quick models).
7
+ 4. Exit: exit multiple × exit-year EBITDA → equity proceeds → IRR/MoM.
8
+ 5. Sensitivities: entry/exit multiple grid, leverage grid, growth/margin grid.
9
+
10
+ ## Sources & Uses Discipline
11
+ - Uses: equity purchase price + refinanced debt + transaction fees (2–3% of EV) + financing fees (2–3% of debt, capitalized and amortized).
12
+ - Sources: each debt tranche + sponsor equity + management rollover. Must balance to the dollar.
13
+ - Minimum cash to balance sheet — never fund the deal to zero cash.
14
+
15
+ ## Cash Sweep Mechanics
16
+ `FCF available = EBITDA − cash interest − cash taxes − capex − ΔNWC − mandatory amort`
17
+ Sweep order: revolver first, then tranches by seniority (check covenants — some TLBs have 50%/25%/0% ECF sweep tiers by leverage).
18
+
19
+ ## Returns Math
20
+ - `MoM = Exit equity / Entry equity`; `IRR = MoM^(1/years) − 1` for single-flow deals.
21
+ - Value creation bridge at exit: EBITDA growth + multiple expansion + debt paydown = total equity gain. Attribute every deal — if returns are mostly multiple expansion, the thesis is market beta.
22
+ - Target: 20–25% IRR / 2.0–3.0x MoM over 5 years.
23
+
24
+ ## Sanity Checks
25
+ - Leverage: 4–6x total debt/EBITDA typical; interest coverage (EBITDA/cash interest) ≥ 2x in all projection years.
26
+ - Credit stats improve over hold or the model has a problem.
27
+ - Circularity (interest ↔ cash) — use opening-balance interest convention or iterative solve; document which.
@@ -0,0 +1,21 @@
1
+ # Worked Example - lease-accounting
2
+
3
+ ## Ask
4
+
5
+ > We signed a 5-year office lease: 10,000,000 NGN per year paid annually in arrears, IBR 18%, no incentives, no restoration. Compute the initial lease liability and ROU asset and give me year-1 entries.
6
+
7
+ ## What a correct response contains
8
+
9
+ Liability = PV of 5 payments of 10M at 18% = ~31,272,000 NGN. ROU = same. Year 1: interest = ~5,629,000, payment 10M reduces liability to ~26,901,000; ROU depreciation = ~6,254,400/yr straight-line.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/lease_portfolio.csv`:
14
+
15
+ > Using the attached lease portfolio (evals/files/lease_portfolio.csv) — payments annual in arrears, no renewal options, commencement today — measure each lease liability and right-of-use asset at commencement under IFRS 16, and compute total year-1 interest expense and straight-line depreciation. Produce a commencement summary table and the initial journal entry.
16
+
17
+ Expected: Liabilities: L-01 $1,025,049, L-02 $689,597, L-03 $194,383; total $1,909,029 (ROU assets equal liabilities here). Year-1 interest $144,416; year-1 depreciation $339,805.
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,88 @@
1
+ ---
2
+ name: lease-accounting
3
+ description: When the user wants to account for leases under IFRS 16 or ASC 842. Also use when the user mentions "right-of-use asset," "lease liability," "incremental borrowing rate," "lease modification," "operating vs finance lease," "lease term," or "embedded lease."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Lease Accounting (IFRS 16 / ASC 842)
9
+
10
+ You are a Technical Accounting Manager. Your goal is to identify, measure, and account for leases correctly — initial recognition, subsequent measurement, modifications, and disclosure.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Lease Identification**
15
+ - Is there an identified asset (explicit or implicit, no substantive substitution right)?
16
+ - Does the customer control the use (direct how/for what purpose) and obtain substantially all economic benefits?
17
+ - Check embedded leases in service/outsourcing/transport/storage contracts.
18
+
19
+ 2. **Measurement Inputs**
20
+ - Lease term: non-cancellable period + reasonably certain extension/termination options.
21
+ - Payments: fixed, in-substance fixed, index-linked variable (in), usage-based variable (out), residual guarantees, purchase options.
22
+ - Discount rate: rate implicit in lease, else incremental borrowing rate (IBR).
23
+
24
+ ---
25
+
26
+ ## Accounting Framework
27
+
28
+ ### Initial Recognition (lessee)
29
+ - `Lease liability = PV of unpaid lease payments at the discount rate`
30
+ - `ROU asset = liability + prepaid payments + initial direct costs + restoration estimate − incentives received`
31
+
32
+ ### Subsequent Measurement
33
+ - Liability: effective interest method (interest = opening balance × rate; payments reduce balance).
34
+ - ROU asset: depreciate straight-line over shorter of lease term and useful life (to useful life if ownership transfers/purchase option reasonably certain).
35
+ - IFRS 16: single model. ASC 842: finance leases as above; operating leases keep single straight-line lease cost (liability math identical).
36
+
37
+ ### Exemptions
38
+ Short-term (≤ 12 months, no purchase option) and low-value assets (IFRS only, ~$5k new): expense straight-line. Apply policy consistently and disclose.
39
+
40
+ ### Reassessment & Modifications
41
+ - Index/rate change → remeasure liability against ROU (unchanged discount rate).
42
+ - Term/option reassessment → remeasure with REVISED discount rate.
43
+ - Modification adding asset at market rate → separate lease. Scope decrease → reduce ROU proportionately, gain/loss to P&L. Other modifications → remeasure against ROU.
44
+
45
+ ---
46
+
47
+ ## Technical Analysis Steps
48
+
49
+ 1. **Build the amortization schedule** — period, opening liability, interest, payment, closing liability; parallel ROU depreciation track. Verify with code.
50
+ 2. **Classify P&L and cash flow effects** — depreciation + interest (IFRS); principal → financing, interest → policy choice (IFRS) / operating (US GAAP).
51
+ 3. **Transition/portfolio checks** — consistent IBR matrix by currency/term; completeness sweep of contracts > 12 months.
52
+
53
+ ---
54
+
55
+ ## Output Format
56
+
57
+ ### Lease Accounting Memo
58
+
59
+ **Conclusion**: lease/not a lease; classification (US GAAP); exemptions applied.
60
+
61
+ **Measurement**: inputs table (term, rate, payments), initial liability and ROU values.
62
+
63
+ **Schedule**: full amortization table + annual JE summary.
64
+
65
+ **Judgments**: option assessments, IBR derivation, variable payment treatment.
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
+ - [IBR Determination](./references/ibr-guide.md): Building incremental borrowing rates defensibly.
76
+
77
+ ---
78
+
79
+ ## Assets
80
+ - [commencement-summary-template.md](./assets/commencement-summary-template.md): Portfolio measurement and journal entry template.
81
+
82
+ ---
83
+
84
+ ## Related Skills
85
+ - **journal-entry**: For the monthly lease entries.
86
+ - **aro-computation**: Restoration obligations attached to leased sites.
87
+ - **statement-preparation**: Lease presentation and disclosure in statements.
88
+ - **deferred-tax**: ROU/liability temporary differences.
@@ -0,0 +1,28 @@
1
+ # Lease Commencement Summary (IFRS 16 / ASC 842)
2
+
3
+ **Lessee:** {entity} | **Commencement:** {date} | **Discount basis:** {IBR / implicit rate}
4
+
5
+ ## Portfolio Measurement
6
+ | Lease | Asset | Payment | Timing | Term | Rate | Lease liability | ROU asset |
7
+ |---|---|---|---|---|---|---|---|
8
+ | | | | arrears/advance | | | | |
9
+ | **Total** | | | | | | **{x}** | **{x}** |
10
+
11
+ {ROU = liability + prepaid + initial direct costs + dismantling - incentives. State any differences.}
12
+
13
+ ## Year-1 P&L Impact
14
+ | Lease | Interest expense | Depreciation | Total | vs old operating-lease rent |
15
+ |---|---|---|---|---|
16
+
17
+ ## Initial Journal Entry
18
+ | Account | Dr | Cr |
19
+ |---|---|---|
20
+ | Right-of-use asset | {x} | |
21
+ | Lease liability | | {x} |
22
+
23
+ ## Judgments
24
+ - Renewal/termination options {included/excluded - why}
25
+ - Short-term / low-value exemptions applied: {list}
26
+
27
+ ---
28
+ *Present values computed with scripts/calculate.py. AI-prepared - review required.*
@@ -0,0 +1,26 @@
1
+ # Incremental Borrowing Rate (IBR) Determination
2
+
3
+ ## Definition
4
+ The rate the lessee would pay to borrow, over a similar term, with similar security, the amount needed to obtain an asset of similar value in a similar economic environment. It is lease-specific, not the company's WACC and not its existing average debt cost.
5
+
6
+ ## Build-Up Approach (the auditable method)
7
+ `IBR = Reference rate (currency + term matched) + Credit spread (entity, secured basis) + Asset/security adjustment`
8
+
9
+ 1. **Reference rate**: government bond yield in the lease currency, tenor ≈ weighted-average lease payment timing (duration, not full term). NGN leases → FGN bond curve; USD → Treasury curve.
10
+ 2. **Credit spread**: from the entity's traded debt, recent loan pricing, or rating-implied spread matrix. Subsidiaries: stand-alone credit unless parent guarantee exists in the lease.
11
+ 3. **Security adjustment**: leases are effectively secured borrowing → deduct an unsecured-to-secured adjustment (commonly 20–60 bps; property leases at the higher security end).
12
+
13
+ ## Portfolio Practicalities
14
+ - Build an IBR matrix: currency × term bucket (1–3y, 3–5y, 5–10y, 10y+) × entity, refreshed quarterly; apply to new leases by bucket.
15
+ - Document the date of each rate — IBR is set at commencement (or modification), not reporting date.
16
+ - Materiality shortcut: portfolio-level rate permitted for similar leases (IFRS 16.B1).
17
+
18
+ ## Common Audit Findings
19
+ 1. Using WACC or a flat round number across all leases.
20
+ 2. Term mismatch (10-year lease at a 1-year rate).
21
+ 3. Currency mismatch (USD rate on NGN-denominated payments — the inflation differential makes this badly wrong).
22
+ 4. Stale rates applied to new commencements after a rate environment shift.
23
+ 5. No security adjustment documentation.
24
+
25
+ ## Sensitivity
26
+ Disclose/monitor: ±100 bps typically moves the liability ~4–8% on a 10-year lease. High-rate environments (NGN) make the discounting effect dramatic — a 10-year NGN lease at 18% discounts late-year payments to very little.
@@ -0,0 +1,21 @@
1
+ # Worked Example - net-worth-tracker
2
+
3
+ ## Ask
4
+
5
+ > Here are my finances: checking $3,000, savings $12,000, 401k $68,000, car value $15,000. Debts: car loan $9,000, student loan $22,000, credit card $3,500. What's my net worth and how healthy does it look?
6
+
7
+ ## What a correct response contains
8
+
9
+ Should total assets: $98,000. Should total liabilities: $34,500. Should calculate net worth: $63,500. Should compute debt-to-asset ratio: 35% (healthy, below 50%). Should assess liquidity: liquid assets $15,000 (15% — adequate). Should flag that 401k is the dominant asset at 69% and comment on investment concentration.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture `evals/files/balance_sheet.csv`:
14
+
15
+ > From the attached balance sheet (evals/files/balance_sheet.csv), calculate net worth, debt-to-asset ratio, and asset allocation. Compare to the prior period values in the file.
16
+
17
+ Expected: Current net worth $87,500; prior net worth $74,200; change +$13,300 (+17.9%); debt-to-asset ratio 28.6%; investment assets 71% of total. Primary driver of growth: retirement account appreciation.
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: net-worth-tracker
3
+ description: When the user wants to calculate their net worth, track assets and liabilities over time, measure financial progress, analyse asset allocation, or set a net worth milestone. Also use when the user mentions "what am I worth," "assets vs debts," "balance sheet," "financial snapshot," or "am I building wealth."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Net Worth Tracker
9
+
10
+ You are a Personal Financial Advisor. Your goal is to give the user a clear, honest snapshot of their total financial position and a trend they can track monthly.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Asset Inventory**
15
+ - Cash and bank accounts.
16
+ - Investment and retirement accounts (current market value).
17
+ - Real estate (current market value, not purchase price).
18
+ - Vehicles, business equity, other valuables.
19
+
20
+ 2. **Liability Inventory**
21
+ - Mortgage balance.
22
+ - Car loans, student loans, personal loans.
23
+ - Credit card balances.
24
+ - Any other debt.
25
+
26
+ 3. **Tracking Cadence**
27
+ - First-time snapshot or comparison to a previous period?
28
+ - Are previous-period values available?
29
+
30
+ ---
31
+
32
+ ## Calculation Framework
33
+
34
+ ### Net Worth Formula
35
+ `Net Worth = Total Assets − Total Liabilities`
36
+
37
+ ### Asset Allocation
38
+ Break assets into:
39
+ - **Liquid** (cash, chequing, savings, money market) — accessible within days.
40
+ - **Investment** (brokerage, retirement accounts) — market-value based.
41
+ - **Illiquid** (real estate, business equity, collectibles) — estimated market value.
42
+
43
+ ### Key Ratios
44
+ - **Debt-to-Asset Ratio** = Total Liabilities / Total Assets (lower is better; <0.5 is healthy).
45
+ - **Liquid Asset Ratio** = Liquid Assets / Total Assets (target ≥ 10% for emergency resilience).
46
+ - **Investment Asset Ratio** = Investment Assets / Total Assets (proxy for wealth-building progress).
47
+
48
+ ---
49
+
50
+ ## Technical Steps
51
+
52
+ ### 1. Sum All Assets by Category
53
+ Use current market values, not book or purchase values.
54
+
55
+ ### 2. Sum All Liabilities
56
+ Use outstanding balances, not original loan amounts.
57
+
58
+ ### 3. Calculate Net Worth and Ratios
59
+ Compute net worth, debt-to-asset ratio, and category percentages.
60
+
61
+ ### 4. Period-over-Period Change
62
+ If prior snapshot exists: compute dollar change, percentage change, and which asset/liability drove the change most.
63
+
64
+ ---
65
+
66
+ ## Output Format
67
+
68
+ **Net Worth Statement**
69
+ - Assets table (category, amount, % of total).
70
+ - Liabilities table (category, amount, % of total).
71
+ - Net worth and key ratios.
72
+
73
+ **Trend Analysis** (if prior period available)
74
+ - Net worth change, primary driver of change.
75
+
76
+ **Health Assessment**
77
+ - Commentary on debt-to-asset ratio, liquidity, and investment allocation.
78
+
79
+ **Next Milestone**
80
+ - Nearest round-number net worth target and months to reach it at the current savings rate.
81
+
82
+ ---
83
+
84
+ ## Scripts
85
+ - [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.
86
+
87
+ ---
88
+
89
+ ## References
90
+ - [Net Worth Benchmarks](./references/net-worth-benchmarks.md): Age-based net worth benchmarks and wealth percentiles.
91
+ - [Asset Valuation Guide](./references/asset-valuation.md): How to value illiquid assets (real estate, business equity, collectibles).
92
+
93
+ ---
94
+
95
+ ## Related Skills
96
+ - **personal-budgeting**: The monthly savings line in the budget is the primary driver of net worth growth.
97
+ - **debt-payoff**: Liability reduction is the fastest path to net worth improvement for debt-heavy individuals.
98
+ - **retirement-planning**: Retirement accounts are typically the largest investment asset — ensure they are on track.
@@ -0,0 +1,40 @@
1
+ # Asset Valuation Guide
2
+
3
+ How to assign realistic values to assets for a personal balance sheet.
4
+
5
+ ## Liquid Assets (Easy — Use Account Balances)
6
+ - Chequing, savings, money market: use the current account balance.
7
+ - Cash on hand: include if material.
8
+
9
+ ## Investment Accounts
10
+ - Brokerage and retirement accounts: use the current market value shown on the statement.
11
+ - Do NOT use cost basis (what you paid) — use market value.
12
+
13
+ ## Real Estate
14
+ Use current market value, not purchase price or mortgage balance.
15
+ Estimation methods (in order of reliability):
16
+ 1. Recent appraisal (most accurate).
17
+ 2. Automated valuation models (Zillow, Redfin estimate) — reasonable proxy, ±10–15%.
18
+ 3. Comparable sales (comps) from a local real estate agent.
19
+
20
+ Subtract nothing for mortgage here — that is captured on the liabilities side.
21
+
22
+ ## Vehicles
23
+ - Use Kelley Blue Book or similar guide for current private-party value.
24
+ - Depreciation is fast in the first 3 years; update annually.
25
+
26
+ ## Business Equity
27
+ Difficult to value without a formal appraisal. Common shortcuts:
28
+ - **Revenue multiple**: 0.5–1× annual revenue for service businesses.
29
+ - **Earnings multiple**: 3–5× EBITDA for stable small businesses.
30
+ - Use conservatively and note the uncertainty.
31
+
32
+ ## Collectibles & Valuables
33
+ - Use recent auction results or certified appraisals.
34
+ - Only include if you would realistically sell.
35
+ - Do not include sentimental items unless they have clear market value.
36
+
37
+ ## What NOT to Include
38
+ - Future earnings or bonuses (not yet received).
39
+ - Value of pension promises (present value is complex — note separately).
40
+ - Life insurance death benefit (only include cash surrender value if applicable).
@@ -0,0 +1,33 @@
1
+ # Net Worth Benchmarks
2
+
3
+ ## The Millionaire Next Door Formula
4
+ From Stanley & Danko (1996), a rule of thumb for expected net worth at a given age:
5
+
6
+ `Expected Net Worth = Age × Annual Pre-Tax Income / 10`
7
+
8
+ - **Prodigious Accumulator of Wealth (PAW)**: Net worth > 2× expected.
9
+ - **Average Accumulator of Wealth (AAW)**: Net worth ≈ expected.
10
+ - **Under Accumulator of Wealth (UAW)**: Net worth < 0.5× expected.
11
+
12
+ ## US Net Worth Percentiles by Age (Federal Reserve SCF, 2022)
13
+
14
+ | Age Group | Median NW | 75th Percentile | 90th Percentile |
15
+ |---|---|---|---|
16
+ | Under 35 | $39,000 | $136,000 | $321,000 |
17
+ | 35–44 | $135,000 | $404,000 | $854,000 |
18
+ | 45–54 | $247,000 | $704,000 | $1,500,000 |
19
+ | 55–64 | $365,000 | $1,000,000 | $2,400,000 |
20
+ | 65–74 | $410,000 | $1,200,000 | $2,900,000 |
21
+
22
+ ## Healthy Ratio Targets
23
+
24
+ | Ratio | Healthy Range |
25
+ |---|---|
26
+ | Debt-to-Asset Ratio | < 50% (ideally < 30%) |
27
+ | Liquid Asset Ratio | ≥ 10% of total assets |
28
+ | Investment Asset Ratio | ≥ 40% of total assets (by mid-career) |
29
+ | Emergency Fund | 3–6 months of expenses in liquid form |
30
+
31
+ ## Sources
32
+ - Stanley, T. J., & Danko, W. D. (1996). *The Millionaire Next Door*. Longstreet Press.
33
+ - Federal Reserve Board (2022). *Survey of Consumer Finances*.
@@ -0,0 +1,17 @@
1
+ # Worked Example - nlp-earnings-sentiment
2
+
3
+ ## Ask
4
+
5
+ > Analyze the sentiment of this earnings call transcript. Management keeps using words like 'challenging' and 'headwinds' but says the outlook is 'positive'.
6
+
7
+ ## What a correct response contains
8
+
9
+ Should identify a potential 'Tone Shift' or mismatch between specific negative descriptors and general positive outlook. Should focus on the Q&A section for reveal. Should mention uncertainty mapping (tracking 'challenging', 'headwinds'). Should provide a Sentiment Scorecard.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/earnings_call_excerpt.txt`:
14
+
15
+ > Analyze the attached earnings-call excerpt (evals/files/earnings_call_excerpt.txt): overall tone, the specific hedging/uncertainty language, the quantitative signals that cut against the positive headline, and what a sentiment model should weight most.
16
+
17
+ Expected: Surface tone positive (record OCF, 18% growth, guidance reiterated) but hedged: 'prudent to assume', 'admittedly uncertain', 'yet'. Negative quant signals: contract assets growing faster than revenue, DSO +6 days, inventory build, margin low-end cut 50bps, deal discounting. Net: cautiously positive with deteriorating quality-of-revenue markers.
@@ -0,0 +1,77 @@
1
+ ---
2
+ name: nlp-earnings-sentiment
3
+ description: When the user wants to analyze earnings call transcripts or financial news for sentiment shifts. Also use when the user mentions "analyzing earnings calls," "management tone," "sentiment score," "Q&A analysis," "detecting bullishness," or "transcripts NLP."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # NLP Earnings Sentiment
9
+
10
+ You are an AI Quant Analyst. Your goal is to use Natural Language Processing to detect subtle shifts in management confidence that quantitative data might miss.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Source Material**
15
+ - Do we have the full transcript of the earnings call?
16
+ - Do we have transcripts from the previous 4 quarters for comparison?
17
+
18
+ 2. **Target Metrics**
19
+ - Are we looking at the "Prepared Remarks" or the "Q&A Section"? (Q&A is often more revealing).
20
+
21
+ ---
22
+
23
+ ## NLP Framework
24
+
25
+ ### Technical Limitation
26
+ **Context Matters.**
27
+ Generic sentiment libraries (like VADER) often fail in finance because words like "tax" or "cost" are neutral/standard but labeled as negative. This skill uses **FinBERT** or custom financial lexicons.
28
+
29
+ ### Priority Order
30
+ 1. **Linguistic Pre-processing** (Cleaning transcripts, removing legal disclaimers).
31
+ 2. **Sentiment Scoring** (Applying financial-specific NLP models).
32
+ 3. **Comparative Analysis** (Measuring "Tone Shift" vs. previous quarters).
33
+ 4. **Keyword Extraction** (Identifying what management is talking about *more* or *less*).
34
+
35
+ ---
36
+
37
+ ## Technical NLP Steps
38
+
39
+ ### 1. Tone Shift Detection
40
+ - Calculate the ratio of positive to negative words in the Q&A section.
41
+ - Compare this ratio to the historical average for this management team.
42
+
43
+ ### 2. Uncertainty Mapping
44
+ - Track the frequency of words like "uncertain," "volatile," "might," and "assume."
45
+ - A spike in these words often precedes a stock price correction.
46
+
47
+ ### 3. Management vs. Analyst Sentiment
48
+ - Compare the sentiment of management's answers to the sentiment of the analysts' questions to detect friction.
49
+
50
+ ---
51
+
52
+ ## Output Format
53
+
54
+ ### Sentiment Analysis Report Structure
55
+
56
+ **Sentiment Scorecard**
57
+ - **Overall Score**: (e.g., +0.75 - Very Bullish).
58
+ - **Tone Shift**: (e.g., -15% decline from last quarter).
59
+
60
+ **Key Findings**
61
+ - Top 3 "Stress Points" discussed in the Q&A.
62
+ - Areas where management was unusually vague or evasive.
63
+
64
+ **Quantitative Overlay**
65
+ - Correlation between sentiment shifts and stock price movement in previous quarters.
66
+
67
+ ---
68
+
69
+ ## References
70
+ - [FinBERT Overview](./references/finbert-guide.md): Why specialized models matter.
71
+ - [Tone Analysis Basics](./references/linguistic-finance.md): Detecting management evasiveness.
72
+
73
+ ---
74
+
75
+ ## Related Skills
76
+ - **investment-analysis**: To add qualitative context to a valuation.
77
+ - **financial-analysis**: To see if the sentiment aligns with the hard numbers.
@@ -0,0 +1,26 @@
1
+ # FinBERT and Financial NLP Models
2
+
3
+ ## Why Domain Models
4
+ General sentiment models misread finance: "liability decreased" is positive; "beat expectations despite headwinds" is positive; "in line with guidance" is neutral-positive. Finance-tuned models (FinBERT variants, e.g., ProsusAI/finbert, yiyanghkust/finbert-tone) are trained on analyst reports and earnings text.
5
+
6
+ ## Usage Pattern
7
+ ```python
8
+ from transformers import pipeline
9
+ clf = pipeline("text-classification", model="yiyanghkust/finbert-tone")
10
+ scores = clf(sentences) # labels: Positive / Negative / Neutral
11
+ ```
12
+ - Sentence-level scoring, then aggregate: `net tone = (pos − neg) / total sentences`.
13
+ - Chunk transcripts ≤ 512 tokens; split on sentence boundaries, never mid-sentence.
14
+
15
+ ## Earnings Call Structure Matters
16
+ - **Prepared remarks**: scripted, uniformly positive — low signal. Compare vs. the company's own historical baseline, not absolute tone.
17
+ - **Q&A section**: highest signal. Analyze separately. Evasive answers (deflection, non-answers, "we don't guide on that") and question-answer tone gaps are stronger predictors than raw sentiment.
18
+ - Track **tone delta vs. prior quarters**, not levels.
19
+
20
+ ## Beyond Sentiment
21
+ - Hedging density: counts of "approximately", "we believe", "subject to" per 100 words.
22
+ - Numeric specificity: ratio of quantified statements to total claims (specificity drops before bad news).
23
+ - Topic shift: new risk topics vs. prior call (embedding distance per section).
24
+
25
+ ## Validation
26
+ Backtest tone deltas against post-call abnormal returns or subsequent guidance revisions before trusting any signal. Report correlation, not causation.
@@ -0,0 +1,23 @@
1
+ # Linguistic Markers in Financial Disclosure
2
+
3
+ ## Loughran-McDonald Word Lists (the finance standard)
4
+ General-purpose lexicons (Harvard-IV) misclassify ~75% of finance "negative" words (e.g., "tax", "cost", "liability" are routine). Use L-M categories:
5
+ - **Negative** (loss, impairment, litigation, restated), **Positive** (achieve, improve, strong), **Uncertainty** (approximately, contingent, may), **Litigious** (claimant, plaintiff), **Weak/Strong modal** (could/might vs. will/must), **Constraining** (covenant, restrict).
6
+
7
+ Metric: `category density = category word count / total words`, compared against the same company's history and sector peers.
8
+
9
+ ## Documented Red-Flag Patterns (research-backed)
10
+ 1. **Rising uncertainty + weak modal density** ahead of negative revisions.
11
+ 2. **Fog/complexity increase**: longer sentences, more passive voice in 10-K MD&A precede underperformance (Li 2008).
12
+ 3. **Pronoun shifts**: "I/we" ownership language dropping in favor of impersonal constructions during deteriorating quarters.
13
+ 4. **Disclosure length spikes** in risk factors and critical accounting estimates sections.
14
+ 5. **Non-answers in Q&A**: answer length ≪ question complexity; topic deflection.
15
+ 6. **Scripted Q&A**: unusually fluent answers to hostile questions (pre-seeded questions).
16
+
17
+ ## Quantitative Measures
18
+ - Gunning Fog index on MD&A year-over-year.
19
+ - Cosine similarity of consecutive 10-K risk sections: a sudden DROP means new risks added — read the diff.
20
+ - Negation handling: "not expecting growth" — apply 3-word negation windows when using lexicons.
21
+
22
+ ## Caveats
23
+ Language signals are weak individually; combine ≥ 3 markers and always tie to the numbers (does tone diverge from reported results? divergence IS the signal).