Skip to content

Continuous enhancement: liquidity stability quant diagnostic - #8

Draft
ryun6249 wants to merge 1 commit into
automation/continuous-enhancement-20260519-1501from
automation/continuous-enhancement-20260519-1602
Draft

Continuous enhancement: liquidity stability quant diagnostic#8
ryun6249 wants to merge 1 commit into
automation/continuous-enhancement-20260519-1501from
automation/continuous-enhancement-20260519-1602

Conversation

@ryun6249

Copy link
Copy Markdown
Owner

Continuous Enhancement Report

1. Current Status

  • Project purpose: Local FastAPI-served financial research workstation with deterministic Quantamental/Quant Lab/data quality surfaces and guarded AI interpretation.
  • Existing structure preserved: Yes. Static UI, FastAPI router/service boundaries, score-screen adapter, and AI guardrail pattern were reused.
  • Main issues found: Existing QAM/VAB/DRS diagnostics worked, but there was no liquidity participation stability diagnostic available in Quantamental data, AI evidence, or score-threshold screening.

2. Changes Made

Compatibility

  • Added additive liquidity_stability score key and liquidity_participation_stability_v1 algorithm without changing default composite scoring, strategy entry/exit, providers, secrets, or order/trading paths.

Data Consistency

  • Algorithm exposes required/available observations, component scores, input provenance, warnings, and used_in_composite_score=false.

UI/UX

  • Added compact LPS score/class rows to Quantamental overview and score summary.
  • Added Liquidity Stability / 유동성 안정성 score-screen option and bumped served bundle versions.

Visualization

  • Reused the existing compact diagnostic summary pattern rather than adding a crowded chart.

AI Briefing

  • Added LPS to quant_snapshot and deterministic fallback key_changes.liquidity_stability_algorithm so AI interprets deterministic output only.

Translation

  • Added Korean/English labels while preserving ticker/date/number/unit handling.

Performance

  • Reuses already-loaded price, return, volume, volatility, drawdown, and trend vectors. No new provider calls, background polling, or LLM calls.

Tests / Validation

  • Python syntax, JS syntax, ruff, UI contract, targeted pytest, full pytest, live API smoke, Browser desktop/mobile validation, Quantamental smoke, and cross-tab smoke passed.

3. Changed Files

File Change Reason
pipelines/quantamental/quant_engine.py Added LPS deterministic algorithm and component score Add auditable liquidity stability data
pipelines/quantamental/service.py Added health metadata and score-screen row/key adapter Make LPS screenable
core/schemas/quantamental.py Added liquidity_stability score key Preserve request validation
pipelines/quantamental/ai_service.py Added LPS to AI context and fallback report Keep AI grounded in deterministic data
app/web/index.html Added score option and bumped bundle versions Avoid stale assets and expose UI control
app/web/app.js Added score labels and allowed key Wire score-screen request state
app/web/modules/quantamental-ui.js Added LPS summary/overview rendering User-visible diagnostic context
scripts/check_ui_contract.py Added v15/LPS contract markers Prevent UI contract regression
scripts/quantamental_ui_smoke.py Smoke Liquidity Stability score screen Validate new UI path
scripts/ai_portfolio_ui_smoke.py Updated expected bundle versions Keep cross-tab smoke current
tests/*quantamental*, tests/test_ui_* Added engine/API/UI assertions Regression coverage
docs/CONTINUOUS_ENHANCEMENT_LOG.md Added analysis, plan, validation, checklist Automation continuity

4. Validation Results

Check Command / Tool Result Notes
Lint python -m ruff check ...changed Python surfaces... Passed Implementation, smoke scripts, tests
Build node --check app/web/modules/quantamental-ui.js; node --check app/web/app.js Passed Static JS syntax; no npm build surface exists
Test python -m pytest -q Passed 694 passed, 9 subtests passed
UI validation Browser at http://127.0.0.1:8410/ui/?range=1Y#quantamental Passed Desktop/mobile no overflow; LPS visible; no console errors
Data validation Live /analysis/AAPL and /screen/by-score?score_key=liquidity_stability Passed LPS score returned and screenable
AI briefing validation Deterministic AI report context/fallback Passed LPS appears in key_changes; no direct order language changed
Smoke scripts/quantamental_ui_smoke.py; scripts/ai_portfolio_ui_smoke.py Passed Cross-tab smoke passed after v15 contract update

5. Remaining Risks

  • LPS is intentionally diagnostic and not included in composite scoring; promotion to composite weighting should require explicit review.
  • Live Browser validation covered desktop and 390px mobile on the local app, not every possible viewport/browser.

6. Next Enhancement Suggestions

  1. Add a compact explanation tooltip for LPS component weights if the UI becomes too acronym-heavy.
  2. Add a server-side score-key registry so UI/API/smoke score keys share one source of truth.
  3. Consider a dedicated Quantamental algorithm comparison drawer only if more diagnostics are added.

7. Safety Notes

  • main/master was not modified directly.
  • Auto-merge was not enabled.
  • Secrets were not touched.
  • Trading/order execution logic was not modified.
  • Unsupported facts were not presented as verified.

@ryun6249 ryun6249 added the enhancement New feature or request label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant