$ show terancejiang/Turtle_investment_framework
This is an investment analysis framework implementing the Turtle Investment Strategy. It provides a modular, multi-agent system for stock analysis that combines quantitative financial analysis, qualitative business assessment, and valuation modeling. The framework collects data from Tushare API (with yfinance fallback), processes financial statements, analyzes annual report PDFs, and generates investment reports. Key features include a two-tier stock screening system, deterministic pre-computation of metrics to prevent LLM calculation errors, and a structured workflow with validation checkpoints. The architecture separates concerns into data collection, processing, analysis, and reporting layers with clear interfaces between components.
The LLM identified 3 files worth highlighting for reuse:
Provides a reusable caching layer with TTL support using Parquet format for efficient data storage. The ScreenerCache implementation demonstrates smart cache invalidation strategies and separation of concerns, making it easy to extract and use in other data-intensive applications. It handles different data types with appropriate TTL values and provides a clean interface for cache operations.
Implements a deterministic pre-computation pipeline for financial metrics to prevent LLM hallucination in calculations. This component solves a critical problem in LLM-assisted financial analysis by computing key values (like penetration return rates) upfront using reliable algorithms, then making them available to LLMs for interpretation rather than calculation. The pattern is broadly applicable to any system where LLMs need to reason about precise numerical values.
Provides a well-structured approach to API client design using mixin patterns to separate concerns. The TushareClient is built from focused mixins (InfrastructureMixin, YFinanceMixin, FinancialsMixin, etc.) that each handle specific responsibilities. This modular design makes it easy to extend, test, and maintain, and the pattern can be adapted to other API clients beyond Tushare.