Skip to content

Continuous enhancement: trend efficiency Quantamental diagnostic - #9

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

Continuous enhancement: trend efficiency Quantamental diagnostic#9
ryun6249 wants to merge 1 commit into
automation/continuous-enhancement-20260519-1602from
automation/continuous-enhancement-20260519-1703

Conversation

@ryun6249

Copy link
Copy Markdown
Owner

Continuous Enhancement Report

1. Current Status

  • Project purpose: local FastAPI financial research workstation with Quantamental, Quant Lab, macro, ML Forecast, AI Portfolio, and grounded AI briefing surfaces.
  • Existing structure preserved: yes; changes are additive inside existing Quantamental engine/service/UI/test adapters.
  • Main issues found: new diagnostics must stay non-composite, traceable, compact in UI, and carried into AI context without AI-created numbers.

2. Changes Made

Compatibility

  • Added trend_efficiency as an additive score key only; no strategy entry/exit, order/trading, provider, secret, or default composite behavior changed.

Data Consistency

  • Added trend_efficiency_stability_v1 with required/available observations, 63-day net return, absolute path return, efficiency ratio, component scores, provenance, and warnings.

UI/UX

  • Added TES score/class rows and a Score Threshold Screener option while preserving All default and Core/Diagnostics/Operations filters.

Visualization

  • Reused the compact existing algorithm summary pattern; no crowded new chart was added.

AI Briefing

  • Added TES to quant_snapshot and deterministic AI key_changes.trend_efficiency_algorithm; AI remains interpretation-only.

Translation

  • Added Korean/English labels (於旍劯 須湪 / Trend Efficiency) without changing tickers, numbers, dates, or units.

Performance

  • Reuses already-loaded price/return/volatility/drawdown/risk/liquidity vectors; no provider calls, background polling, or LLM calls added.

Tests / Validation

  • Syntax, ruff, UI contract, targeted tests, full pytest, live API, Browser desktop/mobile, Quantamental smoke, and cross-dashboard smoke passed.

3. Changed Files

File Change Reason
pipelines/quantamental/quant_engine.py Added TES algorithm and component score Add auditable QUANT diagnostic
pipelines/quantamental/service.py Added health metadata and trend_efficiency score-screen mapping Expose TES through API screening
core/schemas/quantamental.py Added score key literal Keep request contract explicit
pipelines/quantamental/ai_service.py Added TES to AI context/key changes Prevent unsupported AI-created numbers
app/web/modules/quantamental-ui.js Added TES labels, summary, overview, score label Make diagnostic visible and compact
app/web/app.js / app/web/index.html Added score option and bundle bumps Keep static UI/smoke cache aligned
scripts/*smoke.py, scripts/check_ui_contract.py Updated contracts/smoke selectors Verify new bundle and TES path
tests/*quantamental*, tests/test_ui_* Added engine/API/UI assertions Lock additive contract
docs/CONTINUOUS_ENHANCEMENT_LOG.md Recorded analysis, plan, validation Automation continuity

4. Validation Results

Check Command / Tool Result Notes
Lint python -m ruff check ...changed surfaces... Passed No ruff issues
Build node --check app/web/modules/quantamental-ui.js; node --check app/web/app.js; python -m py_compile ... Passed No npm/pnpm manifest exists
Test python -m pytest tests/test_quantamental_engines.py tests/test_quantamental_api.py tests/test_ui_modules.py tests/test_ui_routing_contract.py -q Passed 83 passed, 4 subtests
Test python -m pytest -q Passed 695 passed, 9 subtests
UI validation Browser desktop/mobile at 127.0.0.1:8412 Passed All view, quality badge, TES visible, no document overflow
Data validation Live /analysis/AAPL and /screen/by-score?score_key=trend_efficiency Passed AAPL TES 72.47, score-screen returned rows
AI briefing validation Deterministic AI report via live /analysis/AAPL?include_ai=true&use_llm=false Passed TES key change present; used_in_composite_score=false
UI smoke python scripts/quantamental_ui_smoke.py --base-url http://127.0.0.1:8412 ... Passed Required ticker smoke and TES score-screen passed
Cross-dashboard smoke python scripts/ai_portfolio_ui_smoke.py --base-url http://127.0.0.1:8412 --timeout-s 240 ... Passed No console errors

5. Remaining Risks

  • TES is diagnostic only; do not add it to composite weighting without explicit approval.
  • More score-screen keys are accumulating; a score-key registry would reduce future UI/API/smoke drift.

6. Next Enhancement Suggestions

  1. Add a small score-key registry shared by service/UI tests.
  2. Add compact algorithm tooltips explaining formula inputs.
  3. Add a deterministic compare view for QAM/VAB/DRS/LPS/TES across a watchlist.

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