Initial commit of integrated agent system

This commit is contained in:
cillin
2026-03-30 17:46:44 +08:00
commit 0fa413380c
337 changed files with 75268 additions and 0 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