Add configurable data providers and localize frontend UI

This commit is contained in:
2026-03-15 00:55:12 +08:00
parent 12de93aa30
commit d233a3f55d
38 changed files with 1936 additions and 1038 deletions

View File

@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
"""Tests for structured technical analyzer."""
import pandas as pd
from backend.tools.technical_signals import StockTechnicalAnalyzer
def test_technical_analyzer_detects_bullish_trend():
df = pd.DataFrame(
{
"time": pd.date_range("2024-01-01", periods=40, freq="D"),
"close": [100 + i for i in range(40)],
},
)
analyzer = StockTechnicalAnalyzer()
result = analyzer.analyze("AAPL", df)
assert result.current_price == 139.0
assert result.trend in {"BULLISH", "STRONG BULLISH"}
assert result.momentum_20d_pct > 0