LocalFinServer is a robust local financial data warehouse and management system designed for quantitative researchers. It serves as the "Single Source of Truth" for your financial analysis, automating the collection, cleaning, and structured storage of market data into localized SQLite databases.
- 📦 Multi-Version Data Vault: Seamlessly manages sequential database versions (v12 through v20) to ensure data integrity and easy rollbacks.
- ⚡ Automated Injection: Features
manual_inject.pyandtest_manual_insert.pyfor precision-controlled data entry and validation. - 🔍 Market Connectivity: Integrated with
yfinanceviadebug_yf.pyfor real-time ticker verification and metadata fetching. - 🛠️ Schema Management: Dynamically handles financial statement structures, ensuring compatibility across different reporting standards.
- 🛡️ Data Validation: Rigorous sanity checks on financial metrics like Market Cap, PE Ratios, and Revenue before persistent storage.
- Core: Python 🐍
- Database: SQLite (Optimized for local low-latency querying)
- API Interface: Yahoo Finance API (via
yfinance) - Utilities: Logging and Debugging suites for high-reliability data pipelines.
The server follows a strict ETL (Extract, Transform, Load) process:
- Extract: Fetch raw metrics using automated debug scripts.
- Transform: Normalize financial data and calculate derived metrics (e.g., TTM adjustments).
- Load: Atomic commits into the local
.dbstorage to prevent data corruption.
The system ensures that the Historical PE Band and Intrinsic Value calculations in downstream apps have high-fidelity data to rely on.
Clone the repo and install required packages:
git clone [https://github.com/Seanyim/LocalFinServer.git](https://github.com/Seanyim/LocalFinServer.git)
cd LocalFinServer
pip install -r requirements.txt