Feature/ominari updates#14
Open
ericscheier wants to merge 168 commits into
Open
Conversation
Beige book
- Persistent bankroll configuration that tracks real money across sessions - Bankroll config saves state to config/bankroll.json with full history - Slack integration for backtest results, trades, and daily summaries - Updated dashboard to show live bankroll from config - Auto-deploy daemon for localhost deployment on git push - GitHub Actions workflow for automated deployment - Paper trading now uses real bankroll amounts with proper tracking To set up Slack: ./scripts/setup_slack.sh To start auto-deploy: ./scripts/run_as_daemon.sh 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Created new paper_trading_live.py that actually works with the database schema - Fixed all model field mismatches (Bet, BettingSession, Odd) - Paper trader now finds opportunities, calculates Kelly bets, places trades - Dashboard /api/trades endpoint shows paper trades - Bankroll config properly tracks all trades and updates bankroll - Added debug scripts to verify trading logic - Fixed automated_trading_system.py import errors The system now: - Finds betting opportunities based on edge calculations - Places paper bets with proper Kelly sizing - Tracks all trades in the database - Updates bankroll in real-time - Shows trades in dashboard Note: Currently using placeholder odds data (all markets have -8.3% edge) Need real odds data for profitable opportunities 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Replaced Slack with Discord notifications (more accessible) - Fixed database port configuration (5999 everywhere) - Created real_odds_fetcher.py to get actual market odds from Overtime API - Created integrated_trading_system.py combining real odds + paper trading - Set realistic edge thresholds (2% minimum) - Updated dashboard to use integrated system The system now: - Fetches real odds from Overtime markets API - Only places bets on positive edge opportunities - Sends Discord notifications for trades and daily summaries - Uses realistic thresholds based on actual market conditions To set up Discord notifications: ./scripts/setup_discord.sh 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…ions - Created blockchain_liquidity_fetcher.py to get real liquidity data from smart contracts - Built liquidity_aware_trading.py that considers actual blockchain liquidity when placing trades - Fixed Discord webhook validation to accept both discord.com and discordapp.com URLs - Enhanced Discord notifications to show liquidity information in trade alerts - Added market condition alerts (low liquidity, high opportunities) - Fixed missing sys import in web dashboard - Fixed alembic migration duplicate column error with proper checks - Updated dashboard to use liquidity-aware trading system The system now: - Fetches actual liquidity depth from Overtime V2 smart contracts - Calculates optimal bet sizes considering slippage constraints - Only places bets when sufficient liquidity exists - Sends Discord alerts for liquidity conditions and market opportunities - Prevents over-leveraging in low liquidity markets Trading parameters: - Max 1% slippage allowed - Min 00 liquidity required - Max 10% of available liquidity per bet - Conservative Kelly fraction (0.15) for liquidity constraints 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Created wallet configuration system with encrypted key storage - Built real trading engine with Web3 integration for trade execution - Implemented integrated trading system that switches between paper/real modes - Added wallet setup script for easy configuration - Created safety features: testnet mode, bet limits, emergency stops - Added trading status endpoint to dashboard - Fixed alembic migration duplicate column issue - Updated README with comprehensive real trading documentation The system now supports: - Secure wallet management with Fernet encryption - Multi-network support (Arbitrum, Optimism, Base) - Collateral balance checking and approval - Gas price optimization - Slippage protection - Safety limits and emergency stop functionality - Seamless switching between paper and real trading - Discord notifications for real trades Safety features: - Testnet mode for safe practice - Max bet size limits ($100 mainnet, $10 testnet) - Daily loss limits ($500 mainnet, $50 testnet) - Minimum edge requirements - Emergency stop functionality - Liquidity-aware bet sizing To get started with real trading: 1. Run ./scripts/setup_discord.sh (for notifications) 2. Run ./scripts/setup_wallet.sh (to configure wallet) 3. Fund wallet with USDC/sUSD 4. Run python main.py 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…o heartbeat Major features added: - Paper trading system with Kelly criterion bet sizing - Discord notifications for trades and portfolio updates - Hourly portfolio heartbeat with comprehensive reporting - Edge calculation fixed to detect arbitrage opportunities - Database migration for longer source_id fields Key improvements: - Fixed environment variable loading in subprocesses (load_env.py) - Corrected fair probability calculation for Kelly betting - Added robust error handling and auto-recovery for heartbeat - Integrated real-time blockchain data (gas prices, ETH price) - Smart duplicate bet prevention Trading system features: - Detects positive edge opportunities (arbitrage when total prob < 1.0) - Sizes bets using conservative Kelly criterion (25% fraction) - Prevents over-betting with position limits - Tracks all bets and portfolio performance Portfolio heartbeat includes: - Current P&L and ROI - Market coverage statistics - Edge opportunity rankings - Real blockchain data from public APIs - System status and bet coverage Test scripts included for: - Paper trading demonstration - Discord notification testing - Portfolio heartbeat testing - Edge calculation verification 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Robust heartbeat system with error recovery and logging - Enhanced heartbeat includes backtesting insights every 4 hours - Historical edge performance analysis - Kelly fraction usage analysis - Strategy consistency metrics - Risk management recommendations - Automatic fallback to simple heartbeat on errors - Logs written to /tmp/portfolio_heartbeat.log The enhanced heartbeat provides: - Edge performance breakdown by ranges - Average Kelly fraction analysis - Strategy recommendations - Expected long-term ROI projections 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Clear documentation on system architecture - Explains automatic heartbeat integration - Step-by-step deployment instructions - Monitoring and troubleshooting guide - Confirms heartbeat runs automatically with main.py - Details dashboard features and endpoints The system is fully integrated: - Running main.py starts everything - Dashboard on port 8888 - Performance monitor on port 8889 - Automatic hourly heartbeat - No manual heartbeat startup needed 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…ronization Core Components: • fixed_edge_calculation.py - Structurally correct vig arbitrage using intrinsic probability models • intrinsic_probability_models.py - Historical base rates with league adjustments (46% home, 27% away, 27% draw) • execute_trading_solution.py - Actual trade execution with 15-minute cycles and Kelly position sizing • carver_heartbeat_with_backtest.py - Portfolio monitoring with session synchronization and market chunk analysis • real_market_resolution_service.py - ESPN/TheSportsDB integration for real sports results (replaces random outcomes) System Integration: • Paper trading session synchronization between executor and heartbeat • Position sizing with Thorp safety margins (2% max position, 15% total exposure, 1/4 Kelly fraction) • Real market resolution with 70% confidence matching for accurate P&L tracking • Comprehensive backtesting with performance metrics and Discord reporting Technical Improvements: • Session reload mechanism to sync heartbeat with actual trades • Market chunking based on natural 30-minute timing breaks • Edge calculation using structural analysis instead of normalized market odds • Fixed Discord newline formatting issues in deployment notifications 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Documentation Added: • SYSTEM_DEPLOYMENT.md - Complete deployment guide with setup instructions • DEPLOYMENT_STATUS.md - Current system status and monitoring dashboard Key Information: • Production deployment instructions for all system components • Troubleshooting guide for common issues • Performance monitoring and health check commands • Current active session tracking (20251118_210539 with 4 positions) • Session synchronization fix verification plan System Status: • Trading executor: ✅ Running (15-min cycles, +8.61% avg edge) • Portfolio heartbeat: ✅ Running (hourly Discord reports) • Data freshness: ✅ Running (8 immediate, 86 upcoming markets) • Session sync: ✅ Fixed (verification pending next heartbeat) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…k analysis - Update web dashboard to use unified portfolio calculator for consistent $16,669.28 portfolio value - Add market chunk analysis display matching heartbeat system functionality - Add open positions tracking with real-time stake calculations - Create conservative edge calculator for realistic edge calculations - Standardize trading cost calculations across all components - Dashboard now displays same values as Discord heartbeat notifications 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Replace technical/development terms with business terminology - Update "Real Odds" to "Live Odds" for professional language - Change "Bankroll" to "Portfolio Value" for investment context - Rename "Market Chunk Analysis" to "Market Analysis" - Update "Recent Paper Trades" to "Recent Trades" - Replace "Carver" references with generic "Trading Platform" - Improve log messages and error handling language - Standardize session/chunk terminology to be more user-friendly 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…data as heartbeat - Updated get_active_positions() to use PaperTradingSessionManager instead of PostgreSQL - Fixed position tracking discrepancy between dashboard and heartbeat systems - Both systems now use unified JSON session data source for consistency 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Created create_designated_current_session.py for consistent session selection - Added check_sessions.py and find_session.py for session diagnostics - Fixed session selection regression where systems would pick different sessions after restart - Establishes single source of truth for production session data - Marks old sessions as 'ended' to prevent conflicts during system restarts This resolves the regression where heartbeat showed inconsistent session data (Session #10 vs Heartbeat #1) by ensuring both dashboard and heartbeat use the same designated current session. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed timezone datetime error in conservative_edge_calculator.py preventing trade execution - Fixed mark-to-market position reading bug (use total_stake instead of stake field) - Fixed database query error (use Market.home_team instead of Market.name) - Fixed odds field reading (use avg_odds instead of odds) - Trading execution now properly handles timezone-naive datetime comparisons - Mark-to-market heartbeat now correctly reads 9 positions with proper stakes - Portfolio valuation working: $9,738 cash + $2,069 MTM positions = $11,807 total 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Complete analysis of Ominari trading system and dashboard integration - Identified critical performance reporting discrepancy (+76.3% vs actual -2.6%) - Documented working vs broken components (Portfolio API ✅, Markets API ❌) - Architecture overview with data flow between components - Technical fixes implemented and system health post-fixes - Recommendations for immediate and long-term improvements System Status: Functionally operational with accurate data persistence Main Issue: Dashboard shows misleading performance due to MTM vs realized P&L 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…filtering Portfolio Accounting Fixes: - MTM heartbeat: Use book value (cash + stakes at cost) instead of cash + potential payouts - Main heartbeat: Switch from cash_portfolio_value to book_value (was missing stakes) - Add book_value metric to unified calculator for correct betting accounting - Track odds movements separately as informational only, not in portfolio value - Result: Both heartbeats now show consistent $9,932.15 instead of $12,830 (inflated) or $8,283 (deflated) Deterministic Soccer Filtering: - Fetcher: Use deterministic Overtime API tags for sport classification - Extract tags field from API (9004=Soccer, 9001=Football, 9002=Basketball, etc.) - Only accept sport_id == 4 (Soccer) for market creation - Trading: Simplify safety filter to block obvious non-soccer teams (NBA/NHL/NFL) - Remove unreliable name-based sport detection heuristics per user feedback Key Insight: Betting positions are NOT like stocks with mark-to-market value. Correct accounting: Portfolio = Cash + Stakes (at cost), NOT Cash + Potential Payouts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…h current odds Problem: MTM heartbeat showed fewer positions and lower portfolio value than main heartbeat Root Cause: Only counted stakes for positions where current odds could be found in database Result: If one position's market wasn't found, its stake was excluded from portfolio calculation Fix: Move stake counting outside odds-checking logic (line 77) - Now ALWAYS counts all open positions regardless of odds availability - Odds tracking is informational only - shouldn't affect portfolio value calculation - Both heartbeats will now show consistent values 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
… odds tracked Problem: MTM showed "17 open" while main heartbeat showed "18 open" positions Root Cause: Position count was based on len(position_updates) which only included positions with odds data Fix: Track total_positions counter that increments for ALL open positions - Added total_positions counter at line 65 - Increment for every open position at line 79 - Use total_positions for positions_count in return (line 131) Now both heartbeats show consistent position counts AND portfolio values 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
… of stale cached data Critical Bug: Both heartbeats were showing stale data from hours ago - Discord showed: 18 positions, $1,719 stakes, $9,883 portfolio - Actual state: 4 positions, $373 stakes, $9,740 portfolio - 14 positions had settled but heartbeats didn't see the updates! Root Cause: Session managers initialized at startup with cached session objects - get_current_session() returned cached data, never reloaded from disk - Trading system writes to JSON file, but heartbeats kept reading old memory state - portfolio_calculator.get_current_portfolio_metrics(force_reload=True) worked for one metric but position tracking used different session_manager instance with stale data Fix: Force reload sessions from disk before reading position data - MTM heartbeat: reload before get_live_position_values() (line 59) - Main heartbeat: reload before checking overdue positions (line 576) Now heartbeats will see real-time updates as positions settle and new trades execute 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…lio validation Market Fetcher Improvements: - Replace non-functional tag-based filtering with deterministic tournament + team name approach - Add 50+ known soccer tournaments/leagues (Premier League, La Liga, Serie A, etc.) - Add team name pattern detection with soccer club indicators (FC, CF, SC, United, etc.) - Block non-soccer leagues (ITF/ATP/WTA tennis, NBA, NFL, NHL, MLB, Esports) - Block esports teams (HAVU, Eternal Fire, FaZe, Fnatic, etc.) - Remove sport_id mapping since all markets are now soccer-only - Result: 100% soccer markets being added Database Cleanup: - Add cleanup_database_sports.py script - Deleted 997 non-soccer active markets (757 American Football, 198 Esports, etc.) - Database now 88.2% soccer (was 71.9%) Portfolio Validation Fix: - Fixed cash flow validation formula in unified_portfolio_calculator.py - Old formula: expected = initial - stakes - fees + realized_pnl (WRONG - double-counted fees) - New formula: expected = initial - execution_stakes + payouts (CORRECT) - Fees are included in execution_stakes, not subtracted separately - All validation checks now pass: ✅ Accounting, ✅ P&L, ✅ Cash Flow Technical Details: - Public Overtime API doesn't provide 'tags' field needed for tag-based filtering - Tournament names provide deterministic sport classification - Team patterns (FC/CF/SC suffixes, club names) provide backup detection - Tennis detected via: individual names (2-3 words) without club suffixes - Esports detected via: known team names and league identifiers (ESL, IEM, BLAST, etc.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…asks - SOCCER_ONLY_FIX.md: Add resolution update (market fetcher re-enabled) - SYSTEM_IMPROVEMENTS_2025-11-25.md: Comprehensive technical summary - Market fetcher: Tournament + team-based filtering implementation - Database cleanup: 997 non-soccer markets removed (71.9% → 88.2% soccer) - Portfolio validation: Fixed fee accounting formula - Verification commands and technical insights included All systems operational and validated 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…atch, and missing template elements
Fixed three critical issues preventing dashboard from showing data:
1. JavaScript API Format Mismatch
- Trades API returns {success: true, trades: [...]} but JS expected array
- Fixed loadTradesData() to handle correct API format
- File: static/js/ominari_dashboard.js:240-252
2. Stale Session Data (Same as Heartbeat Fix)
- Dashboard wasn't reloading session data from disk
- Added session reload in 4 locations (same pattern as heartbeat fix)
- Files: web_dashboard_real_odds.py:880, 1259, 1391, 1547
3. Missing Template Elements
- Analytics template missing marketGrid, marketCount, tradesTableBody, lastUpdate
- Added complete market opportunities and trades sections
- File: templates/dashboard_analytics.html:318-383
Additional improvements:
- Markets API now shows all markets (not just >1% edge)
- Added comprehensive test suites to verify all components
- All 12 required HTML elements now present
- All 4 API endpoints verified operational
Verification:
- Portfolio: $9,804.18 (20 positions)
- Trades: 75 total (50 showing)
- Markets: 20 opportunities
- Charts: 24-hour timeline, position breakdown, analytics
- WebSocket: Real-time updates operational
- All tests passing ✅
Test suites added:
- test_dashboard_content.py - API and element verification
- test_dashboard_charts.py - Chart rendering validation
- test_dashboard_websocket.py - Real-time updates test
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implements Phase 1 of the strategy pipeline to enable safe experimentation and version control for trading strategies. New Components: - strategy_versions.py: Strategy versioning system with StrategyRegistry - Semantic versioning (1.0.0, 1.1.0, 2.0.0) - Feature flags for safe rollout - Performance tracking per version - Rollback capabilities - ab_testing_framework.py: A/B testing framework for parallel strategy testing - Statistical significance testing (t-tests, effect sizes) - Automatic allocation and tracking - Auto-termination on poor performance - Winner promotion workflow - enhanced_trading_engine.py: Unified trading engine with version control - Integrates with StrategyRegistry - Supports A/B testing allocation - Dynamic strategy switching - Per-version performance tracking - tests/test_trading_regression.py: Comprehensive regression test suite - Kelly criterion validation - Edge calculation tests - Position sizing tests - Risk limit validation - MTM calculations - Settlement logic - System invariants - monitoring/edge_quality_monitor.py: Edge quality monitoring - Predicted vs realized edge tracking - Probability calibration metrics (Brier score) - Performance by edge bucket - Sport-specific calibration - Automatic alerts on miscalibration - reports/strategy_comparison_report.py: Strategy comparison reports - Side-by-side version comparison - Performance, risk, and parameter analysis - Markdown report generation - A/B test result reports - Automated recommendations - config/trading_profiles.py: Pre-configured trading profiles - Conservative, Moderate, Aggressive, Experimental - Profile validation - Profile comparison - Conversion to StrategyVersion Benefits: - Safe experimentation with expanded horizons (24h→72h) and markets (20→200) - Automated testing infrastructure prevents regressions - A/B testing validates improvements before full deployment - Version control enables safe rollback - Edge quality monitoring validates probability models This infrastructure enables the system to: 1. Test strategy improvements without risking production performance 2. Automatically validate that changes don't break core logic 3. Statistically compare strategy variants 4. Maintain production stability with rollback capabilities 5. Monitor and improve probability model calibration
Implements comprehensive testing pipeline to validate strategies
before risking real money. Reduces risk through progressive validation.
New Components:
1. strategy_testing_pipeline.py - Multi-stage pipeline manager
- 6 progressive stages (Backtest → Production)
- Promotion criteria for each stage
- Automatic advancement/termination
- Pipeline state management
2. strategy_backtester.py - Historical data backtesting
- Tests strategies against historical market data
- Simulates trades and outcomes
- Fast validation (minutes vs weeks)
- Filters bad strategies early
3. shadow_trading_system.py - Parallel comparison system
- Runs shadow strategy alongside production
- Logs divergences (shadow vs production)
- Zero risk, direct comparison
- Validates assumptions before real money
4. STRATEGY_TESTING_GUIDE.md - Comprehensive documentation
- Complete walkthrough of all 6 stages
- Best practices and common pitfalls
- Decision matrices for advancement
- Example: Testing v1.1.0 end-to-end
The 6-Stage Pipeline:
Stage 1: Backtest (Historical Data)
- Risk: None, Duration: Hours
- Criteria: 100+ trades, 5%+ ROI, <25% drawdown
- Purpose: Quick filtering of bad strategies
Stage 2: Paper Trading (Live Data, No Execution)
- Risk: None, Duration: 1-2 weeks
- Criteria: 50+ trades, 3%+ ROI, <20% drawdown
- Purpose: Validate with real market conditions
Stage 3: Shadow Trading (Parallel with Production)
- Risk: None, Duration: 1-2 weeks
- Criteria: 30+ trades, must beat baseline
- Purpose: Direct comparison, identify divergences
Stage 4: Micro A/B Test (1-5% Real Money)
- Risk: Low, Duration: 3-7 days
- Criteria: 20+ trades, <15% drawdown, no errors
- Purpose: Validate execution works
Stage 5: Full A/B Test (20% Real Money)
- Risk: Medium, Duration: 14+ days
- Criteria: 100+ trades, 5%+ better, p<0.05
- Purpose: Statistical validation
Stage 6: Gradual Rollout (20% → 100%)
- Risk: Increasing, Duration: 3-4 weeks
- Criteria: 50+ trades/stage, maintain performance
- Purpose: Scale-dependent issue detection
Benefits:
- Dramatically reduces risk of deploying bad strategies
- Each stage catches different types of issues
- Statistical validation before real money
- Clear promotion criteria at each stage
- Automatic termination on poor performance
- Can rollback at any point
Example Usage:
# Create pipeline for new strategy
manager = PipelineManager()
pipeline = manager.create_pipeline('1.1.0', baseline='1.0.0')
# Stage 1: Backtest
results = run_strategy_backtest('1.1.0', start, end)
passed, reasons = pipeline.complete_stage(results)
# Stage 2: Paper trading (if passed)
if passed:
pipeline.advance_to_next_stage()
# Run paper trading...
# Stages 3-6: Shadow, Micro, Full A/B, Gradual rollout
# Each with automatic validation and promotion
This pipeline enables confident deployment of new strategies by
progressively validating them with increasing realism and lower risk.
Implements fully automated testing pipeline that runs in background: - Tests strategies automatically without manual intervention - Maintains strict production vs testing separation - Promotes winners automatically when validated - Sends Discord notifications (no constant monitoring needed) New Components: 1. automated_strategy_orchestrator.py - Background orchestrator - Runs every 5 minutes checking for work - Automatically starts backtests for new strategies - Advances stages when criteria met - Creates A/B tests automatically - Promotes winners to production - Rollbacks on performance degradation - Sends Discord notifications at each stage - NO manual intervention required 2. production_lock.json - Single source of truth - ONE production version at a time - Enforced by orchestrator - Cannot be changed except through testing pipeline - Emergency override available but logged 3. systemd/ominari-orchestrator.service - Systemd service - Runs orchestrator as background daemon - Auto-restart on failures - Logs to logs/orchestrator.log - Integrates with existing production system 4. ominari_ctl.py - Command-line control tool - Check status: production version, active tests - List strategies and pipelines - Add new strategies to test - Emergency promotion/rollback (with confirmation) - Simple interface for monitoring 5. PRODUCTION_VS_TESTING.md - Complete documentation - How production vs testing works - Production lock explained - Session isolation - Automatic advancement - A/B test allocation - Gradual rollout process - Command reference - Example timeline (52 days, zero intervention) How It Works: PRODUCTION (Locked): - Single designated version (v1.0.0) - Actually trades with real money - Cannot be changed except through completed pipeline - Lock file prevents accidental deployment - Running: execute_trading_solution.py TESTING (Automated): - Multiple strategies being validated - Runs in complete isolation - Zero effect on production trades - Separate sessions, logs, database entries - Orchestrator manages entire lifecycle Add Strategy to Test: $ ominari_ctl add 1.2.0 "Multi-Sport Strategy" --sports "Soccer,Tennis" --horizon 72 Orchestrator Automatically: 1. Detects new strategy (within 5 minutes) 2. Runs backtest (hours) 3. Starts paper trading if passes (7-14 days) 4. Runs shadow trading (7-14 days) 5. Creates micro A/B test 5% (3-7 days) 6. Creates full A/B test 20% (14 days) 7. Gradual rollout 20%→50%→80%→100% (3-4 weeks) 8. Promotes to production if successful Total: 7-8 weeks, ZERO manual intervention needed Benefits: - No constant monitoring required - Production never affected by testing - Statistical validation before promotion - Automatic rollback on issues - Clear separation of concerns - Discord notifications keep you informed - Can test multiple strategies in parallel Safety: - Production lock prevents accidental deployment - Stage gates must be passed sequentially - Automatic termination on poor performance - Rollback capabilities at every stage - Emergency override available (with confirmation) Usage: # Check what's running $ ominari_ctl status # View production details $ ominari_ctl production # Add new strategy to test $ ominari_ctl add 1.2.0 "My Strategy" # List active tests $ ominari_ctl pipelines # Emergency rollback (requires confirmation) $ ominari_ctl rollback 1.0.0 Orchestrator runs as systemd service: $ sudo systemctl start ominari-orchestrator $ sudo systemctl status ominari-orchestrator $ tail -f logs/orchestrator.log This solves the original question: testing is automated and isolated, production is locked and protected, no arbitrary intervention needed.
- Add real-time position tracker with notifications (position_tracker.py) - Fix psycopg2 module conflict by using uv run for execute_trading - Create deployment architecture guide for 1-3 machine setups - Update .gitignore to exclude env files, logs, and postgres data - Document live trading diagnosis and resolution Key Features: - Position tracker monitors open positions, P&L, and alerts on significant events - Portfolio summary with detailed position breakdowns - Automated alerts for expiring positions and large P&L moves - Full deployment guide for single and multi-machine configurations Fixes: - execute_trading_solution.py now connects to PostgreSQL successfully - Use 'uv run' to avoid flox/venv module conflicts - Database access working with 1,016+ tradeable markets Documentation: - POSITION_TRACKER_GUIDE.md - Complete usage guide - DEPLOYMENT_ARCHITECTURE.md - 1-3 machine deployment options - LIVE_TRADING_DIAGNOSIS.md - Troubleshooting guide Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Complete deployment guide for 1-3 machine setups - Step-by-step migration path between configurations - Cost comparison and recommendations - GitHub workflow for pulling updates - Ready for deployment to additional machines 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Complete guide for deploying to new machines - Lists all dependencies not in version control - Environment variable requirements - PostgreSQL setup options - Session file management - Multi-machine deployment checklist - Troubleshooting guide 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
4c7a04c to
ab6590e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.