Skip to content

Continuous enhancement: Quant algorithms, UI evidence, and validation - #240

Open
ryun6249 wants to merge 26 commits into
AI4Finance-Foundation:masterfrom
ryun6249:automation/continuous-enhancement-20260519-1330
Open

Continuous enhancement: Quant algorithms, UI evidence, and validation#240
ryun6249 wants to merge 26 commits into
AI4Finance-Foundation:masterfrom
ryun6249:automation/continuous-enhancement-20260519-1330

Conversation

@ryun6249

Copy link
Copy Markdown

Continuous Enhancement Report

1. Current Status

  • Project purpose: local financial research workstation with FastAPI, static UI, Quant Lab, Quantamental analysis, and guarded local AI interpretation.
  • Existing structure preserved: yes; existing routes, UI surfaces, All/default quality/range controls, and deterministic signal flow were preserved.
  • Main issues found: Quant Lab needed a risk-aware momentum factor, and Quantamental needed an auditable quant algorithm exposed to data/UI/AI without changing composite signal behavior.

2. Changes Made

Compatibility

  • Kept trading/order execution and existing strategy entry/exit policies unchanged.
  • Added new deterministic quant data while preserving existing API response fields.

Data Consistency

  • Added Quant Lab risk_adjusted_momentum_63d and Quantamental quality_adjusted_momentum_v1.
  • Marked Quantamental QAM as used_in_composite_score=false to avoid silently changing final signals.

UI/UX

  • Exposed risk-adjusted momentum in Quant Lab selector/table surfaces.
  • Exposed QAM score/classification in Quantamental score and overview surfaces with a note that it is not part of the composite score.

Visualization

  • Existing chart surfaces remain intact; browser checks confirmed no desktop/mobile horizontal overflow.

AI Briefing

  • Quantamental AI context and fallback key_changes now include quality_adjusted_momentum_v1 for interpretation only.
  • Existing Gemma/Qwen runtime-checked model behavior remains unchanged.

Translation

  • Added Korean/English UI copy for QAM and verified UTF-8/mojibake guards.

Performance

  • No new polling or LLM background calls; algorithms reuse already loaded price vectors.

Tests / Validation

  • Full regression and targeted UI/API/browser checks passed; one parallel smoke timeout was retried standalone and passed.

3. Changed Files

File Change Reason
pipelines/quantamental/quant_engine.py Added QAM metrics Auditable deterministic quant algorithm
pipelines/quantamental/ai_service.py Added QAM AI context/key_changes Prevent unsupported AI inference
app/web/modules/quantamental-ui.js Rendered QAM score/class Improve quant transparency
pipelines/backtest/engine.py / pipelines/factors/* / pipelines/signals/rule_based.py Added risk-adjusted momentum factor path New Quant Lab algorithm
app/web/app.js / app/web/index.html UI wiring and bundle bump Surface new controls/data
tests/* / scripts/* Contract, smoke, and regression coverage Guard behavior and UI markers
docs/CONTINUOUS_ENHANCEMENT_LOG.md Updated run log and validation Document actual status

4. Validation Results

Check Command / Tool Result Notes
Syntax python -m py_compile ... and node --check ... Passed Python/JS touched surfaces
UI contract python scripts/check_ui_contract.py Passed Includes Quantamental module markers
Targeted tests python -m pytest tests/test_quantamental_engines.py tests/test_quantamental_api.py tests/test_ui_modules.py tests/test_ui_routing_contract.py tests/test_quantamental_ui_ai_panel.py -q Passed Quantamental and UI contracts
Full test python -m pytest -q Passed 692 passed, 9 subtests passed
Quantamental smoke python scripts/quantamental_ui_smoke.py --base-url http://127.0.0.1:8406 ... Passed Required tickers, invalid ticker, Top 5, Q&A, audit
AI Portfolio smoke python scripts/ai_portfolio_ui_smoke.py --base-url http://127.0.0.1:8406 --timeout-s 180 ... Passed Retry passed; first parallel run timed out on Macro search
QAM API smoke GET /api/v1/quantamental/analysis/AAPL?... Passed QAM in quant metrics and AI key_changes
QAM browser DOM Playwright on /ui/?range=1Y#quantamental Passed QAM visible; desktop/mobile overflow false

5. Remaining Risks

  • QAM is intentionally not included in composite scoring yet; future work can decide whether to promote it into score weights.
  • Local PR includes accumulated automation changes from the current branch, not only the final doc commit.

6. Next Enhancement Suggestions

  1. Add a user-facing explanation drawer for QAM component scores.
  2. Add a score-screen filter for QAM once enough live data coverage is confirmed.
  3. Add visual markers for QAM trend/volatility components in the Quantamental overview.

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.

Your Name added 26 commits May 15, 2026 01:04
Add browser-based validation gate, decision-grade research pipeline, web UI, tests, and docs.

Archive legacy FinGPT and finogrid sources under legacy/archive while keeping runtime artifacts ignored.
Adds the FinGPT-native Quant Lab router split, artifact-backed workflows, replay/freshness controls, strategy governance, export verification/history, offline package verification, and guarded cross-run cleanup documentation and tests.

Verified before commit: python -m pytest tests -q (367 passed, 3 subtests passed), node --check app\\web\\app.js, python scripts\\check_ui_contract.py, python -m core.preflight, scripts\\verify_production_path.ps1, and quant_lab_ui_smoke.py.
@BruceYanghy

Copy link
Copy Markdown
Member

Thanks a lot. @ryun6249 Would you mind creating a separate branch and pushing your changes there instead of directly to the master branch? That will make it easier for us to review and test the updates safely before merging.

Bruce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants