@v587d/capital-generation 2.7.7 → 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 (201) hide show
  1. package/CHANGELOG.md +59 -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/web-retriever/local-fetch.d.ts +1 -1
  9. package/lib/web-retriever/local-fetch.js +1 -1
  10. package/lib/web-retriever/wind-client.d.ts +1 -1
  11. package/lib/web-retriever/wind-client.js +1 -1
  12. package/package.json +2 -1
  13. package/selected-skills/README.md +3 -1
  14. package/selected-skills/catalog.js +155 -0
  15. package/selected-skills/financeskills/LICENSE +21 -0
  16. package/selected-skills/financeskills/UPSTREAM.md +202 -0
  17. package/selected-skills/financeskills/skills/ai-anomaly-detection/EXAMPLE.md +21 -0
  18. package/selected-skills/financeskills/skills/ai-anomaly-detection/SKILL.md +84 -0
  19. package/selected-skills/financeskills/skills/ai-anomaly-detection/references/feature-engineering.md +20 -0
  20. package/selected-skills/financeskills/skills/ai-anomaly-detection/references/ml-algorithms.md +28 -0
  21. package/selected-skills/financeskills/skills/aro-computation/EXAMPLE.md +21 -0
  22. package/selected-skills/financeskills/skills/aro-computation/SKILL.md +82 -0
  23. package/selected-skills/financeskills/skills/aro-computation/references/aro-standards.md +22 -0
  24. package/selected-skills/financeskills/skills/aro-computation/references/pv-math.md +27 -0
  25. package/selected-skills/financeskills/skills/audit-checklist/EXAMPLE.md +17 -0
  26. package/selected-skills/financeskills/skills/audit-checklist/SKILL.md +77 -0
  27. package/selected-skills/financeskills/skills/audit-checklist/references/internal-controls.md +36 -0
  28. package/selected-skills/financeskills/skills/audit-checklist/references/isa-standards.md +26 -0
  29. package/selected-skills/financeskills/skills/automated-reconciliation/EXAMPLE.md +21 -0
  30. package/selected-skills/financeskills/skills/automated-reconciliation/SKILL.md +87 -0
  31. package/selected-skills/financeskills/skills/automated-reconciliation/assets/reconciliation-statement-template.md +31 -0
  32. package/selected-skills/financeskills/skills/automated-reconciliation/references/fuzzy-logic.md +27 -0
  33. package/selected-skills/financeskills/skills/automated-reconciliation/references/rec-controls.md +28 -0
  34. package/selected-skills/financeskills/skills/banking-compliance/EXAMPLE.md +21 -0
  35. package/selected-skills/financeskills/skills/banking-compliance/SKILL.md +82 -0
  36. package/selected-skills/financeskills/skills/banking-compliance/references/basel-iii-framework.md +26 -0
  37. package/selected-skills/financeskills/skills/banking-compliance/references/risk-weights.md +32 -0
  38. package/selected-skills/financeskills/skills/budget-forecast/EXAMPLE.md +21 -0
  39. package/selected-skills/financeskills/skills/budget-forecast/SKILL.md +87 -0
  40. package/selected-skills/financeskills/skills/budget-forecast/references/forecasting-best-practices.md +26 -0
  41. package/selected-skills/financeskills/skills/budget-forecast/references/scenario-analysis.md +25 -0
  42. package/selected-skills/financeskills/skills/close-management/EXAMPLE.md +17 -0
  43. package/selected-skills/financeskills/skills/close-management/SKILL.md +85 -0
  44. package/selected-skills/financeskills/skills/close-management/references/close-task-library.md +32 -0
  45. package/selected-skills/financeskills/skills/company-valuation/EXAMPLE.md +21 -0
  46. package/selected-skills/financeskills/skills/company-valuation/SKILL.md +80 -0
  47. package/selected-skills/financeskills/skills/company-valuation/references/terminal-value-guide.md +33 -0
  48. package/selected-skills/financeskills/skills/corporate-consolidation/EXAMPLE.md +21 -0
  49. package/selected-skills/financeskills/skills/corporate-consolidation/SKILL.md +84 -0
  50. package/selected-skills/financeskills/skills/corporate-consolidation/references/consolidation-standard.md +28 -0
  51. package/selected-skills/financeskills/skills/corporate-consolidation/references/minority-interest.md +25 -0
  52. package/selected-skills/financeskills/skills/credit-analysis/EXAMPLE.md +21 -0
  53. package/selected-skills/financeskills/skills/credit-analysis/SKILL.md +84 -0
  54. package/selected-skills/financeskills/skills/credit-analysis/references/covenant-guide.md +26 -0
  55. package/selected-skills/financeskills/skills/crypto-accounting/EXAMPLE.md +21 -0
  56. package/selected-skills/financeskills/skills/crypto-accounting/SKILL.md +81 -0
  57. package/selected-skills/financeskills/skills/crypto-accounting/references/fasb-crypto.md +26 -0
  58. package/selected-skills/financeskills/skills/crypto-accounting/references/ifrs-crypto.md +25 -0
  59. package/selected-skills/financeskills/skills/cvp-breakeven/EXAMPLE.md +21 -0
  60. package/selected-skills/financeskills/skills/cvp-breakeven/SKILL.md +78 -0
  61. package/selected-skills/financeskills/skills/cvp-breakeven/references/cvp-patterns.md +28 -0
  62. package/selected-skills/financeskills/skills/debt-payoff/EXAMPLE.md +21 -0
  63. package/selected-skills/financeskills/skills/debt-payoff/SKILL.md +94 -0
  64. package/selected-skills/financeskills/skills/debt-payoff/references/debt-strategies.md +32 -0
  65. package/selected-skills/financeskills/skills/debt-payoff/references/interest-calculations.md +27 -0
  66. package/selected-skills/financeskills/skills/debt-restructuring/EXAMPLE.md +21 -0
  67. package/selected-skills/financeskills/skills/debt-restructuring/SKILL.md +79 -0
  68. package/selected-skills/financeskills/skills/debt-restructuring/references/creditor-priority.md +26 -0
  69. package/selected-skills/financeskills/skills/debt-restructuring/references/restructuring-types.md +24 -0
  70. package/selected-skills/financeskills/skills/deferred-tax/EXAMPLE.md +21 -0
  71. package/selected-skills/financeskills/skills/deferred-tax/SKILL.md +86 -0
  72. package/selected-skills/financeskills/skills/deferred-tax/references/td-catalogue.md +39 -0
  73. package/selected-skills/financeskills/skills/earned-value-mgmt/EXAMPLE.md +21 -0
  74. package/selected-skills/financeskills/skills/earned-value-mgmt/SKILL.md +79 -0
  75. package/selected-skills/financeskills/skills/earned-value-mgmt/references/forecasting-eac.md +27 -0
  76. package/selected-skills/financeskills/skills/earned-value-mgmt/references/pmi-evm.md +29 -0
  77. package/selected-skills/financeskills/skills/ecl-computation/EXAMPLE.md +21 -0
  78. package/selected-skills/financeskills/skills/ecl-computation/SKILL.md +85 -0
  79. package/selected-skills/financeskills/skills/ecl-computation/references/ifrs9-standard.md +27 -0
  80. package/selected-skills/financeskills/skills/ecl-computation/references/risk-modeling.md +26 -0
  81. package/selected-skills/financeskills/skills/esg-reporting/EXAMPLE.md +17 -0
  82. package/selected-skills/financeskills/skills/esg-reporting/SKILL.md +79 -0
  83. package/selected-skills/financeskills/skills/esg-reporting/references/ghg-protocol.md +22 -0
  84. package/selected-skills/financeskills/skills/esg-reporting/references/sasb-map.md +25 -0
  85. package/selected-skills/financeskills/skills/financial-analysis/EXAMPLE.md +21 -0
  86. package/selected-skills/financeskills/skills/financial-analysis/SKILL.md +108 -0
  87. package/selected-skills/financeskills/skills/financial-analysis/assets/analysis-memo-template.md +31 -0
  88. package/selected-skills/financeskills/skills/financial-analysis/references/accounting-standards.md +45 -0
  89. package/selected-skills/financeskills/skills/financial-analysis/references/ratio-definitions.md +14 -0
  90. package/selected-skills/financeskills/skills/fixed-asset-accounting/EXAMPLE.md +21 -0
  91. package/selected-skills/financeskills/skills/fixed-asset-accounting/SKILL.md +78 -0
  92. package/selected-skills/financeskills/skills/fixed-asset-accounting/references/useful-life-guide.md +30 -0
  93. package/selected-skills/financeskills/skills/forensic-accounting/EXAMPLE.md +21 -0
  94. package/selected-skills/financeskills/skills/forensic-accounting/SKILL.md +91 -0
  95. package/selected-skills/financeskills/skills/forensic-accounting/references/benfords-law.md +24 -0
  96. package/selected-skills/financeskills/skills/forensic-accounting/references/fraud-triangle.md +26 -0
  97. package/selected-skills/financeskills/skills/insurance-reserving/EXAMPLE.md +21 -0
  98. package/selected-skills/financeskills/skills/insurance-reserving/SKILL.md +82 -0
  99. package/selected-skills/financeskills/skills/insurance-reserving/references/actuarial-methods.md +33 -0
  100. package/selected-skills/financeskills/skills/insurance-reserving/references/insurance-metrics.md +26 -0
  101. package/selected-skills/financeskills/skills/intercompany-accounting/EXAMPLE.md +21 -0
  102. package/selected-skills/financeskills/skills/intercompany-accounting/SKILL.md +79 -0
  103. package/selected-skills/financeskills/skills/intercompany-accounting/references/elimination-entries.md +35 -0
  104. package/selected-skills/financeskills/skills/inventory-costing/EXAMPLE.md +21 -0
  105. package/selected-skills/financeskills/skills/inventory-costing/SKILL.md +80 -0
  106. package/selected-skills/financeskills/skills/inventory-costing/references/costing-examples.md +31 -0
  107. package/selected-skills/financeskills/skills/investment-analysis/EXAMPLE.md +21 -0
  108. package/selected-skills/financeskills/skills/investment-analysis/SKILL.md +82 -0
  109. package/selected-skills/financeskills/skills/investment-analysis/references/competitive-advantage.md +31 -0
  110. package/selected-skills/financeskills/skills/investment-analysis/references/valuation-guide.md +29 -0
  111. package/selected-skills/financeskills/skills/journal-entry/EXAMPLE.md +21 -0
  112. package/selected-skills/financeskills/skills/journal-entry/SKILL.md +94 -0
  113. package/selected-skills/financeskills/skills/journal-entry/assets/journal-entry-template.md +21 -0
  114. package/selected-skills/financeskills/skills/journal-entry/references/entry-patterns.md +51 -0
  115. package/selected-skills/financeskills/skills/lbo-modeling/EXAMPLE.md +21 -0
  116. package/selected-skills/financeskills/skills/lbo-modeling/SKILL.md +88 -0
  117. package/selected-skills/financeskills/skills/lbo-modeling/references/debt-structures.md +22 -0
  118. package/selected-skills/financeskills/skills/lbo-modeling/references/lbo-best-practices.md +27 -0
  119. package/selected-skills/financeskills/skills/lease-accounting/EXAMPLE.md +21 -0
  120. package/selected-skills/financeskills/skills/lease-accounting/SKILL.md +88 -0
  121. package/selected-skills/financeskills/skills/lease-accounting/assets/commencement-summary-template.md +28 -0
  122. package/selected-skills/financeskills/skills/lease-accounting/references/ibr-guide.md +26 -0
  123. package/selected-skills/financeskills/skills/net-worth-tracker/EXAMPLE.md +21 -0
  124. package/selected-skills/financeskills/skills/net-worth-tracker/SKILL.md +98 -0
  125. package/selected-skills/financeskills/skills/net-worth-tracker/references/asset-valuation.md +40 -0
  126. package/selected-skills/financeskills/skills/net-worth-tracker/references/net-worth-benchmarks.md +33 -0
  127. package/selected-skills/financeskills/skills/nlp-earnings-sentiment/EXAMPLE.md +17 -0
  128. package/selected-skills/financeskills/skills/nlp-earnings-sentiment/SKILL.md +77 -0
  129. package/selected-skills/financeskills/skills/nlp-earnings-sentiment/references/finbert-guide.md +26 -0
  130. package/selected-skills/financeskills/skills/nlp-earnings-sentiment/references/linguistic-finance.md +23 -0
  131. package/selected-skills/financeskills/skills/oil-gas-valuation/EXAMPLE.md +21 -0
  132. package/selected-skills/financeskills/skills/oil-gas-valuation/SKILL.md +86 -0
  133. package/selected-skills/financeskills/skills/oil-gas-valuation/references/sec-reporting.md +22 -0
  134. package/selected-skills/financeskills/skills/oil-gas-valuation/references/spe-standards.md +25 -0
  135. package/selected-skills/financeskills/skills/personal-budgeting/EXAMPLE.md +21 -0
  136. package/selected-skills/financeskills/skills/personal-budgeting/SKILL.md +100 -0
  137. package/selected-skills/financeskills/skills/personal-budgeting/references/budgeting-methods.md +40 -0
  138. package/selected-skills/financeskills/skills/personal-budgeting/references/spending-categories.md +40 -0
  139. package/selected-skills/financeskills/skills/predictive-burn-rate/EXAMPLE.md +21 -0
  140. package/selected-skills/financeskills/skills/predictive-burn-rate/SKILL.md +82 -0
  141. package/selected-skills/financeskills/skills/predictive-burn-rate/references/startup-metrics.md +27 -0
  142. package/selected-skills/financeskills/skills/predictive-burn-rate/references/time-series-forecasting.md +22 -0
  143. package/selected-skills/financeskills/skills/product-profitability/EXAMPLE.md +21 -0
  144. package/selected-skills/financeskills/skills/product-profitability/SKILL.md +83 -0
  145. package/selected-skills/financeskills/skills/product-profitability/references/allocation-logic.md +28 -0
  146. package/selected-skills/financeskills/skills/product-profitability/references/unit-economics.md +30 -0
  147. package/selected-skills/financeskills/skills/retirement-planning/EXAMPLE.md +21 -0
  148. package/selected-skills/financeskills/skills/retirement-planning/SKILL.md +98 -0
  149. package/selected-skills/financeskills/skills/retirement-planning/references/compound-growth.md +38 -0
  150. package/selected-skills/financeskills/skills/retirement-planning/references/retirement-fundamentals.md +29 -0
  151. package/selected-skills/financeskills/skills/revenue-recognition/EXAMPLE.md +21 -0
  152. package/selected-skills/financeskills/skills/revenue-recognition/SKILL.md +86 -0
  153. package/selected-skills/financeskills/skills/revenue-recognition/assets/allocation-workpaper-template.md +30 -0
  154. package/selected-skills/financeskills/skills/revenue-recognition/references/ifrs15-guide.md +28 -0
  155. package/selected-skills/financeskills/skills/revenue-recognition/references/saas-rev-rec.md +26 -0
  156. package/selected-skills/financeskills/skills/risk-assessment/EXAMPLE.md +21 -0
  157. package/selected-skills/financeskills/skills/risk-assessment/SKILL.md +83 -0
  158. package/selected-skills/financeskills/skills/risk-assessment/references/hedging-guide.md +24 -0
  159. package/selected-skills/financeskills/skills/risk-assessment/references/risk-metrics.md +24 -0
  160. package/selected-skills/financeskills/skills/sox-compliance/EXAMPLE.md +17 -0
  161. package/selected-skills/financeskills/skills/sox-compliance/SKILL.md +88 -0
  162. package/selected-skills/financeskills/skills/sox-compliance/references/sampling-methodology.md +27 -0
  163. package/selected-skills/financeskills/skills/startup-valuation/EXAMPLE.md +21 -0
  164. package/selected-skills/financeskills/skills/startup-valuation/SKILL.md +88 -0
  165. package/selected-skills/financeskills/skills/startup-valuation/references/berkus-method.md +25 -0
  166. package/selected-skills/financeskills/skills/startup-valuation/references/vc-method.md +23 -0
  167. package/selected-skills/financeskills/skills/statement-preparation/EXAMPLE.md +21 -0
  168. package/selected-skills/financeskills/skills/statement-preparation/SKILL.md +86 -0
  169. package/selected-skills/financeskills/skills/statement-preparation/references/accruals-deferrals.md +24 -0
  170. package/selected-skills/financeskills/skills/statement-preparation/references/cash-flow-method.md +32 -0
  171. package/selected-skills/financeskills/skills/tax-efficient-investing/EXAMPLE.md +21 -0
  172. package/selected-skills/financeskills/skills/tax-efficient-investing/SKILL.md +97 -0
  173. package/selected-skills/financeskills/skills/tax-efficient-investing/references/account-types.md +33 -0
  174. package/selected-skills/financeskills/skills/tax-efficient-investing/references/asset-location.md +36 -0
  175. package/selected-skills/financeskills/skills/tax-planning/EXAMPLE.md +21 -0
  176. package/selected-skills/financeskills/skills/tax-planning/SKILL.md +93 -0
  177. package/selected-skills/financeskills/skills/tax-planning/references/common-deductions.md +28 -0
  178. package/selected-skills/financeskills/skills/tax-planning/references/tax-code-lookup.md +25 -0
  179. package/selected-skills/financeskills/skills/three-statement-modeling/EXAMPLE.md +21 -0
  180. package/selected-skills/financeskills/skills/three-statement-modeling/SKILL.md +84 -0
  181. package/selected-skills/financeskills/skills/three-statement-modeling/references/model-checks.md +32 -0
  182. package/selected-skills/financeskills/skills/treasury-management/EXAMPLE.md +21 -0
  183. package/selected-skills/financeskills/skills/treasury-management/SKILL.md +83 -0
  184. package/selected-skills/financeskills/skills/treasury-management/references/fx-hedging.md +27 -0
  185. package/selected-skills/financeskills/skills/treasury-management/references/liquidity-metrics.md +24 -0
  186. package/selected-skills/financeskills/skills/variance-analysis/EXAMPLE.md +21 -0
  187. package/selected-skills/financeskills/skills/variance-analysis/SKILL.md +78 -0
  188. package/selected-skills/financeskills/skills/variance-analysis/references/overhead-logic.md +24 -0
  189. package/selected-skills/financeskills/skills/variance-analysis/references/variance-math.md +35 -0
  190. package/selected-skills/financeskills/skills/venture-debt/EXAMPLE.md +21 -0
  191. package/selected-skills/financeskills/skills/venture-debt/SKILL.md +84 -0
  192. package/selected-skills/financeskills/skills/venture-debt/references/saas-debt-metrics.md +26 -0
  193. package/selected-skills/financeskills/skills/venture-debt/references/venture-lending.md +23 -0
  194. package/selected-skills/financeskills/skills/wacc-computation/EXAMPLE.md +21 -0
  195. package/selected-skills/financeskills/skills/wacc-computation/SKILL.md +98 -0
  196. package/selected-skills/financeskills/skills/wacc-computation/assets/wacc-memo-template.md +40 -0
  197. package/selected-skills/financeskills/skills/wacc-computation/references/beta-math.md +24 -0
  198. package/selected-skills/financeskills/skills/wacc-computation/references/capm-basics.md +24 -0
  199. package/selected-skills/financeskills/skills/working-capital-analysis/EXAMPLE.md +21 -0
  200. package/selected-skills/financeskills/skills/working-capital-analysis/SKILL.md +83 -0
  201. package/selected-skills/financeskills/skills/working-capital-analysis/references/wc-metrics.md +30 -0
@@ -0,0 +1,20 @@
1
+ # Feature Engineering for Financial Anomaly Detection
2
+
3
+ ## Journal Entry Features
4
+ - **Amount-based**: raw amount, log(|amount|), roundness score (trailing zeros), distance to nearest approval threshold (e.g., amount/threshold ratio in [0.9, 1.0) is suspicious), first-two-digit Benford deviation of the user's population.
5
+ - **Timing**: hour-of-day, day-of-week, posted-on-weekend/holiday flag, days from period end (entries on WD-0/WD+1 deserve weight), posting date vs. effective date gap.
6
+ - **User behavior**: entries per user per period vs. trailing median, new user flag (< 90 days), user-account pair novelty (first time this user touches this account), seniority-vs-amount mismatch.
7
+ - **Account patterns**: rare account combination flag (debit-credit pair frequency), suspense/clearing account usage, P&L-to-BS reclass patterns.
8
+ - **Text**: description length, generic-description flag ("adjustment", "misc", blank), duplicate description with different amounts.
9
+
10
+ ## Transaction-Level (AP/AR) Features
11
+ - Vendor: invoice number gaps/sequences, duplicate detection key (vendor + amount + date ±3d), bank account changes, vendor-employee address/phone match.
12
+ - Payment: split-payment detection (same vendor, same day, sum > threshold), velocity (payments per vendor per week vs. baseline).
13
+
14
+ ## Aggregation Windows
15
+ Build each behavioral feature at 3 windows (7/30/90 days) and use the ratio of short-to-long window as a drift signal.
16
+
17
+ ## Encoding & Hygiene
18
+ - High-cardinality categoricals (account, vendor): frequency encoding or target-free hashing — never one-hot 10k vendors.
19
+ - Winsorize at 0.1%/99.9% before scaling for distance-based models.
20
+ - Keep a human-readable reason string per feature so flags are explainable to auditors.
@@ -0,0 +1,28 @@
1
+ # Anomaly Detection Algorithms for Financial Data
2
+
3
+ ## Algorithm Selection
4
+ | Algorithm | Best For | Notes |
5
+ |---|---|---|
6
+ | Z-score / modified Z (MAD) | Univariate amounts, quick baselines | Robust version uses median/MAD; flag \|z\| > 3 (or > 3.5 MAD) |
7
+ | IQR fences | Skewed distributions | Outlier if < Q1 − 1.5×IQR or > Q3 + 1.5×IQR |
8
+ | Isolation Forest | Multivariate, mixed features, large JE populations | contamination ≈ expected anomaly rate (0.001–0.01 for JEs); fast, no distribution assumption |
9
+ | Local Outlier Factor | Density-varying data (different entities/scales) | Catches local anomalies global methods miss |
10
+ | One-Class SVM | Small, clean training sets | Sensitive to scaling; slower |
11
+ | Autoencoder | High-dimensional, abundant data | Reconstruction error as anomaly score; needs volume |
12
+ | Benford's Law | First/second-digit tests on populations > 1,000 | Screening only — deviations need investigation, not accusation |
13
+ | Time-series (STL + residual z) | Seasonality-aware account monitoring | Decompose, then flag residual outliers |
14
+
15
+ ## Practical Pipeline for Journal Entry Testing
16
+ 1. Score with 2–3 uncorrelated methods (e.g., Isolation Forest + MAD + rules).
17
+ 2. Combine: rank-average or max-rule; rule-based flags (weekend posting, round amounts, manual JEs by unusual users, just-below-approval-threshold) always surface regardless of model score.
18
+ 3. Triage queue sorted by composite score × monetary value.
19
+
20
+ ## Evaluation Without Labels
21
+ - Precision@k: review top-k flags, count true issues.
22
+ - Inject synthetic anomalies (duplicated invoices, split transactions) to measure recall.
23
+ - Track investigator feedback to recalibrate quarterly.
24
+
25
+ ## Pitfalls
26
+ - Scaling: tree methods don't need it; distance methods (LOF, SVM) require it.
27
+ - Train/score leakage: fit on prior periods, score current.
28
+ - Anomalous ≠ fraudulent — output is a *review queue*, never an auto-accusation.
@@ -0,0 +1,21 @@
1
+ # Worked Example - aro-computation
2
+
3
+ ## Ask
4
+
5
+ > We built a factory that must be restored in 10 years at an estimated cost of $1M. Our credit-adjusted risk-free rate is 5%. How do we record this today?
6
+
7
+ ## What a correct response contains
8
+
9
+ Should calculate the Present Value of the $1M ($1M / (1.05)^10 = ~$613.9k). Should describe the entry to Debit Asset / Credit ARO Liability. Should mention subsequent Accretion and Depreciation. Should provide an ARO Schedule.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/retirement_obligations.csv`:
14
+
15
+ > Using the attached asset retirement obligations file (evals/files/retirement_obligations.csv), measure the initial ARO liability for each asset (inflate current cost to retirement date, discount back at the credit-adjusted rate), total the provision, and compute year-1 accretion expense.
16
+
17
+ Expected: AROs: Alpha $5,893,636, Beta $4,979,947, Gamma $1,270,349; total $12,143,931; year-1 accretion $958,811.
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,82 @@
1
+ ---
2
+ name: aro-computation
3
+ description: When the user wants to calculate Asset Retirement Obligations (ARO) for long-lived assets. Also use when the user mentions "decommissioning costs," "restoration liabilities," "reclamation accounting," "accretion expense," or "present value of cleanup costs."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # ARO Computation
9
+
10
+ You are a Technical Accountant. Your goal is to recognize the legal obligation associated with the retirement of a tangible long-lived asset, resulting from the acquisition, construction, development, and normal operation of that asset.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **The Obligation**
15
+ - Is there a legal requirement (law, contract, or promissory estoppel) to retire/restore the asset?
16
+ - What is the estimated retirement date?
17
+
18
+ 2. **Cost Estimation**
19
+ - What would the restoration cost be in today's dollars?
20
+ - What is the expected inflation rate for these costs?
21
+
22
+ 3. **Discounting**
23
+ - What is the Credit-Adjusted Risk-Free Rate (CARFR)?
24
+
25
+ ---
26
+
27
+ ## ARO Framework
28
+
29
+ ### Priority Order
30
+ 1. **Initial Recognition** (Measuring the liability at Fair Value/Present Value).
31
+ 2. **Capitalization** (Adding the PV of the ARO to the cost of the asset).
32
+ 3. **Accretion Expense** (The "unwinding" of the discount over time).
33
+ 4. **Depreciation** (Allocating the capitalized ARO cost over the asset's life).
34
+ 5. **Settlement** (Recording the actual cleanup costs and any gain/loss).
35
+
36
+ ---
37
+
38
+ ## Technical Computation Steps
39
+
40
+ ### 1. Initial Measurement
41
+ `PV = Future Cash Flow / (1 + i)^n`
42
+ - **Future Cash Flow**: Estimated cost adjusted for inflation.
43
+ - **i**: Credit-adjusted risk-free rate.
44
+ - **n**: Years until retirement.
45
+
46
+ ### 2. Accretion & Depreciation
47
+ - **Accretion**: `Beginning Liability * i`.
48
+ - **Depreciation**: `Capitalized ARO Asset / Useful Life`.
49
+
50
+ ---
51
+
52
+ ## Output Format
53
+
54
+ ### ARO Schedule
55
+
56
+ **Initial Setup**
57
+ - Total Future Estimated Cost.
58
+ - Present Value recognized on Day 1.
59
+
60
+ **Annual Table (The "Rollforward")**
61
+ - Year | Beginning Balance | Accretion | Depreciation | Ending Balance.
62
+
63
+ **Journal Entries**
64
+ - Entry for initial recognition and annual recurring expenses.
65
+
66
+ ---
67
+
68
+ ## Scripts
69
+ - [calculate.py](./scripts/calculate.py): Initial PV, accretion schedule, and IFRIC 1 revision functions. Run with `python3 scripts/calculate.py` to self-test; import the functions for actual computations.
70
+
71
+ ---
72
+
73
+ ## References
74
+ - [ASC 410 / IAS 37](./references/aro-standards.md): Standards for asset retirement.
75
+ - [Discounting for Accountants](./references/pv-math.md): Present value logic.
76
+
77
+ ---
78
+
79
+ ## Related Skills
80
+ - **statement-preparation**: For reporting the ARO liability and asset.
81
+ - **financial-analysis**: To analyze the impact of long-term liabilities on solvency.
82
+ - **audit-checklist**: For auditing decommissioning estimates.
@@ -0,0 +1,22 @@
1
+ # ARO / Decommissioning Standards: IAS 37 & ASC 410-20
2
+
3
+ ## Recognition (IAS 37 / IFRIC 1; US GAAP ASC 410-20)
4
+ Recognize a decommissioning/restoration provision when: present obligation (legal or constructive) from a past event, probable outflow, reliable estimate. For oil & gas: obligation arises when the well is drilled / facility installed — capitalize the same amount into the related asset's cost (IAS 16).
5
+
6
+ ## Initial Measurement
7
+ `ARO = Estimated future restoration cost × (1 + inflation)^n ÷ (1 + discount rate)^n`
8
+ - IFRS: discount at pre-tax rate reflecting current market assessment of time value + liability-specific risks (risk-adjust cash flows OR rate, not both).
9
+ - US GAAP: credit-adjusted risk-free rate (entity's own credit standing); fair-value framework with market participant assumptions + ASC 410 requires probability-weighted scenarios.
10
+
11
+ ## Subsequent Measurement
12
+ - **Accretion (unwinding)**: `Opening balance × discount rate` → finance cost (IFRS) / accretion expense (US GAAP). Never restate prior accretion.
13
+ - **Estimate revisions (IFRIC 1)**: change in cost estimate, timing, or discount rate → adjust BOTH the provision and the related asset (cost model). US GAAP: upward revisions use current rate (new "layer"); downward revisions unwind oldest layers at their original rates.
14
+ - Depreciate the capitalized ARO asset over the asset's useful life (units of production common in E&P).
15
+
16
+ ## Oil & Gas Specifics
17
+ - Estimates from AFE-style engineering studies: well P&A, facility removal, site remediation; update at least annually and on regulation change (e.g., NUPRC decommissioning guidelines).
18
+ - Joint ventures: recognize only your working-interest share.
19
+ - Funds set aside (escrow/decommissioning fund) are a separate asset — no netting.
20
+
21
+ ## Disclosure
22
+ Rollforward: opening, additions, accretion, revisions, settlements, closing; plus discount rates, expected timing, and uncertainties.
@@ -0,0 +1,27 @@
1
+ # Present Value Mathematics for Provisions
2
+
3
+ ## Core Formulas
4
+ - Future cost with inflation: `FV = C0 × (1 + i)^n`
5
+ - Present value: `PV = FV / (1 + r)^n`
6
+ - Combined: `PV = C0 × ((1+i)/(1+r))^n ≈ C0 / (1 + real rate)^n` where `real ≈ (r − i)/(1 + i)` (Fisher).
7
+
8
+ ## Accretion Schedule (example: PV = 1,000, r = 8%, n = 3)
9
+ | Year | Opening | Accretion 8% | Closing |
10
+ |---|---|---|---|
11
+ | 1 | 1,000.00 | 80.00 | 1,080.00 |
12
+ | 2 | 1,080.00 | 86.40 | 1,166.40 |
13
+ | 3 | 1,166.40 | 93.31 | 1,259.71 |
14
+ Closing equals the future settlement amount — always prove this tie-out.
15
+
16
+ ## Revision Mechanics (IFRIC 1, cost model)
17
+ New PV computed with revised estimate/rate; Δ adjusts asset and liability:
18
+ `Dr/Cr Provision ↔ Cr/Dr PP&E (ARO asset)` — then prospective depreciation over remaining life. If decrease exceeds asset carrying amount → excess to P&L.
19
+
20
+ ## Multiple Cash Flow Timings
21
+ `PV = Σ CFt / (1+r)^t` — decommissioning often phases (wells P&A in year n, facilities n+2, monitoring n+2..n+10). Build per-component schedules, don't lump.
22
+
23
+ ## Rate Selection Discipline
24
+ - Match rate currency to cash flow currency.
25
+ - Government bond yield of matching tenor is the usual IFRS proxy (risk-free, since cash flows already risk-adjusted).
26
+ - Probability-weight scenarios BEFORE discounting, not after.
27
+ - Sensitivity: report ±1% rate and ±10% cost impacts; long-dated AROs are violently rate-sensitive.
@@ -0,0 +1,17 @@
1
+ # Worked Example - audit-checklist
2
+
3
+ ## Ask
4
+
5
+ > We are preparing for our year-end audit. Can you review our Procure-to-Pay process for potential gaps? We deal with about 50 vendors.
6
+
7
+ ## What a correct response contains
8
+
9
+ Should identify key audit objectives for P2P: Existence, Completeness, and Valuation. Should focus on the 'Three-Way Match' control. Should suggest a search for unrecorded liabilities by looking at post-year-end payments. Should provide a structured list of findings with Risk ratings and Recommendations.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/control_register.csv`:
14
+
15
+ > Review the attached control register (evals/files/control_register.csv) as part of interim audit planning. Identify control gaps, segregation-of-duties conflicts, and overdue performance; classify severity and propose the audit response for each.
16
+
17
+ Expected: Findings: C-02 missing evidence for two months (operating effectiveness cannot be relied on - extend substantive testing on credit notes); C-03 preparer-approver SoD conflict on bank recs (design deficiency); C-05 user access review two quarters overdue (ITGC gap - affects reliance on automated controls incl. C-01). C-01 and C-04 satisfactory.
@@ -0,0 +1,77 @@
1
+ ---
2
+ name: audit-checklist
3
+ description: When the user wants to perform an internal audit, review controls, or prepare for an external financial audit. Also use when the user mentions "internal controls," "compliance check," "preparing for audit," "Sox compliance," "audit readiness," "checking for gaps," or "inventory audit." Use this for both operational and financial audits.
4
+ metadata:
5
+ version: 1.1.0
6
+ ---
7
+
8
+ # Audit Checklist
9
+
10
+ You are an Internal Auditor. Your goal is to identify control weaknesses, verify the accuracy of financial records, and ensure compliance with regulatory standards.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Audit Scope**
15
+ - Is this a full financial audit or a specific cycle (e.g., Procure-to-Pay, Order-to-Cash)?
16
+ - What is the audit period?
17
+ - What are the key risk areas identified by management?
18
+
19
+ 2. **Control Environment**
20
+ - Are there existing control documents (Risk Control Matrix - RCM)?
21
+ - Who are the process owners?
22
+
23
+ ---
24
+
25
+ ## Audit Framework
26
+
27
+ ### Priority Order
28
+ 1. **Existence & Occurrence** (Did the transactions actually happen?)
29
+ 2. **Completeness** (Is everything recorded?)
30
+ 3. **Rights & Obligations** (Does the company actually own the assets?)
31
+ 4. **Valuation & Allocation** (Are the amounts correct?)
32
+ 5. **Presentation & Disclosure** (Is the reporting clear and compliant?)
33
+
34
+ ---
35
+
36
+ ## Technical Audit Steps
37
+
38
+ ### 1. Revenue & Receivables
39
+ - **Cut-off Testing**: Verify transactions near period-end are recorded in the correct period.
40
+ - **AR Confirmations**: (Simulated) Check for high-value balances with no subsequent collection.
41
+
42
+ ### 2. Procurement & Payables
43
+ - **Three-Way Match**: Verify Purchase Order, Receiving Report, and Vendor Invoice match.
44
+ - **Search for Unrecorded Liabilities**: Check payments made after year-end for services provided before year-end.
45
+
46
+ ### 3. Fixed Assets & Inventory
47
+ - **Physical Verification**: (Simulated) Reconciliation of asset register to physical counts.
48
+ - **Depreciation Check**: Recalculate depreciation to ensure consistency with policy.
49
+
50
+ ---
51
+
52
+ ## Output Format
53
+
54
+ ### Audit Findings Report Structure
55
+
56
+ **Executive Summary**
57
+ - Overall Audit Opinion (e.g., "Effective," "Ineffective with material weaknesses").
58
+ - Summary of Quantified Findings.
59
+
60
+ **Findings Detail**
61
+ - **Issue**: The specific control gap or error.
62
+ - **Risk**: The potential impact (Financial, Regulatory, Reputational).
63
+ - **Recommendation**: Step-by-step fix to close the gap.
64
+ - **Owner**: Suggested department to lead the fix.
65
+
66
+ ---
67
+
68
+ ## References
69
+ - [Internal Control Standards](./references/internal-controls.md): Evidence and sources for COSO framework.
70
+ - [ISA Reference](./references/isa-standards.md): International Standards on Auditing overview.
71
+
72
+ ---
73
+
74
+ ## Related Skills
75
+ - **forensic-accounting**: If the audit detects signs of fraud.
76
+ - **financial-analysis**: To identify macro-level variances that need auditing.
77
+ - **tax-planning**: To audit tax compliance and filings.
@@ -0,0 +1,36 @@
1
+ # Internal Control Standards: COSO Framework
2
+
3
+ The gold standard for designing, implementing, and assessing internal control for financial reporting.
4
+
5
+ ## 🏛️ The Five Components of COSO
6
+ The COSO cube identifies five integrated components:
7
+
8
+ ### 1. Control Environment
9
+ The set of standards, processes, and structures that provide the basis for carrying out internal control across the organization.
10
+ - **Key Signal**: The "Tone at the Top" set by management.
11
+
12
+ ### 2. Risk Assessment
13
+ A dynamic and iterative process for identifying and analyzing risks to achieving objectives.
14
+ - **Key Signal**: Regular SWOT analyses and risk registries.
15
+
16
+ ### 3. Control Activities
17
+ The actions established through policies and procedures that help ensure that management’s directives to mitigate risks to the achievement of objectives are carried out.
18
+ - **Examples**: Approvals, authorizations, verifications, reconciliations, and segregation of duties.
19
+
20
+ ### 4. Information & Communication
21
+ The internal and external communication of information necessary to support the functioning of other components of internal control.
22
+
23
+ ### 5. Monitoring Activities
24
+ Ongoing evaluations, separate evaluations, or some combination of the two used to ascertain whether each of the five components of internal control is present and functioning.
25
+
26
+ ---
27
+
28
+ ## 🔍 Common Control Gaps
29
+ - **Lack of Segregation of Duties**: The same person can initiate, approve, and record a transaction.
30
+ - **Inadequate Documentation**: No audit trail for approvals.
31
+ - **Override of Controls**: Management bypassing established procedures.
32
+
33
+ ## 🔗 Sources
34
+ - [COSO Official Website](https://www.coso.org/)
35
+ - [AICPA: Internal Control - Integrated Framework](https://www.aicpa.org/resources/toolkit/coso)
36
+ - [Deloitte: COSO Internal Control Integrated Framework](https://www2.deloitte.com/us/en/pages/advisory/articles/internal-control-integrated-framework.html)
@@ -0,0 +1,26 @@
1
+ # International Standards on Auditing (ISA)
2
+
3
+ Overview of the professional standards for the performance of financial audits of historical financial information.
4
+
5
+ ## 🏛️ Core Principles
6
+
7
+ ### ISA 200: Overall Objectives
8
+ The objective of an audit is to obtain reasonable assurance about whether the financial statements as a whole are free from material misstatement, whether due to fraud or error.
9
+
10
+ ### ISA 240: Auditor’s Responsibilities Relating to Fraud
11
+ Distinguishes between fraud (deliberate) and error (unintentional). Requires auditors to maintain professional skepticism throughout the audit.
12
+
13
+ ### ISA 315: Identifying Risks of Material Misstatement
14
+ The auditor must understand the entity and its environment, including internal controls, to identify and assess the risks of material misstatement.
15
+
16
+ ---
17
+
18
+ ## 🔍 The Audit Opinion Types
19
+ 1. **Unmodified (Unqualified)**: The "Clean" opinion. Statements are presented fairly.
20
+ 2. **Qualified**: Material but not pervasive misstatement found. "Except for [X], everything is fair."
21
+ 3. **Adverse**: Material and pervasive misstatement. The statements are misleading.
22
+ 4. **Disclaimer**: The auditor is unable to obtain sufficient evidence to form an opinion.
23
+
24
+ ## 🔗 Sources
25
+ - [IAASB Standards & Pronouncements](https://www.iaasb.org/standards-pronouncements)
26
+ - [IFAC: International Standards on Auditing](https://www.ifac.org/what-we-do/standards/auditing-assurance)
@@ -0,0 +1,21 @@
1
+ # Worked Example - automated-reconciliation
2
+
3
+ ## Ask
4
+
5
+ > I have 500 bank transactions and 510 ledger entries. Most are exact matches, but 20 have slightly different names like 'AWS' vs 'Amazon'. How can I reconcile this?
6
+
7
+ ## What a correct response contains
8
+
9
+ Should recommend a two-step process: Deterministic matching for exact entries and Probabilistic/Fuzzy matching for name variances. Should mention vendor name normalization. Should provide a Reconciliation Report structure.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/bank_statement.csv`, `evals/files/gl_cash.csv`:
14
+
15
+ > Reconcile the attached May bank statement (evals/files/bank_statement.csv) against the GL cash ledger (evals/files/gl_cash.csv). Both start from an agreed opening balance of $100,000.00. Match transactions, identify deposits in transit, outstanding cheques, and bank-only items, then produce a bank reconciliation statement proving the adjusted balances agree.
16
+
17
+ Expected: Bank ending balance $147,060.00; GL ending balance $154,540.00. Deposit in transit $27,300.00 (INV1045); outstanding cheques $12,640.00 (2206) and $7,120.00 (2207); bank-only items: charges $350.00 and interest $410.00 to be booked in GL. Adjusted balance both sides $154,600.00.
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,87 @@
1
+ ---
2
+ name: automated-reconciliation
3
+ description: When the user wants to match disparate financial data sources (e.g., bank statements vs. general ledger) at scale using AI. Also use when the user mentions "bank rec," "matching invoices," "reconciling payments," "fuzzy matching in finance," or "automated accounting."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Automated Reconciliation
9
+
10
+ You are an Accounting Systems Architect. Your goal is to eliminate manual data entry by using fuzzy matching and AI to reconcile thousands of transactions in seconds.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **The Data Sources**
15
+ - Source A: (e.g., Bank Statement PDF/CSV).
16
+ - Source B: (e.g., General Ledger / ERP Export).
17
+ - Are there common IDs (Reference numbers, Check numbers)?
18
+
19
+ 2. **The "Match" Definition**
20
+ - Exact match (Same ID, Same Amount, Same Date).
21
+ - Fuzzy match (Similar Name, Same Amount, +/- 2 days).
22
+
23
+ ---
24
+
25
+ ## Reconciliation Framework
26
+
27
+ ### Technical Limitation
28
+ **LLMs are not good at matching 50,000 rows.**
29
+ For large datasets, this skill uses Python libraries like `pandas` and `RecordLinkage`. LLMs are used to resolve the "Ambiguous Matches" (the 5% the code can't solve).
30
+
31
+ ### Priority Order
32
+ 1. **Data Cleaning** (Standardizing vendor names: "AWS" vs. "Amazon Web Svcs").
33
+ 2. **Deterministic Matching** (Exact matches on IDs).
34
+ 3. **Probabilistic (Fuzzy) Matching** (Using Jaro-Winkler or Levenshtein distance).
35
+ 4. **Exception Handling** (Flagging the items that couldn't be matched).
36
+
37
+ ---
38
+
39
+ ## Technical Reconciliation Steps
40
+
41
+ ### 1. Vendor Name Normalization
42
+ - Use a lookup table or AI to standardize variant vendor names across datasets.
43
+
44
+ ### 2. Fuzzy Amount Matching
45
+ - Use a tolerance window (e.g., match if amounts are within $0.05 to account for rounding errors).
46
+
47
+ ### 3. Many-to-One Resolution
48
+ - Identify cases where one bank deposit represents three separate invoices in the ledger.
49
+
50
+ ---
51
+
52
+ ## Output Format
53
+
54
+ ### Reconciliation Report Structure
55
+
56
+ **The Results**
57
+ - **Match Rate**: (e.g., 94% matched automatically).
58
+ - **Total Reconciled Value**: $X.
59
+
60
+ **The Exceptions**
61
+ - List of "Unmatched" items from both sources.
62
+ - List of "Ambiguous" matches requiring human sign-off (with confidence scores).
63
+
64
+ **Journal Entry Suggestions**
65
+ - Ready-to-copy entries for bank fees or interest detected in the statement but missing from the ledger.
66
+
67
+ ---
68
+
69
+ ## Scripts
70
+ - [calculate.py](./scripts/calculate.py): Exact, tolerance, and subset-sum matching engine. Run with `python3 scripts/calculate.py` to self-test; import the functions for actual computations.
71
+
72
+ ---
73
+
74
+ ## References
75
+ - [Fuzzy Matching for Finance](./references/fuzzy-logic.md): Jaro-Winkler vs. Levenshtein.
76
+ - [Rec Best Practices](./references/rec-controls.md): Maintaining an audit trail.
77
+
78
+ ---
79
+
80
+ ## Assets
81
+ - [reconciliation-statement-template.md](./assets/reconciliation-statement-template.md): Bank rec statement with outstanding-items detail.
82
+
83
+ ---
84
+
85
+ ## Related Skills
86
+ - **financial-statement-prep**: To ensure the cash balance on the balance sheet is accurate.
87
+ - **audit-checklist**: For auditing the reconciliation process itself.
@@ -0,0 +1,31 @@
1
+ # Bank Reconciliation Statement
2
+
3
+ **Account:** {bank, account no} | **Period:** {month} | **Prepared:** {date} | **Preparer:** AI agent (review required)
4
+
5
+ ## Reconciliation
6
+ | | Amount |
7
+ |---|---|
8
+ | Balance per bank statement, {date} | {x} |
9
+ | Add: deposits in transit | {x} |
10
+ | Less: outstanding cheques/payments | ({x}) |
11
+ | **Adjusted bank balance** | **{x}** |
12
+ | Balance per general ledger, {date} | {x} |
13
+ | Add: bank credits not booked (interest, collections) | {x} |
14
+ | Less: bank debits not booked (charges, returned items) | ({x}) |
15
+ | **Adjusted GL balance** | **{x}** |
16
+
17
+ Difference: {must be 0.00 - if not, list unresolved items below}
18
+
19
+ ## Outstanding Items Detail
20
+ | Type | Date | Ref | Description | Amount | Age (days) |
21
+ |---|---|---|---|---|---|
22
+
23
+ ## Adjusting Journal Entries Required
24
+ | Account | Dr | Cr | Memo |
25
+ |---|---|---|---|
26
+
27
+ ## Exceptions / Unresolved
28
+ {Items needing investigation, with owner and due date. Flag anything > 30 days old.}
29
+
30
+ ---
31
+ *Matching performed with scripts/calculate.py. Reviewed by: ____________ Date: ________*
@@ -0,0 +1,27 @@
1
+ # Fuzzy Matching Logic for Reconciliations
2
+
3
+ ## Matching Tiers (run in order, lock matched items after each pass)
4
+ 1. **Exact**: amount + date + reference all equal.
5
+ 2. **Tolerance**: amount within ±0.5% or fixed threshold (e.g., ₦100/$1 for bank fees), date within ±3 business days, reference exact.
6
+ 3. **Fuzzy reference**: amount within tolerance + string similarity on description/reference ≥ threshold.
7
+ 4. **One-to-many / many-to-many**: subset-sum matching (one GL entry vs. several bank lines, e.g., batched settlements). Cap combination size at 5 to control false positives.
8
+
9
+ ## String Similarity Techniques
10
+ - **Normalize first**: uppercase, strip punctuation/whitespace, remove noise tokens ("PAYMENT", "TRF", "REF"), expand known abbreviations from a maintained alias table.
11
+ - **Levenshtein ratio**: good for typos; threshold ≥ 0.85.
12
+ - **Token-set ratio** (rapidfuzz): robust to word reordering ("ACME LTD INVOICE 123" vs "INV123 ACME LIMITED").
13
+ - **Vendor alias map**: persist confirmed matches into a lookup so the same counterparty never needs fuzzy matching twice.
14
+
15
+ ## Python Sketch
16
+ ```python
17
+ from rapidfuzz import fuzz
18
+ def is_match(a, b, amt_a, amt_b, tol=0.005):
19
+ amt_ok = abs(amt_a - amt_b) <= tol * max(abs(amt_a), abs(amt_b))
20
+ return amt_ok and fuzz.token_set_ratio(a, b) >= 85
21
+ ```
22
+
23
+ ## Guardrails
24
+ - Never auto-match across different currencies without FX conversion at transaction-date rate.
25
+ - Flag fuzzy matches ≥ materiality for human review; auto-clear only below threshold.
26
+ - Log match tier + score on every pairing — auditors will ask.
27
+ - False-positive monitoring: sample 25 auto-matches monthly; > 2 errors → raise thresholds.
@@ -0,0 +1,28 @@
1
+ # Reconciliation Controls and Standards
2
+
3
+ ## Control Attributes of a Complete Reconciliation
4
+ 1. **Preparer and reviewer are different people**; reviewer is senior; both sign and date.
5
+ 2. **Timeliness**: completed within close calendar deadline (typically WD3–WD5).
6
+ 3. **Source independence**: GL balance vs. independent source (bank statement, subledger, custodian statement, counterparty confirmation).
7
+ 4. **Reconciling items**: each item aged, explained, owner-assigned, with clearance date. "Unknown difference" is not an explanation.
8
+ 5. **Materiality threshold** documented; unreconciled residual below threshold still listed, never silently plugged.
9
+
10
+ ## Reconciling Item Categories
11
+ | Category | Example | Action |
12
+ |---|---|---|
13
+ | Timing | Deposit in transit, outstanding check | Self-clears; monitor aging |
14
+ | Error — ours | Transposition, wrong account | Correcting JE this period |
15
+ | Error — theirs | Bank error | Dispute with bank, track to resolution |
16
+ | Unidentified | Unmatched residual | Investigate; escalate if > threshold or > 30 days |
17
+
18
+ ## Aging and Escalation Policy (typical)
19
+ - Items > 30 days: escalate to controller.
20
+ - Items > 60 days: written explanation to CFO.
21
+ - Items > 90 days: mandatory resolution or P&L write-off with approval.
22
+
23
+ ## Red Flags (fraud-relevant)
24
+ - Recurring round-amount reconciling items.
25
+ - The same item re-explained differently across months.
26
+ - Reconciliations done but never reviewed (check reviewer timestamps).
27
+ - Suspense/clearing accounts used as permanent parking.
28
+ - Preparer with sole access to both the GL and the source system (SoD breach).
@@ -0,0 +1,21 @@
1
+ # Worked Example - banking-compliance
2
+
3
+ ## Ask
4
+
5
+ > Our bank has $100M in CET1 capital and $800M in Risk-Weighted Assets. Are we Basel III compliant?
6
+
7
+ ## What a correct response contains
8
+
9
+ Should calculate the CET1 ratio ($100M / $800M = 12.5%). Should compare this to the Basel III minimum (4.5% + buffers). Should conclude the bank is currently compliant. Should provide a Regulatory Compliance Dashboard.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/exposures.csv`:
14
+
15
+ > CET1 capital is $410,000,000 and the countercyclical buffer is 1%. Using the attached exposure file (evals/files/exposures.csv), compute RWA under the standardised approach, the CET1 ratio, and assess compliance against minimum 4.5% + 2.5% conservation + 1% CCyB.
16
+
17
+ Expected: RWA $3,645,000,000; CET1 ratio 11.25% vs requirement 8.0%; surplus 3.25% - compliant.
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.