- VirtualPortfolio for portfolio simulation
- BacktestEngine for strategy backtesting
- Worker for async background execution
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- GET /api/market/stocks/{ticker}
- GET /api/market/stocks/{ticker}/prices
- GET /api/market/search
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- POST /api/strategy/multi-factor
- POST /api/strategy/quality
- POST /api/strategy/value-momentum
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- BaseStrategy abstract class
- MultiFactorStrategy with weighted factors
- QualityStrategy with F-Score filtering
- ValueMomentumStrategy combining value and momentum
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Query parameter validation with regex patterns for date fields (YYYYMMDD format) and numeric constraints for limit parameter. Update JobLogResponse to use datetime types instead of strings for proper date serialization.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add time import and RATE_LIMIT_DELAY constant for rate limiting between HTTP requests
- Add 1-second delay after OTP request to respect API rate limits
- Validate OTP response is not empty before using it
- Add CSV column structure validation with required columns check
- Add data quality check to skip records where all metrics are None
- Improve error handling and data integrity
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add ValuationCollector class that fetches PER, PBR, and dividend yield
data from KRX for all listed stocks. Includes business day validation,
safe float conversion, and upsert logic for the valuations table.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Implement per-ticker commits to ensure atomic operations per data source
- Add rollback on exception to prevent partial data corruption
- Add _safe_float() and _safe_int() helper methods for defensive type conversion
- Validate column count after DataFrame reset to catch schema issues early
- Skip records with missing essential values (close price) with debug logging
- Remove final db.commit() since commits now happen per ticker in the loop
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add REQUEST_TIMEOUT and RATE_LIMIT_DELAY constants to StockCollector
- Add timeout parameter to all HTTP requests
- Wrap HTTP requests in try-except with proper error handling
- Add _validate_biz_day() method to both collectors
- Add validation for required fields (ticker, name) before insert
- Replace generic Exception with specific exception types in SectorCollector
- Add logging module and logger to both collectors
- Remove unused numpy import from StockCollector
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement StockCollector to fetch stock master data from KRX
(Korea Exchange) including market cap, EPS, BPS, and dividend info.
Implement SectorCollector to fetch WICS sector classification from
WISEindex. Both collectors use PostgreSQL upsert for efficient updates.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add session validation in __init__ to ensure database session is not None
- Implement transaction rollback handling in complete_job() for exception safety
- Implement transaction rollback handling in fail_job() for exception safety
- Improve exception handling in run() to gracefully handle fail_job failures while preserving original exception
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>