- Complete clickable mockup showing full platform UI/UX - Dashboard with real-time metrics and charts - Data management interface with API connectors - Strategy engine configuration and backtesting - Risk management controls and monitoring - Navigation between all platform sections - Dark theme with professional trading aesthetic - Responsive design for mobile/desktop - Interactive charts using Chart.js with mock data - Reusable HTML/CSS/JavaScript structure - Updated README with prototype documentation
Quantitative Trading Platform
A quantitative trading platform with modular architecture for data acquisition, strategy execution, risk management, and UI/UX.
Architecture
See component_diagram.md and architecture_diagram.txt in the parent directory (/home/thanthos/clawd/) for detailed system design.
UI/UX Module
Dashboard
Simple dashboard displaying key trading metrics:
- PnL (Profit and Loss)
- Drawdown
- Win Rate
Data Layer Module
Moomoo API Connector
A robust Python client for moomoo API with comprehensive error handling, rate limiting, and data normalization.
Features:
- Historical OHLCV data retrieval
- Real-time WebSocket subscription (mock)
- Instrument metadata
- Rate limiting (token bucket algorithm)
- Circuit breaker pattern for fault tolerance
- Caching with TTL
- Mock mode for development
Usage:
from data.connectors import create_moomoo_client, Interval
from datetime import datetime, timedelta
client = create_moomoo_client(mock_mode=True)
data = client.get_ohlcv(
symbol="AAPL",
interval=Interval.DAY_1,
start_date=datetime.now() - timedelta(days=30),
end_date=datetime.now()
)
See examples/demo_moomoo.py for complete demonstration.
Development
Prerequisites
- Python 3.8+
- Node.js (for frontend, optional)
- Docker (optional)
- Redis (optional, for caching)
Setup
- Clone the repository
- Install dependencies:
pip install -r requirements.txt - Run the dashboard:
python app.py - Test data connector:
python examples/demo_moomoo.py
Data Layer Development
The data connector uses a modular design with base classes for easy extension:
DataConnectorabstract base classMoomooClientimplementation with mock mode- Rate limiting and circuit breaker patterns
- Caching support (in-memory or Redis)
To extend with real API credentials:
- Set environment variables:
MOOMOO_API_KEY,MOOMOO_SESSION_TOKEN - Set
mock_mode=Falsewhen creating client - Implement actual API calls in
_make_request()method
UI/UX Development
The dashboard is built with Flask (backend) and Bootstrap/Chart.js (frontend).
- Backend:
app.pyprovides REST API endpoints - Frontend:
templates/dashboard.htmlwith interactive charts
Interactive Prototype
A complete clickable mockup of the full platform is available in the prototype/ directory. This showcases the complete user interface with all major sections:
Features demonstrated:
- Dashboard with real-time metrics
- Data management interface
- Strategy engine configuration
- Risk management controls
- Navigation between all platform sections
To use the prototype:
- Open
prototype/index.htmlin a web browser - Click sidebar navigation to explore different sections
- Interact with charts, forms, and controls
The prototype uses HTML/CSS/JavaScript with Bootstrap and Chart.js, and can be reused as the foundation for the actual web application.
License
Proprietary