summaryrefslogtreecommitdiff
path: root/shared
AgeCommit message (Collapse)Author
11 hoursfeat: add missing DB indexes for signals, orders, trades, snapshotsTheSiahxyz
11 hoursfeat: add config validation, SecretStr for secrets, API security fieldsTheSiahxyz
11 hoursfeat: add retry and resilience to Redis broker with keepaliveTheSiahxyz
11 hoursfeat: add DB connection pooling with configurable pool_size, overflow, recycleTheSiahxyz
11 hoursfix: address code review issues in resilience moduleTheSiahxyz
12 hoursfeat: implement resilience module (retry, circuit breaker, timeout)TheSiahxyz
Add retry_async decorator with exponential backoff + jitter, CircuitBreaker class with closed/open/half_open states, and async_timeout context manager. Pin all shared deps with upper bounds.
12 hoursrefactor: remove dead code (SentimentData, CircuitBreaker, TradeRow, unused ↵TheSiahxyz
configs) - Remove SentimentData class and tests (superseded by SentimentAggregator) - Remove CircuitBreaker, CircuitState, retry_with_backoff and tests (never used) - Remove TradeRow ORM model and tests (no DB methods reference it) - Remove unused config fields: circuit_breaker_*, selector_candidates_time, selector_filter_time
13 hoursstyle: fix lint and formatting issues across news collector and sharedTheSiahxyz
13 hoursfeat: add Telegram notification for stock selectionsTheSiahxyz
13 hoursfeat: implement SentimentAggregator with freshness decay and composite scoringTheSiahxyz
13 hoursfeat: add news collector and stock selector config settingsTheSiahxyz
13 hoursfeat: add NewsEvent, DB methods for news/sentiment/selectionsTheSiahxyz
- Add NEWS to EventType enum and NewsEvent class to events.py - Add insert_news_item, get_recent_news, upsert_symbol_score, get_top_symbol_scores, upsert_market_sentiment, get_latest_market_sentiment, insert_stock_selection, get_stock_selections methods to Database class in db.py - Add test_news_events.py and test_db_news.py with full coverage
13 hoursfeat: add Alembic migration for news and sentiment tablesTheSiahxyz
13 hoursfeat: add SQLAlchemy ORM models for news, scores, selectionsTheSiahxyz
13 hoursfeat: add NewsItem, sentiment scoring, and stock selection modelsTheSiahxyz
Add NewsCategory enum and NewsItem model to shared/models.py. Create sentiment_models.py with SymbolScore, MarketSentiment, SelectedStock, Candidate.
16 hoursrefactor: purge all remaining crypto/Binance referencesTheSiahxyz
- Replace BTCUSDT/SOLUSDT/ETHUSDT with AAPL/MSFT in all test files - Update backtester default symbol to AAPL - Update strategy-engine default symbols to US stocks - Update project description and CLI help text - Remove empty superpowers docs directory - Zero crypto references remaining in codebase
17 hoursrefactor: remove all crypto/Binance code, update to US stock symbolsTheSiahxyz
17 hoursfeat: add Claude-powered daily stock screener for MOC strategyTheSiahxyz
17 hoursrefactor: migrate to US stocks with Alpaca APITheSiahxyz
- Replace Binance/ccxt with Alpaca REST client (paper + live) - Add MOC (Market on Close) strategy for overnight gap trading - Wire sentiment into strategy engine main loop - Add EMA + bullish candle entry filters to Asian RSI - Remove crypto-specific exchange factory - Update config: Alpaca keys replace Binance keys - 399 tests passing, lint clean
17 hoursrefactor: replace Binance/ccxt with Alpaca API client for US stocksTheSiahxyz
17 hoursfeat: add market sentiment filters (Fear & Greed, CryptoPanic, CryptoQuant)TheSiahxyz
- SentimentProvider: fetches Fear & Greed Index (free, no key), CryptoPanic news sentiment (free key), CryptoQuant exchange netflow (free key) - SentimentData: aggregated should_buy/should_block logic - Fear < 30 = buy opportunity, Greed > 80 = block buying - Negative news < -0.5 = block buying - Exchange outflow = bullish, inflow = bearish - Integrated into Asian Session RSI strategy as entry filter - All providers optional — disabled when API key missing - 14 sentiment tests + 386 total tests passing
18 hoursfeat(risk): add portfolio exposure, correlation risk, and VaR checksTheSiahxyz
32 hoursfeat(strategy): Phase 2 complete — strategy infrastructure upgradeTheSiahxyz
- Technical indicators library (ATR, ADX, RSI, MACD, Bollinger, Stochastic, OBV) - Signal model: conviction score, stop_loss, take_profit fields - BaseStrategy: ADX regime filter, volume confirmation, ATR-based stops - All 8 strategies upgraded with filters, conviction scoring, ATR stops - Combined strategy uses conviction-weighted scoring - 334 tests passing
32 hoursfeat(shared): add conviction, stop_loss, take_profit to Signal modelTheSiahxyz
33 hoursfix: resolve final 3 issues for production readinessTheSiahxyz
- Fix API strategies endpoint path resolution (use STRATEGIES_DIR env var) - Add DATABASE_URL env var override in alembic env.py - Move risk config fields to shared Settings base class - Remove duplicate fields from ExecutorConfig
33 hoursfix: lint cleanup after medium priority tasksTheSiahxyz
33 hoursfeat(broker): add Redis consumer groups for reliable message processingTheSiahxyz
33 hoursfix: snapshot delay, env fields, alembic creds, API healthcheck and error ↵TheSiahxyz
handling
34 hoursfix: lint cleanup for API, combined strategy, and formattingTheSiahxyz
34 hoursfeat: add multi-exchange support via ccxt factoryTheSiahxyz
34 hoursfeat(security): add bearer token auth for health/metrics endpointsTheSiahxyz
34 hoursfeat(portfolio): add periodic portfolio snapshots and daily Telegram summaryTheSiahxyz
34 hoursfeat: medium priority improvementsTheSiahxyz
- Add 30 edge case tests (zero volume, empty data, extreme values, strategy reset, notifier failures) - Fix VWAP division by zero on zero-price candles - Add DB transaction rollback on errors + transaction() context manager - Add parameter validation to all 7 strategies with 41 validation tests - Fix lint issues across test files
34 hoursfix(shared): add transaction rollback on DB errorsTheSiahxyz
34 hoursfix: resolve critical deployment blockersTheSiahxyz
- Add Alembic initial migration (6 tables: candles, signals, orders, trades, positions, portfolio_snapshots) - Expose health ports (8080-8083) in docker-compose with healthchecks - Add numpy dependency to strategy-engine pyproject.toml
35 hoursfix: resolve lint issues and final integration fixesTheSiahxyz
- Fix ambiguous variable name in binance_rest.py - Remove unused volumes variable in volume_profile_strategy.py - Fix import ordering in backtester main.py and test_metrics.py - Auto-format all files with ruff
35 hoursfeat(services): integrate structlog, healthcheck, metrics, and TelegramTheSiahxyz
Replace logging.basicConfig/getLogger with structlog setup_logging in all four service entry points. Add HealthCheckServer, ServiceMetrics, and TelegramNotifier initialization to each service. Update OrderExecutor to accept a notifier parameter and send order notifications. Add RedisBroker.ping() for health checks. Update executor tests with notifier=AsyncMock().
35 hoursfeat(shared): add health checks and Prometheus metricsTheSiahxyz
35 hoursfeat(shared): add Telegram notification serviceTheSiahxyz
35 hoursfeat(shared): add retry with backoff and circuit breakerTheSiahxyz
35 hoursfeat(shared): add structlog-based structured loggingTheSiahxyz
35 hoursfeat: rewrite database layer from asyncpg to SQLAlchemy 2.0 async ORMTheSiahxyz
Replace raw asyncpg SQL with SQLAlchemy async engine, async_sessionmaker, and ORM operations. Uses session.merge for candle upserts, session.add for signal/order inserts, update() for status changes, select() for queries. Auto-converts postgresql:// URLs to postgresql+asyncpg://. Keeps init_tables() as backward-compatible alias for connect().
35 hoursfeat: add SQLAlchemy ORM models and Alembic migration setupTheSiahxyz
Add SA 2.0 declarative models (CandleRow, SignalRow, OrderRow, TradeRow, PositionRow, PortfolioSnapshotRow) mirroring existing asyncpg tables. Set up Alembic with async PostgreSQL support and add migrate/migrate-down/ migrate-new Makefile targets. Update shared dependencies with sqlalchemy, alembic, structlog, prometheus-client, pyyaml, aiohttp, and rich.
35 hoursfeat: initial trading platform implementationTheSiahxyz
Binance spot crypto trading platform with microservices architecture: - shared: Pydantic models, Redis Streams broker, asyncpg DB layer - data-collector: Binance WebSocket/REST market data collection - strategy-engine: Plugin-based strategy execution (RSI, Grid) - order-executor: Order execution with risk management - portfolio-manager: Position tracking and PnL calculation - backtester: Historical strategy testing with simulator - cli: Click-based CLI for all operations - Docker Compose orchestration with Redis and PostgreSQL - 24 test files covering all modules