feat: implement daily trading mode with batch decisions (issue #57)
Some checks failed
CI / test (pull_request) Has been cancelled
Some checks failed
CI / test (pull_request) Has been cancelled
Add API-efficient daily trading mode for Gemini Free tier compatibility: ## Features - **Batch Decisions**: GeminiClient.decide_batch() analyzes multiple stocks in a single API call using compressed JSON format - **Daily Trading Mode**: run_daily_session() executes N sessions per day at configurable intervals (default: 4 sessions, 6 hours apart) - **Mode Selection**: TRADE_MODE env var switches between daily (batch) and realtime (per-stock) modes - **Requirements Log**: docs/requirements-log.md tracks user feedback chronologically for project evolution ## Configuration - TRADE_MODE: "daily" (default) | "realtime" - DAILY_SESSIONS: 1-10 (default: 4) - SESSION_INTERVAL_HOURS: 1-24 (default: 6) ## API Efficiency - 2 markets × 4 sessions = 8 API calls/day (within Free tier 20 calls) - 3 markets × 4 sessions = 12 API calls/day (within Free tier 20 calls) ## Testing - 9 new batch decision tests (all passing) - All existing tests maintained (298 passed) ## Documentation - docs/architecture.md: Trading Modes section with daily vs realtime - CLAUDE.md: Requirements Management section - docs/requirements-log.md: Initial entries for API efficiency needs Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
10
CLAUDE.md
10
CLAUDE.md
@@ -53,6 +53,7 @@ Get real-time alerts for trades, circuit breakers, and system events via Telegra
|
||||
- **[Context Tree](docs/context-tree.md)** — L1-L7 hierarchical memory system
|
||||
- **[Testing](docs/testing.md)** — Test structure, coverage requirements, writing tests
|
||||
- **[Agent Policies](docs/agents.md)** — Prime directives, constraints, prohibited actions
|
||||
- **[Requirements Log](docs/requirements-log.md)** — User requirements and feedback tracking
|
||||
|
||||
## Core Principles
|
||||
|
||||
@@ -61,6 +62,15 @@ Get real-time alerts for trades, circuit breakers, and system events via Telegra
|
||||
3. **Issue-Driven Development** — All work goes through Gitea issues → feature branches → PRs
|
||||
4. **Agent Specialization** — Use dedicated agents for design, coding, testing, docs, review
|
||||
|
||||
## Requirements Management
|
||||
|
||||
User requirements and feedback are tracked in [docs/requirements-log.md](docs/requirements-log.md):
|
||||
|
||||
- New requirements are added chronologically with dates
|
||||
- Code changes should reference related requirements
|
||||
- Helps maintain project evolution aligned with user needs
|
||||
- Preserves context across conversations and development cycles
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user