Override Logic Mismatches: Fixed critical Enum-to-String type mismatch in apply_trend_override that was silencing the "Safety Valve" logic. Data Pipeline Failures: Injected robust error handling and type checking in market_analyst.py to identify why RegimeDetector receives invalid data (causing "UNKNOWN" regimes). Gemini 404 Errors: Removed invalid/deprecated model names causing 404s |
||
|---|---|---|
| .. | ||
| README.md | ||
| bench_yfinance.py | ||
| demo_regime_detection.py | ||
| ignition_tests.py | ||
| test_analyst_node.py | ||
| test_anonymizer.py | ||
| test_fatal_flaw_fixes.py | ||
| test_finance_args.py | ||
| test_global_news.py | ||
| test_google_api.py | ||
| test_integrated_workflow.py | ||
| test_macro_regime.py | ||
| test_market_node.py | ||
| test_override.py | ||
| test_pltr_regime.py | ||
| test_rag_isolator.py | ||
| test_regime_detection.py | ||
| test_regime_detector.py | ||
| test_regime_propagation.py | ||
| test_semantic_fact_checker.py | ||
| torture_test_2022.py | ||
| verify_alpaca.py | ||
| verify_google_key.py | ||
| verify_local_embeddings.py | ||
| verify_ollama_embeddings.py | ||
| verify_override_fix.py | ||
| verify_pltr_pipeline.py | ||
| verify_regime_flow.py | ||
| verify_regime_integration.py | ||
| verify_tei_native.py | ||
README.md
Trading Agents Verification Suite
This folder contains unit tests and verification scripts to validate the functionality of the Trading Agents system.
Available Tests
Core Logic Tests
-
test_regime_detection.py- Purpose: Validates mathematical components (ADX, Volatility, Hurst) of the
RegimeDetector. - Usage:
python tests/test_regime_detection.py
- Purpose: Validates mathematical components (ADX, Volatility, Hurst) of the
-
test_market_node.py- Purpose: End-to-end verification of
market_analyst_node. Checks data fetching logic and regime integration. - Usage:
python tests/test_market_node.py
- Purpose: End-to-end verification of
-
test_override.py- Purpose: Unit tests for "Don't Fight the Tape" safety logic. Verifies protection of growth leaders.
- Usage:
python tests/test_override.py
Integration & API Tests
-
test_global_news.py- Purpose: Verifies news fetching capabilities.
- Usage:
python tests/test_global_news.py
-
test_google_api.py&verify_google_key.py- Purpose: Validates Google Gemini API connectivity and key validity.
- Usage:
python tests/test_google_api.py
-
verify_alpaca.py- Purpose: Checks Alpaca trading API connection.
- Usage:
python tests/verify_alpaca.py
Infrastructure & Performance
-
verify_local_embeddings.py&verify_ollama_embeddings.py- Purpose: Validates local embedding models (Ollama/TEI) for RAG.
- Usage:
python tests/verify_local_embeddings.py
-
verify_tei_native.py- Purpose: Tests Text Embeddings Inference (TEI) native endpoint.
- Usage:
python tests/verify_tei_native.py
-
bench_yfinance.py- Purpose: Benchmarks yfinance data fetch performance (latency/throughput).
- Usage:
python tests/bench_yfinance.py
-
verify_regime_integration.py- Purpose: Integration test for regime detection within the broader graph context.
- Usage:
python tests/verify_regime_integration.py
-
test_finance_args.py- Purpose: Verifies robustness of financial tools against extraneous LLM arguments and type mismatches.
- Usage:
python tests/test_finance_args.py
How to Run
Ensure your virtual environment is activated:
source .venv/bin/activate
export PYTHONPATH=$PYTHONPATH:.
python tests/test_market_node.py