feat: Phase 1 - Synthetic Data Training Integration - #1
Merged
Conversation
- Add SyntheticDataInjector for injecting synthetic data into Redis channels - Create TrainingBridge to coordinate between synthetic data and agent training - Implement AgentTrainingHarness for orchestrating complete training sessions - Add TrainingConsumer extending BaseAgentRedisConsumer with training capabilities Key features: - 10 pre-defined training scenarios (games, trading, market events) - Adaptive difficulty adjustment based on performance - Real-time monitoring and checkpointing - Comprehensive metrics (Sharpe ratio, win rate, P&L) - Confidence calibration integration - Memory system for experience replay This establishes the foundation for training Kalshi agents using synthetic data while maintaining full compatibility with the production Redis infrastructure. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit transforms the proprietary agent-based architecture into a clean, open-source SDK for algorithmic prediction market trading. Major Changes: - Renamed entire platform from "Kalshi Trading Agent" to "Neural SDK" - Replaced agent architecture with strategy-based framework - Created comprehensive backtesting module with multiple data providers - Added complete documentation and examples - Updated environment variables: KALSHI_* → NEURAL_* - Removed proprietary code and trading-specific implementations - Added placeholder methods with clear TODO comments for extension SDK Features: - Event-driven backtesting engine with realistic portfolio simulation - Multiple data provider support (CSV, Parquet, S3, Database) - Strategy framework with decorators (@SDK.strategy) - Risk management with Kelly Criterion position sizing - Real-time data streaming architecture (via src/data_pipeline) - Comprehensive performance metrics and analytics - Docker support for containerized deployment File Structure: - neural_sdk/ - Core SDK implementation - examples/ - Usage examples and demonstrations - docs/ - Complete documentation suite - src/data_pipeline - Real-time data infrastructure (preserved) - tests/ - Test suite - config/ - Configuration files Installation: pip install git+https://github.com/IntelIP/kalshi.git@feat/synthetic-training-integration 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
hudsonaikins
added a commit
that referenced
this pull request
Oct 11, 2025
Fixes #1 (Twitter API domain), #2 (import mismatch), #3/#13 (NumPy compatibility), #4/#12 (Kalshi game discovery), #5 (SSL certs), #11 (WebSocket auth docs), #14 (WebSocket market_tickers parameter) BREAKING CHANGES: None - all changes are backward compatible Changes: - Fix Twitter API base URL from twitter-api.io to api.twitterapi.io - Fix Twitter authentication headers (x-api-key format) - Fix KalshiAPISource import name (KalshiApiSource) - Fix get_nfl_games() and get_cfb_games() series_ticker field usage - Add market_tickers parameter to WebSocket subscribe() method - Add certifi dependency for SSL certificate verification - Document NumPy <2.0 requirement with inline comments - Add comprehensive WebSocket authentication documentation Documentation: - Add BUG_FIXES_COMPLETED.md with deployment guide - Add BETA_BUGS_TRACKING.md with all bug reports - Add SDK_FIXES_REQUIRED.md with technical specifications - Add WEBSOCKET_INTEGRATION_GUIDE.md with usage patterns - Add LIVE_TESTING_FINDINGS.md with test results Testing: - All existing tests pass - No new linter errors - Verified fixes address reported issues See BUG_FIXES_COMPLETED.md for full details.
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.
Summary
This PR implements Phase 1 of the synthetic data training integration, establishing the foundation for training Kalshi agents using synthetic data while maintaining full compatibility with the production Redis infrastructure.
Key Components Implemented
1. Synthetic Data Injector (
src/integration/synthetic_injector.py)2. Training Bridge (
src/integration/training_bridge.py)3. Agent Training Harness (
src/integration/training_harness.py)4. Training Consumer (
src/agents/training_consumer.py)Testing
Next Steps (Future PRs)
Notes
This establishes the core infrastructure needed for synthetic data training. The system can now train agents offline using generated data, reducing API costs while maintaining production compatibility.