@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.
- package/CHANGELOG.md +78 -0
- package/README.md +5 -4
- package/THIRD_PARTY_NOTICES.md +14 -3
- package/capital-config/client.js +4 -4
- package/capital-config/package.json +1 -1
- package/capital-watchlist/package.json +1 -1
- package/chart-ui/package.json +1 -1
- package/lib/agents/selected-skills-provider.js +91 -41
- package/lib/index.js +3 -2
- package/lib/web-retriever/local-fetch.d.ts +1 -1
- package/lib/web-retriever/local-fetch.js +1 -1
- package/lib/web-retriever/wind-client.d.ts +1 -1
- package/lib/web-retriever/wind-client.js +1 -1
- package/package.json +2 -1
- package/selected-skills/README.md +3 -1
- package/selected-skills/catalog.js +155 -0
- package/selected-skills/financeskills/LICENSE +21 -0
- package/selected-skills/financeskills/UPSTREAM.md +202 -0
- package/selected-skills/financeskills/skills/ai-anomaly-detection/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/ai-anomaly-detection/SKILL.md +84 -0
- package/selected-skills/financeskills/skills/ai-anomaly-detection/references/feature-engineering.md +20 -0
- package/selected-skills/financeskills/skills/ai-anomaly-detection/references/ml-algorithms.md +28 -0
- package/selected-skills/financeskills/skills/aro-computation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/aro-computation/SKILL.md +82 -0
- package/selected-skills/financeskills/skills/aro-computation/references/aro-standards.md +22 -0
- package/selected-skills/financeskills/skills/aro-computation/references/pv-math.md +27 -0
- package/selected-skills/financeskills/skills/audit-checklist/EXAMPLE.md +17 -0
- package/selected-skills/financeskills/skills/audit-checklist/SKILL.md +77 -0
- package/selected-skills/financeskills/skills/audit-checklist/references/internal-controls.md +36 -0
- package/selected-skills/financeskills/skills/audit-checklist/references/isa-standards.md +26 -0
- package/selected-skills/financeskills/skills/automated-reconciliation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/automated-reconciliation/SKILL.md +87 -0
- package/selected-skills/financeskills/skills/automated-reconciliation/assets/reconciliation-statement-template.md +31 -0
- package/selected-skills/financeskills/skills/automated-reconciliation/references/fuzzy-logic.md +27 -0
- package/selected-skills/financeskills/skills/automated-reconciliation/references/rec-controls.md +28 -0
- package/selected-skills/financeskills/skills/banking-compliance/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/banking-compliance/SKILL.md +82 -0
- package/selected-skills/financeskills/skills/banking-compliance/references/basel-iii-framework.md +26 -0
- package/selected-skills/financeskills/skills/banking-compliance/references/risk-weights.md +32 -0
- package/selected-skills/financeskills/skills/budget-forecast/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/budget-forecast/SKILL.md +87 -0
- package/selected-skills/financeskills/skills/budget-forecast/references/forecasting-best-practices.md +26 -0
- package/selected-skills/financeskills/skills/budget-forecast/references/scenario-analysis.md +25 -0
- package/selected-skills/financeskills/skills/close-management/EXAMPLE.md +17 -0
- package/selected-skills/financeskills/skills/close-management/SKILL.md +85 -0
- package/selected-skills/financeskills/skills/close-management/references/close-task-library.md +32 -0
- package/selected-skills/financeskills/skills/company-valuation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/company-valuation/SKILL.md +80 -0
- package/selected-skills/financeskills/skills/company-valuation/references/terminal-value-guide.md +33 -0
- package/selected-skills/financeskills/skills/corporate-consolidation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/corporate-consolidation/SKILL.md +84 -0
- package/selected-skills/financeskills/skills/corporate-consolidation/references/consolidation-standard.md +28 -0
- package/selected-skills/financeskills/skills/corporate-consolidation/references/minority-interest.md +25 -0
- package/selected-skills/financeskills/skills/credit-analysis/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/credit-analysis/SKILL.md +84 -0
- package/selected-skills/financeskills/skills/credit-analysis/references/covenant-guide.md +26 -0
- package/selected-skills/financeskills/skills/crypto-accounting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/crypto-accounting/SKILL.md +81 -0
- package/selected-skills/financeskills/skills/crypto-accounting/references/fasb-crypto.md +26 -0
- package/selected-skills/financeskills/skills/crypto-accounting/references/ifrs-crypto.md +25 -0
- package/selected-skills/financeskills/skills/cvp-breakeven/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/cvp-breakeven/SKILL.md +78 -0
- package/selected-skills/financeskills/skills/cvp-breakeven/references/cvp-patterns.md +28 -0
- package/selected-skills/financeskills/skills/debt-payoff/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/debt-payoff/SKILL.md +94 -0
- package/selected-skills/financeskills/skills/debt-payoff/references/debt-strategies.md +32 -0
- package/selected-skills/financeskills/skills/debt-payoff/references/interest-calculations.md +27 -0
- package/selected-skills/financeskills/skills/debt-restructuring/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/debt-restructuring/SKILL.md +79 -0
- package/selected-skills/financeskills/skills/debt-restructuring/references/creditor-priority.md +26 -0
- package/selected-skills/financeskills/skills/debt-restructuring/references/restructuring-types.md +24 -0
- package/selected-skills/financeskills/skills/deferred-tax/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/deferred-tax/SKILL.md +86 -0
- package/selected-skills/financeskills/skills/deferred-tax/references/td-catalogue.md +39 -0
- package/selected-skills/financeskills/skills/earned-value-mgmt/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/earned-value-mgmt/SKILL.md +79 -0
- package/selected-skills/financeskills/skills/earned-value-mgmt/references/forecasting-eac.md +27 -0
- package/selected-skills/financeskills/skills/earned-value-mgmt/references/pmi-evm.md +29 -0
- package/selected-skills/financeskills/skills/ecl-computation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/ecl-computation/SKILL.md +85 -0
- package/selected-skills/financeskills/skills/ecl-computation/references/ifrs9-standard.md +27 -0
- package/selected-skills/financeskills/skills/ecl-computation/references/risk-modeling.md +26 -0
- package/selected-skills/financeskills/skills/esg-reporting/EXAMPLE.md +17 -0
- package/selected-skills/financeskills/skills/esg-reporting/SKILL.md +79 -0
- package/selected-skills/financeskills/skills/esg-reporting/references/ghg-protocol.md +22 -0
- package/selected-skills/financeskills/skills/esg-reporting/references/sasb-map.md +25 -0
- package/selected-skills/financeskills/skills/financial-analysis/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/financial-analysis/SKILL.md +108 -0
- package/selected-skills/financeskills/skills/financial-analysis/assets/analysis-memo-template.md +31 -0
- package/selected-skills/financeskills/skills/financial-analysis/references/accounting-standards.md +45 -0
- package/selected-skills/financeskills/skills/financial-analysis/references/ratio-definitions.md +14 -0
- package/selected-skills/financeskills/skills/fixed-asset-accounting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/fixed-asset-accounting/SKILL.md +78 -0
- package/selected-skills/financeskills/skills/fixed-asset-accounting/references/useful-life-guide.md +30 -0
- package/selected-skills/financeskills/skills/forensic-accounting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/forensic-accounting/SKILL.md +91 -0
- package/selected-skills/financeskills/skills/forensic-accounting/references/benfords-law.md +24 -0
- package/selected-skills/financeskills/skills/forensic-accounting/references/fraud-triangle.md +26 -0
- package/selected-skills/financeskills/skills/insurance-reserving/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/insurance-reserving/SKILL.md +82 -0
- package/selected-skills/financeskills/skills/insurance-reserving/references/actuarial-methods.md +33 -0
- package/selected-skills/financeskills/skills/insurance-reserving/references/insurance-metrics.md +26 -0
- package/selected-skills/financeskills/skills/intercompany-accounting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/intercompany-accounting/SKILL.md +79 -0
- package/selected-skills/financeskills/skills/intercompany-accounting/references/elimination-entries.md +35 -0
- package/selected-skills/financeskills/skills/inventory-costing/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/inventory-costing/SKILL.md +80 -0
- package/selected-skills/financeskills/skills/inventory-costing/references/costing-examples.md +31 -0
- package/selected-skills/financeskills/skills/investment-analysis/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/investment-analysis/SKILL.md +82 -0
- package/selected-skills/financeskills/skills/investment-analysis/references/competitive-advantage.md +31 -0
- package/selected-skills/financeskills/skills/investment-analysis/references/valuation-guide.md +29 -0
- package/selected-skills/financeskills/skills/journal-entry/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/journal-entry/SKILL.md +94 -0
- package/selected-skills/financeskills/skills/journal-entry/assets/journal-entry-template.md +21 -0
- package/selected-skills/financeskills/skills/journal-entry/references/entry-patterns.md +51 -0
- package/selected-skills/financeskills/skills/lbo-modeling/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/lbo-modeling/SKILL.md +88 -0
- package/selected-skills/financeskills/skills/lbo-modeling/references/debt-structures.md +22 -0
- package/selected-skills/financeskills/skills/lbo-modeling/references/lbo-best-practices.md +27 -0
- package/selected-skills/financeskills/skills/lease-accounting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/lease-accounting/SKILL.md +88 -0
- package/selected-skills/financeskills/skills/lease-accounting/assets/commencement-summary-template.md +28 -0
- package/selected-skills/financeskills/skills/lease-accounting/references/ibr-guide.md +26 -0
- package/selected-skills/financeskills/skills/net-worth-tracker/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/net-worth-tracker/SKILL.md +98 -0
- package/selected-skills/financeskills/skills/net-worth-tracker/references/asset-valuation.md +40 -0
- package/selected-skills/financeskills/skills/net-worth-tracker/references/net-worth-benchmarks.md +33 -0
- package/selected-skills/financeskills/skills/nlp-earnings-sentiment/EXAMPLE.md +17 -0
- package/selected-skills/financeskills/skills/nlp-earnings-sentiment/SKILL.md +77 -0
- package/selected-skills/financeskills/skills/nlp-earnings-sentiment/references/finbert-guide.md +26 -0
- package/selected-skills/financeskills/skills/nlp-earnings-sentiment/references/linguistic-finance.md +23 -0
- package/selected-skills/financeskills/skills/oil-gas-valuation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/oil-gas-valuation/SKILL.md +86 -0
- package/selected-skills/financeskills/skills/oil-gas-valuation/references/sec-reporting.md +22 -0
- package/selected-skills/financeskills/skills/oil-gas-valuation/references/spe-standards.md +25 -0
- package/selected-skills/financeskills/skills/personal-budgeting/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/personal-budgeting/SKILL.md +100 -0
- package/selected-skills/financeskills/skills/personal-budgeting/references/budgeting-methods.md +40 -0
- package/selected-skills/financeskills/skills/personal-budgeting/references/spending-categories.md +40 -0
- package/selected-skills/financeskills/skills/predictive-burn-rate/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/predictive-burn-rate/SKILL.md +82 -0
- package/selected-skills/financeskills/skills/predictive-burn-rate/references/startup-metrics.md +27 -0
- package/selected-skills/financeskills/skills/predictive-burn-rate/references/time-series-forecasting.md +22 -0
- package/selected-skills/financeskills/skills/product-profitability/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/product-profitability/SKILL.md +83 -0
- package/selected-skills/financeskills/skills/product-profitability/references/allocation-logic.md +28 -0
- package/selected-skills/financeskills/skills/product-profitability/references/unit-economics.md +30 -0
- package/selected-skills/financeskills/skills/retirement-planning/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/retirement-planning/SKILL.md +98 -0
- package/selected-skills/financeskills/skills/retirement-planning/references/compound-growth.md +38 -0
- package/selected-skills/financeskills/skills/retirement-planning/references/retirement-fundamentals.md +29 -0
- package/selected-skills/financeskills/skills/revenue-recognition/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/revenue-recognition/SKILL.md +86 -0
- package/selected-skills/financeskills/skills/revenue-recognition/assets/allocation-workpaper-template.md +30 -0
- package/selected-skills/financeskills/skills/revenue-recognition/references/ifrs15-guide.md +28 -0
- package/selected-skills/financeskills/skills/revenue-recognition/references/saas-rev-rec.md +26 -0
- package/selected-skills/financeskills/skills/risk-assessment/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/risk-assessment/SKILL.md +83 -0
- package/selected-skills/financeskills/skills/risk-assessment/references/hedging-guide.md +24 -0
- package/selected-skills/financeskills/skills/risk-assessment/references/risk-metrics.md +24 -0
- package/selected-skills/financeskills/skills/sox-compliance/EXAMPLE.md +17 -0
- package/selected-skills/financeskills/skills/sox-compliance/SKILL.md +88 -0
- package/selected-skills/financeskills/skills/sox-compliance/references/sampling-methodology.md +27 -0
- package/selected-skills/financeskills/skills/startup-valuation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/startup-valuation/SKILL.md +88 -0
- package/selected-skills/financeskills/skills/startup-valuation/references/berkus-method.md +25 -0
- package/selected-skills/financeskills/skills/startup-valuation/references/vc-method.md +23 -0
- package/selected-skills/financeskills/skills/statement-preparation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/statement-preparation/SKILL.md +86 -0
- package/selected-skills/financeskills/skills/statement-preparation/references/accruals-deferrals.md +24 -0
- package/selected-skills/financeskills/skills/statement-preparation/references/cash-flow-method.md +32 -0
- package/selected-skills/financeskills/skills/tax-efficient-investing/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/tax-efficient-investing/SKILL.md +97 -0
- package/selected-skills/financeskills/skills/tax-efficient-investing/references/account-types.md +33 -0
- package/selected-skills/financeskills/skills/tax-efficient-investing/references/asset-location.md +36 -0
- package/selected-skills/financeskills/skills/tax-planning/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/tax-planning/SKILL.md +93 -0
- package/selected-skills/financeskills/skills/tax-planning/references/common-deductions.md +28 -0
- package/selected-skills/financeskills/skills/tax-planning/references/tax-code-lookup.md +25 -0
- package/selected-skills/financeskills/skills/three-statement-modeling/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/three-statement-modeling/SKILL.md +84 -0
- package/selected-skills/financeskills/skills/three-statement-modeling/references/model-checks.md +32 -0
- package/selected-skills/financeskills/skills/treasury-management/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/treasury-management/SKILL.md +83 -0
- package/selected-skills/financeskills/skills/treasury-management/references/fx-hedging.md +27 -0
- package/selected-skills/financeskills/skills/treasury-management/references/liquidity-metrics.md +24 -0
- package/selected-skills/financeskills/skills/variance-analysis/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/variance-analysis/SKILL.md +78 -0
- package/selected-skills/financeskills/skills/variance-analysis/references/overhead-logic.md +24 -0
- package/selected-skills/financeskills/skills/variance-analysis/references/variance-math.md +35 -0
- package/selected-skills/financeskills/skills/venture-debt/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/venture-debt/SKILL.md +84 -0
- package/selected-skills/financeskills/skills/venture-debt/references/saas-debt-metrics.md +26 -0
- package/selected-skills/financeskills/skills/venture-debt/references/venture-lending.md +23 -0
- package/selected-skills/financeskills/skills/wacc-computation/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/wacc-computation/SKILL.md +98 -0
- package/selected-skills/financeskills/skills/wacc-computation/assets/wacc-memo-template.md +40 -0
- package/selected-skills/financeskills/skills/wacc-computation/references/beta-math.md +24 -0
- package/selected-skills/financeskills/skills/wacc-computation/references/capm-basics.md +24 -0
- package/selected-skills/financeskills/skills/working-capital-analysis/EXAMPLE.md +21 -0
- package/selected-skills/financeskills/skills/working-capital-analysis/SKILL.md +83 -0
- package/selected-skills/financeskills/skills/working-capital-analysis/references/wc-metrics.md +30 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: intercompany-accounting
|
|
3
|
+
description: When the user wants to manage intercompany transactions, balances, eliminations, or settlement. Also use when the user mentions "intercompany mismatch," "IC reconciliation," "transfer pricing entries," "intercompany loans," "netting," "due to/due from," or "elimination entries."
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Intercompany Accounting
|
|
9
|
+
|
|
10
|
+
You are a Group Reporting Accountant. Your goal is to keep intercompany (IC) balances matched, transactions properly priced and documented, and eliminations clean at consolidation.
|
|
11
|
+
|
|
12
|
+
## Initial Assessment
|
|
13
|
+
|
|
14
|
+
1. **IC Landscape**
|
|
15
|
+
- Entity map: who transacts with whom (goods, services, royalties, cost-shares, loans, dividends).
|
|
16
|
+
- Matching infrastructure: dedicated IC accounts by counterparty? Matching tool or spreadsheets? Tolerance policy?
|
|
17
|
+
|
|
18
|
+
2. **This Period's Problem**
|
|
19
|
+
- New transaction to structure, mismatch to resolve, elimination to prepare, or settlement/netting to run.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## IC Framework
|
|
24
|
+
|
|
25
|
+
### Transaction Lifecycle Discipline
|
|
26
|
+
1. **Agreement**: every recurring IC flow has a signed IC agreement (service description, pricing basis, payment terms) — transfer pricing documentation depends on it.
|
|
27
|
+
2. **Pricing**: arm's length per TP policy (cost-plus for services, CUP/resale-minus for goods, market-rate interest on loans). Local rules apply (Nigeria: FIRS TP Regulations, contemporaneous documentation thresholds).
|
|
28
|
+
3. **Both-sides booking standard**: seller and buyer book in the SAME period — IC cut-off deadline before entity close (close-management WD-0 rule), seller's invoice is authoritative.
|
|
29
|
+
4. **Settlement**: periodic cash settlement or multilateral netting; aged unsettled IC balances attract thin-cap/deemed-dividend/withholding scrutiny and FX exposure.
|
|
30
|
+
|
|
31
|
+
### Mismatch Resolution Hierarchy
|
|
32
|
+
Timing (in transit) → FX (different rates used — fix: mandated single rate source) → missing booking (one side never recorded) → pricing dispute (escalate to TP owner). Tolerance rule: differences < threshold auto-plug to P&L of the buying entity, logged.
|
|
33
|
+
|
|
34
|
+
### Elimination Mechanics (consolidation)
|
|
35
|
+
- Balances: Due-from vs. due-to by counterparty pair — must net to zero pre-elimination.
|
|
36
|
+
- P&L: IC revenue vs. IC cost eliminated gross.
|
|
37
|
+
- **Unrealized profit**: in inventory `(IC margin × inventory still held)` and in fixed assets (eliminate gain, recompute depreciation) — with deferred tax at the buyer's rate.
|
|
38
|
+
- IC dividends, interest, management fees eliminated; withholding tax paid stays real.
|
|
39
|
+
- FX wrinkle: IC balance in a third currency revalues differently in each entity — the consolidation FX difference goes to CTA, not suspense.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Technical Analysis Steps
|
|
44
|
+
|
|
45
|
+
1. **Matching matrix with code**: counterparty-pair grid of due-from/due-to and revenue/cost; difference report sorted by magnitude.
|
|
46
|
+
2. **Unrealized profit calculation**: inventory holding report × IC margin by product flow.
|
|
47
|
+
3. **Loan compliance check**: interest accrual both sides, market-rate evidence, thin-cap ratio (Nigeria: 30% of EBITDA interest deduction cap for foreign-connected debt), WHT on interest.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Output Format
|
|
52
|
+
|
|
53
|
+
### IC Reconciliation / Elimination Package
|
|
54
|
+
|
|
55
|
+
**Matching Matrix**: pair-by-pair balances with differences and aging.
|
|
56
|
+
|
|
57
|
+
**Difference Resolution Log**: cause category, owner, fix, deadline.
|
|
58
|
+
|
|
59
|
+
**Elimination Entries**: full set with deferred tax effects.
|
|
60
|
+
|
|
61
|
+
**Compliance Notes**: TP documentation status, settlement aging, thin-cap headroom.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Scripts
|
|
66
|
+
- [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.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## References
|
|
71
|
+
- [Elimination Entries Guide](./references/elimination-entries.md): Worked eliminations including unrealized profit and FX.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Related Skills
|
|
76
|
+
- **corporate-consolidation**: Eliminations feed the consolidation this skill supports.
|
|
77
|
+
- **automated-reconciliation**: Matching engine logic for IC balances.
|
|
78
|
+
- **deferred-tax**: Tax effects of unrealized profit eliminations.
|
|
79
|
+
- **tax-planning**: Transfer pricing strategy behind IC pricing.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Intercompany Elimination Entries (worked)
|
|
2
|
+
|
|
3
|
+
## 1. Balance Elimination
|
|
4
|
+
Parent due-from Sub 40M; Sub due-to Parent 40M:
|
|
5
|
+
`Dr IC Payable (Sub) 40M / Cr IC Receivable (Parent) 40M` — at consolidation level only; never touch entity books.
|
|
6
|
+
If they DON'T match, fix the entity books first. Eliminating a mismatch hides an error.
|
|
7
|
+
|
|
8
|
+
## 2. IC Sales and Unrealized Profit in Inventory
|
|
9
|
+
Sub sold goods to Parent for 30M (cost 22M); Parent resold 75%, holds 25%.
|
|
10
|
+
- Eliminate trading gross: `Dr IC Revenue 30M / Cr IC COGS 30M` (then true COGS adjustments)
|
|
11
|
+
- Unrealized profit = 25% × 8M = 2M: `Dr COGS 2M / Cr Inventory 2M`
|
|
12
|
+
- Deferred tax (buyer's rate 30%): `Dr DTA 0.6M / Cr Tax Expense 0.6M`
|
|
13
|
+
- NCI note: if the SELLER is a partly-owned sub (upstream), allocate the 2M elimination against NCI's profit share proportionately.
|
|
14
|
+
|
|
15
|
+
## 3. Fixed Asset Transfer With Gain
|
|
16
|
+
Sub sells machine to Parent: proceeds 15M, carrying 10M, remaining life 5 years, transfer at start of year.
|
|
17
|
+
- Eliminate gain: `Dr Gain on Disposal 5M / Cr PP&E 5M`
|
|
18
|
+
- Depreciation correction (parent depreciates 15M/5 = 3M; group basis 10M/5 = 2M): `Dr Accumulated Depreciation 1M / Cr Depreciation Expense 1M` — repeat annually until life ends.
|
|
19
|
+
- Deferred tax on the net 4M difference at buyer's rate.
|
|
20
|
+
|
|
21
|
+
## 4. IC Loan and Interest
|
|
22
|
+
Parent lends Sub $1M at 8%; half-year elapsed.
|
|
23
|
+
- Eliminate balance: `Dr Loan Payable 1M / Cr Loan Receivable 1M`
|
|
24
|
+
- Eliminate interest: `Dr Interest Income 40k / Cr Interest Expense 40k`
|
|
25
|
+
- WHT withheld by Sub on interest paid stays in the consolidated tax accounts (real cash to the tax authority).
|
|
26
|
+
- Check: both sides accrued? A common mismatch is lender accruing monthly, borrower booking on payment.
|
|
27
|
+
|
|
28
|
+
## 5. Management Fees / Royalties
|
|
29
|
+
`Dr Management Fee Income (Parent) / Cr Management Fee Expense (Sub)` — gross elimination. Verify the TP markup documentation BEFORE eliminating; elimination doesn't sanitize a non-arm's-length price for tax.
|
|
30
|
+
|
|
31
|
+
## 6. IC Dividend
|
|
32
|
+
Sub declares 20M dividend to Parent: `Dr Dividend Income (Parent) 20M / Cr Retained Earnings adjustment` at consolidation (the sub's RE reduction already flows through). NCI's share of the dividend is real cash out of the group — no elimination of the NCI portion.
|
|
33
|
+
|
|
34
|
+
## Settlement Netting Cycle (monthly)
|
|
35
|
+
Build the obligation matrix → net bilaterally (or multilaterally via a netting center) → single payment per pair → book settlements same day both sides → revalue residual FX stubs. Netting cuts wire costs and FX spread, and ages nothing.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Worked Example - inventory-costing
|
|
2
|
+
|
|
3
|
+
## Ask
|
|
4
|
+
|
|
5
|
+
> Purchases: 200 units at 50, then 300 at 60, then 100 at 70. We sold 450 units. Give me COGS and ending inventory under FIFO and periodic weighted average.
|
|
6
|
+
|
|
7
|
+
## What a correct response contains
|
|
8
|
+
|
|
9
|
+
Total cost 35,000 for 600 units. FIFO: COGS = 200x50 + 250x60 = 25,000; ending = 50x60 + 100x70 = 10,000. Weighted avg 58.333: COGS = 26,250; ending = 8,750. Both proved to total 35,000.
|
|
10
|
+
|
|
11
|
+
## File-driven variant
|
|
12
|
+
|
|
13
|
+
With fixture(s) `evals/files/purchases_sales.csv`:
|
|
14
|
+
|
|
15
|
+
> From the attached purchase/sale ledger (evals/files/purchases_sales.csv), compute COGS and ending inventory for the 150-unit sale under FIFO, weighted average, and periodic LIFO. State which gives the lowest taxable income in this rising-price environment.
|
|
16
|
+
|
|
17
|
+
Expected: FIFO COGS $1,600 / EI $2,000; WAC $1,800; LIFO $2,000. LIFO minimizes taxable income when prices rise.
|
|
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,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: inventory-costing
|
|
3
|
+
description: When the user wants to value inventory, choose or apply costing methods, or handle write-downs. Also use when the user mentions "FIFO," "weighted average cost," "standard cost," "NRV," "lower of cost and NRV," "inventory write-down," "obsolescence provision," "absorption of overheads into inventory," or "cycle count adjustments."
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Inventory Costing (IAS 2 / ASC 330)
|
|
9
|
+
|
|
10
|
+
You are a Cost Accountant. Your goal is to value inventory correctly: right cost formula, right overhead absorption, and disciplined write-downs to net realizable value.
|
|
11
|
+
|
|
12
|
+
## Initial Assessment
|
|
13
|
+
|
|
14
|
+
1. **Inventory Profile**
|
|
15
|
+
- Raw materials, WIP, finished goods, spares/consumables, goods in transit (check shipping terms).
|
|
16
|
+
- Costing method in use: FIFO, weighted average (periodic vs. moving), standard cost, retail method. (LIFO: US GAAP only, prohibited under IFRS.)
|
|
17
|
+
|
|
18
|
+
2. **Cost Components**
|
|
19
|
+
- Purchase cost net of discounts/rebates + import duties + non-recoverable taxes + freight-in.
|
|
20
|
+
- Conversion costs: direct labor + variable overhead + fixed overhead absorbed at NORMAL capacity.
|
|
21
|
+
- Excluded: abnormal waste, storage of finished goods, selling costs, admin overhead, FX losses.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Costing Framework
|
|
26
|
+
|
|
27
|
+
### Cost Formula Mechanics
|
|
28
|
+
- **FIFO**: oldest costs to COGS; inventory at recent costs. Rising prices → higher inventory, lower COGS.
|
|
29
|
+
- **Weighted average (moving)**: recompute average after each receipt: `new avg = (qty_old × avg_old + qty_in × cost_in)/(qty_old + qty_in)`.
|
|
30
|
+
- Same formula for all inventories of similar nature and use (IAS 2.25–26) — entity-wide consistency by class.
|
|
31
|
+
|
|
32
|
+
### Standard Costing Bridge
|
|
33
|
+
Standards permitted if they approximate actual: variances must be analyzed (variance-analysis skill) and material variances PRORATED back into inventory/COGS at period end — expensing all favorable variances while capitalizing unfavorable is a classic earnings-management flag.
|
|
34
|
+
|
|
35
|
+
### Fixed Overhead Absorption (the audit battleground)
|
|
36
|
+
Rate = budgeted fixed production overhead / NORMAL capacity. Low production → unabsorbed overhead expensed immediately (never inflate unit costs); abnormally high production → decrease the rate (never over-absorb).
|
|
37
|
+
|
|
38
|
+
### Lower of Cost and NRV
|
|
39
|
+
`NRV = estimated selling price − costs to complete − costs to sell`
|
|
40
|
+
Item-by-item (or similar-item groups); raw materials written down only if the finished product they feed is itself below cost (replacement cost as proxy). Reversals required under IFRS when NRV recovers (to original cost ceiling); prohibited under US GAAP (except LIFO/retail re-measurement nuances).
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Technical Analysis Steps
|
|
45
|
+
|
|
46
|
+
1. **Recompute with code**: cost formula application, absorption rates, NRV tests.
|
|
47
|
+
2. **Obsolescence provision matrix**: aging × movement (e.g., no movement 6/12/24 months → 25/50/100% provision), overridden by item-level evidence; validate the matrix annually against actual scrappage outcomes.
|
|
48
|
+
3. **Count adjustments**: book-to-physical differences investigated above threshold, shrinkage trend analysis (forensic-accounting if pattern emerges).
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Output Format
|
|
53
|
+
|
|
54
|
+
### Inventory Valuation Memo
|
|
55
|
+
|
|
56
|
+
**Method & Inputs**: formula, absorption basis, normal capacity stated.
|
|
57
|
+
|
|
58
|
+
**Computation**: valuation schedule by category with code-verified math.
|
|
59
|
+
|
|
60
|
+
**NRV/Obsolescence**: items tested, write-downs proposed, provision matrix output.
|
|
61
|
+
|
|
62
|
+
**Entries**: adjustment JEs (journal-entry format).
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Scripts
|
|
67
|
+
- [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.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## References
|
|
72
|
+
- [Costing Worked Examples](./references/costing-examples.md): FIFO vs. weighted average, absorption, and NRV calculations.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Related Skills
|
|
77
|
+
- **variance-analysis**: Standard cost variances feeding inventory valuation.
|
|
78
|
+
- **product-profitability**: Unit costs flow into margin analysis.
|
|
79
|
+
- **journal-entry**: For adjustment entries.
|
|
80
|
+
- **forensic-accounting**: Shrinkage and count-fraud patterns.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Inventory Costing Worked Examples
|
|
2
|
+
|
|
3
|
+
## 1. FIFO vs. Weighted Average (same data)
|
|
4
|
+
Purchases: 100 units @ 10; 100 @ 12; 100 @ 15. Sold: 220 units.
|
|
5
|
+
- **FIFO**: COGS = 100×10 + 100×12 + 20×15 = 2,500. Ending inventory = 80×15 = 1,200.
|
|
6
|
+
- **Periodic weighted avg**: avg = 3,700/300 = 12.333. COGS = 220 × 12.333 = 2,713. Ending = 80 × 12.333 = 987.
|
|
7
|
+
- Check: COGS + ending = 3,700 total cost in both methods. Always prove this identity.
|
|
8
|
+
|
|
9
|
+
## 2. Moving Average With Interleaved Sales
|
|
10
|
+
Start 100 @ 10 (avg 10). Sell 50 → COGS 500, remain 50 @ 10. Buy 100 @ 13 → avg = (500 + 1,300)/150 = 12.00. Sell 100 → COGS 1,200, remain 50 @ 12.
|
|
11
|
+
Moving average is path-dependent — recomputation must follow transaction order, which is why backdated transactions corrupt it.
|
|
12
|
+
|
|
13
|
+
## 3. Fixed Overhead Absorption at Normal Capacity
|
|
14
|
+
Budgeted FOH 1,200,000; normal capacity 100,000 units → rate 12/unit.
|
|
15
|
+
Actual production 80,000 units → absorbed 960,000; **240,000 unabsorbed → straight to COGS/P&L**, units still carry 12 each. Producing 130,000 units → rate drops to 1,200,000/130,000 = 9.23; never absorb more than actual FOH.
|
|
16
|
+
|
|
17
|
+
## 4. NRV Test
|
|
18
|
+
Finished good: cost 50; selling price 54; selling costs 6 → NRV 48 → **write down 2/unit**.
|
|
19
|
+
Raw material feeding it: cost 20, replacement 17. Write down ONLY because the finished product is already below cost; use replacement cost 17 as NRV proxy → write down 3.
|
|
20
|
+
|
|
21
|
+
## 5. Obsolescence Matrix (calibrate to actual outcomes)
|
|
22
|
+
| Last movement | Provision % |
|
|
23
|
+
|---|---|
|
|
24
|
+
| < 6 months | 0 |
|
|
25
|
+
| 6–12 months | 25 |
|
|
26
|
+
| 12–24 months | 50 |
|
|
27
|
+
| > 24 months | 100 |
|
|
28
|
+
Overrides: contracted future use → release; engineering change notices → 100% immediately regardless of age. Backtest yearly: of items provided 50% last year, what % were actually used vs. scrapped?
|
|
29
|
+
|
|
30
|
+
## 6. Goods in Transit Cut-Off
|
|
31
|
+
FOB shipping point, shipped Dec 28, received Jan 3 → BUYER's inventory at Dec 31 (and the payable). FOB destination → seller's until delivery. Match the freight terms report to the cut-off accrual every close.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Worked Example - investment-analysis
|
|
2
|
+
|
|
3
|
+
## Ask
|
|
4
|
+
|
|
5
|
+
> Is Tesla a good buy at $170? Its P/E is 45 and revenue growth is slowing. Can you run a quick valuation?
|
|
6
|
+
|
|
7
|
+
## What a correct response contains
|
|
8
|
+
|
|
9
|
+
Should identify the need for a DCF or Multiples analysis. Should discuss the high P/E (45) relative to slowing revenue growth. Should identify key drivers for Tesla (Deliveries, FSD, Margins). Should provide an Investment Memo structure with a target price or recommendation range.
|
|
10
|
+
|
|
11
|
+
## File-driven variant
|
|
12
|
+
|
|
13
|
+
With fixture(s) `evals/files/project_cashflows.csv`:
|
|
14
|
+
|
|
15
|
+
> Evaluate the project in the attached cash-flow file (evals/files/project_cashflows.csv) at a 10% hurdle: NPV, IRR, payback period, and profitability index. Recommend accept/reject with reasoning.
|
|
16
|
+
|
|
17
|
+
Expected: NPV $267,946; IRR 21.9%; payback 2.5 years; PI 1.27. Accept (IRR > hurdle, NPV > 0).
|
|
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: investment-analysis
|
|
3
|
+
description: When the user wants to evaluate the potential profitability and viability of an investment opportunity. Also use when the user mentions "stock valuation," "DCF model," "NPV calculation," "IRR analysis," "buy or sell," "investment thesis," "margin of safety," or "equity research." Use this for stocks, real estate, and private equity.
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.1.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Investment Analysis
|
|
9
|
+
|
|
10
|
+
You are an Equity Research Analyst. Your goal is to determine the intrinsic value of an asset and provide a clear investment recommendation based on a margin of safety.
|
|
11
|
+
|
|
12
|
+
## Initial Assessment
|
|
13
|
+
|
|
14
|
+
1. **Asset Context**
|
|
15
|
+
- Publicly traded company, private entity, or real estate?
|
|
16
|
+
- What is the current market price?
|
|
17
|
+
- What is the investor's time horizon?
|
|
18
|
+
|
|
19
|
+
2. **Data Availability**
|
|
20
|
+
- Do we have 5-10 years of historical financials?
|
|
21
|
+
- Do we have analyst consensus or management guidance?
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Analysis Framework
|
|
26
|
+
|
|
27
|
+
### Priority Order
|
|
28
|
+
1. **Fundamental Analysis** (Understanding the business model and moats).
|
|
29
|
+
2. **Financial Modeling** (Building the DCF or LBO model).
|
|
30
|
+
3. **Relative Valuation** (Comparing Multiples - P/E, EV/EBITDA).
|
|
31
|
+
4. **Risk Assessment** (Identifying the "Bear Case").
|
|
32
|
+
5. **Investment Thesis** (Synthesizing findings into a recommendation).
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Technical Analysis Steps
|
|
37
|
+
|
|
38
|
+
### 1. Business Model Review
|
|
39
|
+
- Identify the "Moat" (Brand, Network Effect, Cost Advantage).
|
|
40
|
+
- Analyze the competitive landscape and market share trends.
|
|
41
|
+
|
|
42
|
+
### 2. Discounted Cash Flow (DCF)
|
|
43
|
+
- Forecast Free Cash Flow (FCF) for 5-10 years.
|
|
44
|
+
- Determine the Weighted Average Cost of Capital (WACC).
|
|
45
|
+
- Calculate the Terminal Value using the perpetuity growth method or exit multiple.
|
|
46
|
+
|
|
47
|
+
### 3. Multiples Analysis
|
|
48
|
+
- Compare the target's P/E, P/S, and EV/EBITDA to historical averages and industry peers.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Output Format
|
|
53
|
+
|
|
54
|
+
### Investment Memo Structure
|
|
55
|
+
|
|
56
|
+
**Executive Summary**
|
|
57
|
+
- Recommendation (Buy/Hold/Sell).
|
|
58
|
+
- Target Price and Upside/Downside percentage.
|
|
59
|
+
- The "One Sentence" Thesis.
|
|
60
|
+
|
|
61
|
+
**Detailed Analysis**
|
|
62
|
+
- **Valuation**: Breakdown of DCF assumptions and output.
|
|
63
|
+
- **Moat Analysis**: Qualitative assessment of competitive advantage.
|
|
64
|
+
- **Risks**: Key factors that could invalidate the thesis.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Scripts
|
|
69
|
+
- [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.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## References
|
|
74
|
+
- [Valuation Methodologies](./references/valuation-guide.md): Standard practices for DCF and Multiples.
|
|
75
|
+
- [Moat Identification](./references/competitive-advantage.md): How to assess business quality.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Related Skills
|
|
80
|
+
- **financial-analysis**: For the baseline audit of historical numbers.
|
|
81
|
+
- **risk-assessment**: For deeper dive into the downside scenarios.
|
|
82
|
+
- **budget-forecast**: For building the 5-10 year projection used in the DCF.
|
package/selected-skills/financeskills/skills/investment-analysis/references/competitive-advantage.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Competitive Advantage: Identifying Moats
|
|
2
|
+
|
|
3
|
+
Why some companies earn high returns on capital for decades while others fail.
|
|
4
|
+
|
|
5
|
+
## 🏛️ The Five Types of Moats (Morningstar Framework)
|
|
6
|
+
|
|
7
|
+
### 1. Network Effect
|
|
8
|
+
The value of a service increases as more people use it (e.g., Visa, Facebook, Microsoft Windows).
|
|
9
|
+
|
|
10
|
+
### 2. Intangible Assets
|
|
11
|
+
Brands, patents, or regulatory licenses that allow a company to charge more or block competitors (e.g., Coca-Cola, Disney, Pfizer).
|
|
12
|
+
|
|
13
|
+
### 3. Cost Advantage
|
|
14
|
+
Producing goods or services at a lower cost than competitors due to scale, location, or unique processes (e.g., Walmart, Amazon, Geico).
|
|
15
|
+
|
|
16
|
+
### 4. Switching Costs
|
|
17
|
+
The time, money, or emotional cost of moving to a competitor is too high (e.g., Oracle Database, ERP systems, Bank accounts).
|
|
18
|
+
|
|
19
|
+
### 5. Efficient Scale
|
|
20
|
+
A market is so small that it only supports 1-2 profitable players; a new entrant would make everyone unprofitable (e.g., Regional airports, Pipeline companies).
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 🔍 Evidence of a Moat
|
|
25
|
+
- Consistent **Return on Invested Capital (ROIC)** > **WACC**.
|
|
26
|
+
- Stable or growing **Market Share**.
|
|
27
|
+
- **Pricing Power** (Ability to raise prices without losing customers).
|
|
28
|
+
|
|
29
|
+
## 🔗 Sources
|
|
30
|
+
- [Morningstar: The Five Sources of Economic Moats](https://www.morningstar.com/articles/932358/the-five-sources-of-economic-moats)
|
|
31
|
+
- [Pat Dorsey: The Little Book that Builds Wealth](https://www.goodreads.com/book/show/2358514.The_Little_Book_that_Builds_Wealth)
|
package/selected-skills/financeskills/skills/investment-analysis/references/valuation-guide.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Valuation Guide: DCF & Multiples
|
|
2
|
+
|
|
3
|
+
Standard methodologies for determining the intrinsic and relative value of a business.
|
|
4
|
+
|
|
5
|
+
## 🏛️ Discounted Cash Flow (DCF)
|
|
6
|
+
The DCF is a "First Principles" valuation based on the present value of future cash flows.
|
|
7
|
+
|
|
8
|
+
### The Formula
|
|
9
|
+
`Value = Σ [FCF_t / (1 + WACC)^t]`
|
|
10
|
+
- **FCF**: Free Cash Flow (Cash from Ops - CapEx).
|
|
11
|
+
- **WACC**: Weighted Average Cost of Capital (Discount rate).
|
|
12
|
+
- **t**: Time period.
|
|
13
|
+
|
|
14
|
+
### Key Assumptions
|
|
15
|
+
- **Terminal Growth Rate**: Usually 2-3% (aligned with long-term GDP growth).
|
|
16
|
+
- **Discount Rate**: Reflects the riskiness of the cash flows.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 🔍 Relative Valuation (Multiples)
|
|
21
|
+
Comparing a company to its peers or its own historical history.
|
|
22
|
+
|
|
23
|
+
- **P/E (Price-to-Earnings)**: Most common for profitable companies.
|
|
24
|
+
- **EV/EBITDA**: Used for capital-intensive industries; accounts for debt.
|
|
25
|
+
- **P/S (Price-to-Sales)**: Used for high-growth companies with no net income.
|
|
26
|
+
|
|
27
|
+
## 🔗 Sources
|
|
28
|
+
- [Aswath Damodaran: Valuation Site](http://pages.stern.nyu.edu/~adamodar/)
|
|
29
|
+
- [Investopedia: Discounted Cash Flow](https://www.investopedia.com/terms/d/dcf.asp)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Worked Example - journal-entry
|
|
2
|
+
|
|
3
|
+
## Ask
|
|
4
|
+
|
|
5
|
+
> We received legal services worth $25,000 in June but the invoice won't arrive until July. Prepare the June entry.
|
|
6
|
+
|
|
7
|
+
## What a correct response contains
|
|
8
|
+
|
|
9
|
+
Dr Legal/Professional Fees 25,000 / Cr Accrued Liabilities 25,000, flagged auto-reversing in July, with documentation basis (engagement letter, work confirmation).
|
|
10
|
+
|
|
11
|
+
## File-driven variant
|
|
12
|
+
|
|
13
|
+
With fixture(s) `evals/files/draft_entries.csv`:
|
|
14
|
+
|
|
15
|
+
> Review the attached draft journal entries (evals/files/draft_entries.csv) before posting. Validate each entry balances, flag any malformed lines, and state which entries are safe to post.
|
|
16
|
+
|
|
17
|
+
Expected: JE-101 and JE-103 are valid. JE-102 is out of balance by $450 (17,500 vs 17,050 - transposition). JE-104 has a line with both a debit and credit (invalid form) - net effect balances but the entry must be re-drafted. Only JE-101 and JE-103 post as-is.
|
|
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,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: journal-entry
|
|
3
|
+
description: When the user wants to prepare, review, or document a journal entry with proper debits, credits, and support. Also use when the user mentions "book an accrual," "post a JE," "adjusting entry," "prepaid amortization," "payroll entry," "reclass," or "reversing entry."
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Journal Entry Preparation
|
|
9
|
+
|
|
10
|
+
You are a Senior GL Accountant. Your goal is to produce journal entries that are correct in debit/credit logic, properly supported, and ready to survive both review and audit.
|
|
11
|
+
|
|
12
|
+
## Initial Assessment
|
|
13
|
+
|
|
14
|
+
1. **Entry Context**
|
|
15
|
+
- What economic event is being recorded, and in which period does it belong?
|
|
16
|
+
- Entry type: accrual, deferral, depreciation/amortization, reclass, correction, revaluation, or non-routine.
|
|
17
|
+
- Auto-reversing next period? Recurring or one-time?
|
|
18
|
+
|
|
19
|
+
2. **Support & Authority**
|
|
20
|
+
- Source documents available (invoice, contract, calculation schedule, payroll register).
|
|
21
|
+
- Approval threshold and who must sign.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Entry Framework
|
|
26
|
+
|
|
27
|
+
### Debit/Credit Mechanics
|
|
28
|
+
- Assets & expenses increase with DEBITS; liabilities, equity, and revenue increase with CREDITS.
|
|
29
|
+
- Every entry balances. Multi-line entries: validate Σdebits = Σcredits before anything else.
|
|
30
|
+
|
|
31
|
+
### Standard Entry Patterns
|
|
32
|
+
| Event | Entry |
|
|
33
|
+
|---|---|
|
|
34
|
+
| Expense accrual | Dr Expense / Cr Accrued Liability (reverse next period) |
|
|
35
|
+
| Prepaid amortization | Dr Expense / Cr Prepaid Asset |
|
|
36
|
+
| Depreciation | Dr Depreciation Expense / Cr Accumulated Depreciation |
|
|
37
|
+
| Deferred revenue release | Dr Deferred Revenue / Cr Revenue |
|
|
38
|
+
| Payroll | Dr Salary Expense + Dr Employer Burden / Cr Cash + Cr Withholding Liabilities + Cr Pension Payable |
|
|
39
|
+
| Bad debt provision | Dr Impairment Expense / Cr Allowance for ECL |
|
|
40
|
+
| Error correction | Reverse the wrong entry in full, then post correctly — never post net differences |
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Technical Analysis Steps
|
|
45
|
+
|
|
46
|
+
### 1. Period Assignment
|
|
47
|
+
Match the entry to the period the economics occurred (cut-off). For corrections of prior periods, assess materiality: immaterial → current period; material → prior-period restatement treatment.
|
|
48
|
+
|
|
49
|
+
### 2. Account Selection
|
|
50
|
+
Use the chart of accounts hierarchy; never invent accounts. Question any entry touching suspense/clearing accounts — they need a clearance plan.
|
|
51
|
+
|
|
52
|
+
### 3. Documentation Standard
|
|
53
|
+
Every JE carries: description (what + why + period), preparer, calculation support, source documents, approval per delegation-of-authority matrix.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Output Format
|
|
58
|
+
|
|
59
|
+
### Journal Entry Package
|
|
60
|
+
|
|
61
|
+
**Entry Header**
|
|
62
|
+
- Date, period, entity, currency, auto-reverse flag, JE type.
|
|
63
|
+
|
|
64
|
+
**Entry Lines**
|
|
65
|
+
- Account | Account Name | Debit | Credit | Line memo | Cost center.
|
|
66
|
+
|
|
67
|
+
**Support Summary**
|
|
68
|
+
- Basis of calculation, source documents, and assumptions.
|
|
69
|
+
|
|
70
|
+
**Review Checklist**
|
|
71
|
+
- Balanced? Correct period? Correct accounts? Support attached? Approval obtained?
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Scripts
|
|
76
|
+
- [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.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## References
|
|
81
|
+
- [Entry Patterns Cookbook](./references/entry-patterns.md): Worked entries for the 15 most common close scenarios.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Assets
|
|
86
|
+
- [journal-entry-template.md](./assets/journal-entry-template.md): JE voucher with approval fields.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Related Skills
|
|
91
|
+
- **close-management**: For where each entry type fits in the close calendar.
|
|
92
|
+
- **automated-reconciliation**: Entries often originate from reconciling items.
|
|
93
|
+
- **revenue-recognition**: For the revenue entries' measurement logic.
|
|
94
|
+
- **deferred-tax**: For the tax entries on temporary differences.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Journal Entry Voucher
|
|
2
|
+
|
|
3
|
+
**JE #:** {number} | **Date:** {posting date} | **Period:** {period} | **Type:** {accrual / reversal / standard / adjusting}
|
|
4
|
+
|
|
5
|
+
| Line | Account code | Account name | Dr | Cr | Memo |
|
|
6
|
+
|---|---|---|---|---|---|
|
|
7
|
+
| 1 | | | | | |
|
|
8
|
+
| 2 | | | | | |
|
|
9
|
+
| | | **Totals (must be equal)** | **{x}** | **{x}** | |
|
|
10
|
+
|
|
11
|
+
**Business purpose:** {1-2 sentences - why this entry exists}
|
|
12
|
+
|
|
13
|
+
**Support:** {invoice / contract / calculation reference}
|
|
14
|
+
|
|
15
|
+
**Reversal:** {auto-reverses on {date} / not applicable}
|
|
16
|
+
|
|
17
|
+
Prepared by: AI agent (scripts/calculate.py validate_entry passed: {y/n})
|
|
18
|
+
Reviewed by: ____________ Approved by: ____________
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
*AI-prepared entry - requires human review and approval before posting.*
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Journal Entry Patterns Cookbook
|
|
2
|
+
|
|
3
|
+
All examples balance and state their reversal behavior.
|
|
4
|
+
|
|
5
|
+
## 1. AP Accrual (service received, no invoice)
|
|
6
|
+
Dr Professional Fees 5,000 / Cr Accrued Liabilities 5,000 — auto-reverse WD1 next period.
|
|
7
|
+
|
|
8
|
+
## 2. Payroll (gross-to-net)
|
|
9
|
+
Dr Salaries Expense 10,000; Dr Employer Pension Expense 1,000
|
|
10
|
+
Cr Net Pay Payable 7,800; Cr PAYE Payable 2,200; Cr Pension Payable (employee 8% + employer 10% on relevant emoluments under Nigerian PRA 2014, adjust per jurisdiction) 1,000
|
|
11
|
+
|
|
12
|
+
## 3. Prepaid Insurance (annual premium 12,000 paid 1 March)
|
|
13
|
+
At payment: Dr Prepaid Insurance 12,000 / Cr Cash 12,000
|
|
14
|
+
Monthly: Dr Insurance Expense 1,000 / Cr Prepaid Insurance 1,000
|
|
15
|
+
|
|
16
|
+
## 4. Depreciation (asset 60,000, 5-yr straight line, no residual)
|
|
17
|
+
Monthly: Dr Depreciation Expense 1,000 / Cr Accumulated Depreciation 1,000
|
|
18
|
+
|
|
19
|
+
## 5. Deferred Revenue Release (annual SaaS 24,000 billed upfront)
|
|
20
|
+
At billing: Dr AR 24,000 / Cr Deferred Revenue 24,000
|
|
21
|
+
Monthly: Dr Deferred Revenue 2,000 / Cr Revenue 2,000
|
|
22
|
+
|
|
23
|
+
## 6. Unbilled (Accrued) Revenue
|
|
24
|
+
Dr Contract Asset–Unbilled AR 8,000 / Cr Revenue 8,000; reclass to AR on invoicing.
|
|
25
|
+
|
|
26
|
+
## 7. Bad Debt / ECL Provision Top-Up
|
|
27
|
+
Dr Impairment Loss 3,500 / Cr Allowance for ECL 3,500. Write-off: Dr Allowance / Cr AR (P&L only if allowance insufficient).
|
|
28
|
+
|
|
29
|
+
## 8. FX Revaluation (USD payable, NGN books, rate moved against you)
|
|
30
|
+
Dr FX Loss 150,000 / Cr Accounts Payable 150,000 — monetary items at closing rate (IAS 21).
|
|
31
|
+
|
|
32
|
+
## 9. Inventory Adjustment After Count
|
|
33
|
+
Shortage: Dr Inventory Shrinkage Expense / Cr Inventory. NRV write-down: Dr COGS (or separate line) / Cr Inventory Allowance.
|
|
34
|
+
|
|
35
|
+
## 10. Accrued Interest on Borrowing
|
|
36
|
+
Dr Interest Expense (EIR basis) / Cr Accrued Interest Payable; payment clears the payable.
|
|
37
|
+
|
|
38
|
+
## 11. Lease (IFRS 16, monthly)
|
|
39
|
+
Dr Interest Expense X; Dr Lease Liability Y / Cr Cash (X+Y). Separately: Dr ROU Depreciation / Cr Accumulated Depreciation–ROU.
|
|
40
|
+
|
|
41
|
+
## 12. Correction (expense posted to wrong cost center, same P&L account)
|
|
42
|
+
Dr Expense (CC-200) / Cr Expense (CC-100) — memo references original JE number.
|
|
43
|
+
|
|
44
|
+
## 13. Reclass Short-Term Portion of Debt
|
|
45
|
+
Dr Long-Term Debt / Cr Current Portion of LTD — every close.
|
|
46
|
+
|
|
47
|
+
## 14. Bonus Accrual (estimated, year-to-date true-up method)
|
|
48
|
+
Dr Bonus Expense / Cr Accrued Bonus = (expected annual bonus × months elapsed/12) − accrued to date.
|
|
49
|
+
|
|
50
|
+
## 15. Dividend Declaration
|
|
51
|
+
Dr Retained Earnings / Cr Dividends Payable at declaration; payment clears the liability. (Withholding tax: Cr WHT Payable for the withheld portion at payment.)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Worked Example - lbo-modeling
|
|
2
|
+
|
|
3
|
+
## Ask
|
|
4
|
+
|
|
5
|
+
> We want to buy a company for $100M (10x EBITDA). We are using $60M in debt and $40M in equity. If we exit in 5 years at the same multiple, what's our IRR?
|
|
6
|
+
|
|
7
|
+
## What a correct response contains
|
|
8
|
+
|
|
9
|
+
Should calculate the entry EBITDA ($10M). Should identify the need for cash flow projections to pay down debt. Should explain that if debt is paid down, the equity value at exit increases even if the multiple stays the same. Should provide an LBO Analysis Summary structure.
|
|
10
|
+
|
|
11
|
+
## File-driven variant
|
|
12
|
+
|
|
13
|
+
With fixture(s) `evals/files/lbo_assumptions.xlsx`:
|
|
14
|
+
|
|
15
|
+
> Run the LBO described in the attached assumptions workbook (evals/files/lbo_assumptions.xlsx). Compute entry EV, debt and sponsor equity, exit EBITDA and EV, exit equity value, MOIC and IRR. Debt is a bullet (no paydown); ignore cash generation.
|
|
16
|
+
|
|
17
|
+
Expected: Entry EV $400m, debt $240m, equity $160m. Exit EBITDA $73.5m, exit EV $588m, exit equity $348m. MOIC 2.17x, IRR 16.8%.
|
|
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.
|