Accounting
Accounting
Lean4 axiomatic kernel for the financial domain. TREND + MOMENTUM + OPTIONS-RISK + SECTOR + DRAWDOWN over portfolios. Defined-risk options only — six strategies enforced at the Strategy enum type level and re-checked by the OPTIONS-RISK predicates. Each verifier run produces a per-predicate report.json + proof-DAG graph.json + intro-rule loci.json — surfaced here as the recent-runs table + latest-run diagram + predicate roster.
Frameworks — module readiness
Five frameworks. OPTIONS-RISK enforces the defined-risk allow-list at the type level (6 strategies). Focused = predicates + axioms compile under the current toolchain.
Verifier-run statistics
Aggregate over all examples/<id>/report.json artefacts.
Verifier runs
Portfolios elaborated against the kernel.
Accepted
OKKernel verdict: ACCEPTED — every top-level judgment elaborates.
Rejected
OKKernel verdict: REJECTED — at least one element disproved.
Latest run
Balance
| ID | Portfolio | Frameworks | Judgments | Predicates | Verdict | Failures | Run at | |
|---|---|---|---|---|---|---|---|---|
balance_sample | Balance (as of 2026-05-15) | DRAWDOWN · OPTIONS-RISK · SECTOR · TREND | is_uptrend, defined_risk_only, is_clean, no_violations, discipline_breached | 19 / 20 True | ACCEPTED | 0 | 2026-06-04T17:41:49Z | |
Verdict accepted — no kernel rejections recorded.
| ||||||||
hawk_sample | Hawk (as of 2026-04-26) | OPTIONS-RISK · SECTOR · TREND | is_uptrend, has_violation, defined_risk_only, is_clean | 7 / 8 True | ACCEPTED | 0 | 2026-06-04T17:32:16Z | |
Verdict accepted — no kernel rejections recorded.
| ||||||||
single_ticker_sample | Single-Aapl (as of 2026-04-26) | TREND | is_uptrend | 4 / 4 True | ACCEPTED | 0 | 2026-06-04T17:27:21Z | |
Verdict accepted — no kernel rejections recorded.
| ||||||||
| Sorted by runFinishedAt, descending. | ||||||||
Balance — intro-rule shape across 4 judgment(s)
One node per kernel-required element, coloured by per-element verdict. Round nodes are derived structures/theorems; rectangles are predicate slots. The portfolio root is focused.
Balance
Trend.is_uptrend
smaCross
slope
rSquared
adx
OptionsRisk.is_clean
OptionsRisk.defined_risk_only
noNaked
debitOnly
Sector.no_violations
∀ s, cap_respected
Drawdown.discipline_breached
maxDD
tuw
recovers
| # | Predicate | Args | Value | Uncertainty | Evidence | Framework | Kernel locus | |
|---|---|---|---|---|---|---|---|---|
| DRAWDOWN | ||||||||
| 18 | max_drawdown_leq | Balance 0.15 | True | low | portfolio-equity-curve returned 252 rows spanning 2025-05-15 → 2026-05-15 from financial/parquet/ohlcv-equities/ | DRAWDOWN | | |
| ||||||||
| 19 | time_under_water_leq | Balance 90 | False | low | scripts/data_view.py portfolio-equity-curve --path examples/balance_sample/portfolio.json --start 2025-05-15 --end 2026-05-15 → 252 rows | DRAWDOWN | | |
| ||||||||
| 20 | recovery_within | Balance 60 | True | low | equity curve over 1Y window (2025-05-15 → 2026-05-15): 252 trading bars | DRAWDOWN | | |
| ||||||||
| OPTIONS-RISK | ||||||||
| 5 | no_naked_short_options | Balance | True | low | portfolio.option_legs[0..1] — 1 short leg scanned (QQQ 2026-06-12 685P side=short qty=1); collateralized by long QQQ 2026-06-12 700P qty=1 (strike 700 > 685, same expiry, equal qty) = debit put spread | OPTIONS-RISK | | |
| ||||||||
| 6 | debit_only | Balance | True | low | portfolio.option_legs[0,1] — QQQ 2026-06-12: long 700p (premium_paid 13.70) + short 685p (premium_received 9.16) → debit spread (long strike 700.0 > short strike 685.0); net debit = 13.70 - 9.16 = 4.54 | OPTIONS-RISK | | |
| ||||||||
| SECTOR | ||||||||
| 7 | cap_respected | Balance Accounting.GicsSector.InformationTechnology 0.30 | True | low | GICS authority financial/parquet/gics-symbols.parquet confirms AAPL → Information Technology, MSFT → Information Technology | SECTOR | | |
| ||||||||
| 8 | cap_respected | Balance Accounting.GicsSector.ConsumerDiscretionary 0.30 | True | low | Consumer Discretionary holdings in balance_sample/portfolio.json: AMZN only, weight_pct=3.87 | SECTOR | | |
| ||||||||
| 9 | cap_respected | Balance Accounting.GicsSector.Financials 0.30 | True | low | Portfolio examples/balance_sample/portfolio.json, nav_usd=100615.82, as_of=2026-05-15 | SECTOR | | |
| ||||||||
| 10 | cap_respected | Balance Accounting.GicsSector.HealthCare 0.30 | True | low | balance_sample portfolio has 7 equity holdings; sectors present = [Consumer Discretionary, Consumer Staples, Financials, Index, Information Technology] — NO Health Care holding exists | SECTOR | | |
| ||||||||
| 11 | cap_respected | Balance Accounting.GicsSector.ConsumerStaples 0.30 | True | low | Consumer Staples holdings in balance_sample/portfolio.json: COST (Costco Wholesale) weight_pct=7.25 | SECTOR | | |
| ||||||||
| 12 | cap_respected | Balance Accounting.GicsSector.Industrials 0.30 | True | low | Industrials matching holdings: [] (zero holdings carry gics_sector == 'Industrials') | SECTOR | | |
| ||||||||
| 13 | cap_respected | Balance Accounting.GicsSector.Energy 0.30 | True | low | Computed from examples/balance_sample/portfolio.json (NAV 100,615.82, as_of 2026-05-15). | SECTOR | | |
| ||||||||
| 14 | cap_respected | Balance Accounting.GicsSector.Utilities 0.30 | True | low | Portfolio examples/balance_sample/portfolio.json: 7 holdings, none with gics_sector == 'Utilities' | SECTOR | | |
| ||||||||
| 15 | cap_respected | Balance Accounting.GicsSector.Materials 0.30 | True | low | Materials contributing holdings: [] (none of the 7 holdings have gics_sector=='Materials') | SECTOR | | |
| ||||||||
| 16 | cap_respected | Balance Accounting.GicsSector.RealEstate 0.30 | True | low | Portfolio examples/balance_sample/portfolio.json has 7 equity holdings across sectors: ['Consumer Discretionary', 'Consumer Staples', 'Financials', 'Index', 'Information Technology']. | SECTOR | | |
| ||||||||
| 17 | cap_respected | Balance Accounting.GicsSector.CommunicationServices 0.30 | True | low | Matching holdings where gics_sector == 'Communication Services': [] (zero holdings) | SECTOR | | |
| ||||||||
| TREND | ||||||||
| 1 | sma_cross_up | Balance | True | low | computed @ as_of=2026-05-15 — 5 of 7 holdings show SMA(50) > SMA(200) at 2026-05-15; weighted 65.56% above | TREND | | |
| ||||||||
| 2 | slope_positive | Balance | True | medium | Window 2025-05-15 → 2026-05-15; 7 equity holdings, 252 bars each (sufficient, ≥50). | TREND | | |
| ||||||||
| 3 | r_squared_geq | Balance 0.5 | True | medium | Window 2025-05-15 → 2026-05-15, OLS of log(c) vs ordinal day index, per holding (252 bars each): | TREND | | |
| ||||||||
| 4 | adx_geq | Balance 20.0 | True | medium | balance_sample, as_of=2026-05-15, threshold=20.0; 7 equity holdings, all final-row adx14 non-null (no renormalization needed). | TREND | | |
| ||||||||
| DRAWDOWN · OPTIONS-RISK · SECTOR · TREND — 19 of 20 True. | ||||||||
Metrics
- frameworkCount
- 5
- frameworksPresent
- 5
- runsTotal
- 3
- runsAccepted
- 3
- runsRejected
- 0
- latestRunId
- balance_sample
- latestRunAt
- 2026-06-04T17:41:49Z
- latestVerdict
- ACCEPTED
- latestProofGraphUrl
- https://qresev.quantapix.com/proof-graph/run/balance_sample/