Skip to content

rickfloyd/quantumai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI Quantum Charts - Professional Trading Platform

AI Quantum Charts Version License Node.js

🌟 Welcome to AI Quantum Charts

AI Quantum Charts is a cutting-edge, professional trading platform that combines quantum computing concepts with artificial intelligence to deliver unparalleled market analysis and trading insights. Our platform aggregates data from multiple sources, provides advanced charting capabilities, and leverages a sophisticated multi-agent AI system for comprehensive market intelligence.

Live Platform: aiquantumcharts.com


πŸš€ Key Features

πŸ“Š Advanced Market Data

  • Multi-Provider Integration: Alpha Vantage, Polygon, Finnhub, Twelve Data, Yahoo Finance
  • Real-Time Data Streams: Live price updates via WebSocket connections
  • Historical Data: Comprehensive historical data with multiple timeframes
  • Global Coverage: Stocks, Forex, Cryptocurrencies, Commodities, Indices

πŸ“ˆ Professional Charting

  • Multiple Chart Types: Candlestick, Line, Area, OHLC
  • Technical Indicators: SMA, EMA, RSI, MACD, Bollinger Bands, and more
  • Interactive Charts: Zoom, pan, crosshair, real-time updates
  • Custom Timeframes: 1min, 5min, 15min, 1hour, 1day, 1week, 1month

πŸ€– AI Multi-Agent System

  • Quantum Trading Workflow: Advanced AI orchestration for market analysis
  • 6 Agent Architectures: Hierarchical, Human-in-the-Loop, Shared Tools, Sequential, Database, Memory
  • Market Intelligence: Automated analysis across multiple market sectors
  • Risk Assessment: AI-powered risk evaluation and portfolio optimization

πŸ”§ Enterprise Features

  • Rate Limiting & Caching: Optimized for high-frequency requests
  • Fallback Systems: Automatic provider switching for maximum uptime
  • Authentication: JWT-based secure authentication system
  • Session Management: Persistent user sessions with bcrypt encryption

πŸ—οΈ System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    AI Quantum Charts                        β”‚
β”‚                   Frontend Dashboard                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  Express.js Server                          β”‚
β”‚              (Authentication & API Layer)                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Multi-Agent AI System                          β”‚
β”‚        (Quantum Trading Workflow Orchestration)            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 β”‚        Data Layer                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   Professional APIs         β”‚  β”‚   Quick Public       β”‚  β”‚
β”‚  β”‚ β€’ Alpha Vantage            β”‚  β”‚   Sources            β”‚  β”‚
β”‚  β”‚ β€’ Polygon                  β”‚  β”‚ β€’ Yahoo Finance      β”‚  β”‚
β”‚  β”‚ β€’ Finnhub                  β”‚  β”‚ β€’ CoinGecko          β”‚  β”‚
β”‚  β”‚ β€’ Twelve Data              β”‚  β”‚ β€’ Exchange Rates     β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Installation & Setup

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Git

Quick Start

  1. Clone the Repository

    git clone https://github.com/rickfloyd/quantumai.git
    cd quantumai
  2. Install Dependencies

    npm install
  3. Configure Environment Variables Create a .env file in the root directory:

    # Professional API Keys (Optional - Platform works without them)
    ALPHA_VANTAGE_API_KEY=your_alpha_vantage_key
    POLYGON_API_KEY=your_polygon_key
    FINNHUB_API_KEY=your_finnhub_key
    TWELVE_DATA_API_KEY=your_twelve_data_key
    FMP_API_KEY=your_fmp_key
    IEX_API_KEY=your_iex_key
    QUANDL_API_KEY=your_quandl_key
    
    # Server Configuration
    PORT=3004
    JWT_SECRET=your-super-secret-jwt-key
    NODE_ENV=development
  4. Start the Server

    npm start
    # or for development
    npm run dev
  5. Access the Dashboard Open your browser and navigate to: http://localhost:3004


πŸ“– API Documentation

Professional API Arsenal

Stock Quote

const ProfessionalAPIArsenal = require('./lib/professional-api-arsenal');
const api = new ProfessionalAPIArsenal();

// Get real-time stock quote
const quote = await api.getStockQuote('AAPL');
console.log(quote);
// {
//   symbol: 'AAPL',
//   price: 175.50,
//   change: 2.30,
//   changePercent: '1.33%',
//   high: 176.00,
//   low: 173.20,
//   volume: 45000000,
//   provider: 'AlphaVantage'
// }

Historical Data

// Get historical data
const historical = await api.getHistoricalData('MSFT', '1day', 'compact');
console.log(historical.data.length); // Array of OHLCV data

Technical Indicators

// Get RSI indicator
const rsi = await api.getTechnicalIndicator('GOOGL', 'RSI', 'daily', 14);
console.log(rsi.data);

Quick Public Sources

Yahoo Finance Integration

const QuickPublicSources = require('./quick_public_sources');
const quickAPI = new QuickPublicSources();

// Free stock quote (No API key required)
const quote = await quickAPI.getYahooQuote('TSLA');
console.log(quote);

// Free historical data
const historical = await quickAPI.getYahooHistorical('NVDA', '1y', '1d');

Cryptocurrency Data

// Get crypto prices from CoinGecko (Free)
const bitcoin = await quickAPI.getCryptoPrice('bitcoin');
const cryptoList = await quickAPI.getCryptoList();

Market Overview

// Get comprehensive market overview
const overview = await quickAPI.getMarketOverview();
console.log(overview.indices);    // Market indices
console.log(overview.sectors);    // Sector performance
console.log(overview.trending);   // Trending stocks
console.log(overview.crypto);     // Top cryptocurrencies

πŸ“Š Chart Component Usage

HTML Integration

<!DOCTYPE html>
<html>
<head>
    <title>AI Quantum Charts</title>
</head>
<body>
    <div id="quantum-chart"></div>
    
    <script src="components/IndependentStockChart.js"></script>
    <script>
        // Initialize chart
        const chart = new IndependentStockChart('quantum-chart', {
            symbol: 'AAPL',
            interval: '1day',
            chartType: 'candlestick',
            theme: 'dark',
            realTime: true,
            indicators: ['SMA', 'RSI']
        });
    </script>
</body>
</html>

Chart Configuration Options

const chartConfig = {
    symbol: 'AAPL',           // Stock symbol
    interval: '1day',         // 1min, 5min, 15min, 1hour, 1day, 1week, 1month
    chartType: 'candlestick', // candlestick, line, area, ohlc
    height: 400,              // Chart height in pixels
    width: '100%',            // Chart width
    theme: 'dark',            // dark, light, quantum
    realTime: true,           // Enable real-time updates
    indicators: ['SMA', 'RSI', 'MACD'] // Technical indicators
};

πŸ€– Multi-Agent AI System

Our platform features a sophisticated multi-agent AI system with 6 different architectural patterns:

1. Hierarchical Agent System

  • Master Coordinator: Overall market analysis coordination
  • Market Managers: Forex, Crypto, Stocks, Futures specialists
  • Worker Agents: Technical, fundamental, sentiment analysis

2. Human-in-the-Loop Agents

  • Interactive decision-making processes
  • User confirmation for critical operations
  • Feedback incorporation mechanisms

3. Shared Tools Network

  • Common tool access across agents
  • Resource optimization
  • Collaborative analysis capabilities

4. Sequential Agent Pipeline

  • Step-by-step data processing
  • Quality assurance at each stage
  • Error handling and recovery

5. Database Agents with Tools

  • Persistent data storage
  • Historical analysis capabilities
  • Pattern recognition systems

6. Memory Transformation Agents

  • Dynamic memory management
  • Context preservation
  • Learning and adaptation

Usage Example

const { MultiAgentSystem } = require('./agents/multi-agent-system');

const aiSystem = new MultiAgentSystem({
    enableRealTime: true,
    logLevel: 'info'
});

// Run quantum trading workflow
const result = await aiSystem.supervisorAgent.runQuantumChartsWorkflow({
    symbols: ['AAPL', 'MSFT', 'GOOGL'],
    timeframe: '1day',
    analysisType: 'comprehensive'
});

console.log(result);

πŸ§ͺ Testing

We provide comprehensive testing suites to ensure platform reliability:

Run All Tests

# Complete system test
node test_comprehensive_system.js

# Independent charts test
node test_independent_charts.js

# Professional APIs test
node test_professional_apis.js

# Fantasy sports integration test
node test_fantasy_sports.js

Test Categories

  1. API Integration Tests

    • Data source connectivity
    • Fallback mechanisms
    • Rate limiting
    • Error handling
  2. Chart Component Tests

    • Data processing
    • Real-time updates
    • Performance benchmarks
    • Configuration options
  3. AI System Tests

    • Agent communication
    • Workflow orchestration
    • Memory management
    • Performance metrics
  4. Performance Tests

    • Load testing
    • Memory usage
    • Cache efficiency
    • Concurrent requests

πŸ”§ Configuration

Environment Variables

# API Configuration
ALPHA_VANTAGE_API_KEY=your_key
POLYGON_API_KEY=your_key
FINNHUB_API_KEY=your_key
TWELVE_DATA_API_KEY=your_key

# Server Settings
PORT=3004
JWT_SECRET=your-jwt-secret
SESSION_SECRET=your-session-secret

# Cache Settings
CACHE_EXPIRY=60000
RATE_LIMIT_WINDOW=60000
RATE_LIMIT_MAX=100

# Development Settings
NODE_ENV=development
LOG_LEVEL=info
ENABLE_DEBUG=true

API Provider Configuration

// Professional API priority order
const apiProviders = {
    stock: ['alphaVantage', 'polygon', 'finnhub'],
    forex: ['alphaVantage', 'twelveData'],
    crypto: ['alphaVantage', 'coinGecko'],
    news: ['alphaVantage', 'newsAPI']
};

πŸ“ˆ Performance Optimization

Caching Strategy

  • Memory Cache: Fast access for frequently requested data
  • TTL: Configurable time-to-live for different data types
  • Cache Hit Ratio: Monitored and optimized automatically

Rate Limiting

  • Provider-Specific: Different limits for each API provider
  • Intelligent Throttling: Automatic request spacing
  • Queue Management: Request queuing during high load

Data Compression

  • Response Compression: Gzip compression for API responses
  • Data Deduplication: Eliminate duplicate data points
  • Efficient Storage: Optimized data structures

πŸ›‘οΈ Security

Authentication

// JWT Token Authentication
const token = jwt.sign(
    { userId: user.id, email: user.email },
    process.env.JWT_SECRET,
    { expiresIn: '24h' }
);

Data Protection

  • Encryption: bcrypt for password hashing
  • Session Security: Secure session management
  • Rate Limiting: Protection against abuse
  • Input Validation: Sanitization of all inputs

API Security

  • HTTPS Only: SSL/TLS encryption
  • CORS Configuration: Cross-origin request security
  • API Key Management: Secure key storage and rotation

πŸ” Monitoring & Analytics

Health Monitoring

// Check system health
const health = await api.checkAPIHealth();
const cacheStats = api.getCacheStats();
const memoryUsage = process.memoryUsage();

Performance Metrics

  • Response Times: API call latency tracking
  • Success Rates: Provider availability monitoring
  • Error Tracking: Comprehensive error logging
  • Usage Analytics: User behavior and system usage patterns

πŸš€ Deployment

Production Deployment

  1. Environment Setup

    export NODE_ENV=production
    export PORT=3004
    # Set all API keys
  2. Process Management

    # Using PM2
    npm install -g pm2
    pm2 start server/index.js --name "quantum-charts"
    pm2 save
    pm2 startup
  3. Nginx Configuration

    server {
        listen 80;
        server_name aiquantumcharts.com;
        
        location / {
            proxy_pass http://localhost:3004;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'upgrade';
            proxy_set_header Host $host;
            proxy_cache_bypass $http_upgrade;
        }
    }

Docker Deployment

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
EXPOSE 3004
CMD ["npm", "start"]
# Build and run
docker build -t ai-quantum-charts .
docker run -p 3004:3004 -e NODE_ENV=production ai-quantum-charts

🀝 Contributing

We welcome contributions to AI Quantum Charts! Here's how you can help:

Development Setup

git clone https://github.com/rickfloyd/quantumai.git
cd quantumai
npm install
npm run dev

Contribution Guidelines

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Standards

  • ESLint: Follow the provided ESLint configuration
  • Comments: Comprehensive documentation for all functions
  • Tests: Include tests for new features
  • Performance: Optimize for speed and memory usage

πŸ“ž Support & Community

Documentation

  • API Reference: Comprehensive API documentation
  • Examples: Code samples and tutorials
  • Video Tutorials: Step-by-step guides

Community

  • GitHub Issues: Bug reports and feature requests
  • Discord: Real-time community support
  • Email: [email protected]

Professional Support

  • Enterprise Consulting: Custom implementation services
  • API Integration: Professional integration assistance
  • Training: Team training and onboarding

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License

Copyright (c) 2024 AI Quantum Charts

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

🎯 Roadmap

Version 1.1 (Coming Soon)

  • Advanced AI Trading Signals
  • Portfolio Management Tools
  • Social Trading Features
  • Mobile App Integration

Version 1.2 (Q2 2025)

  • Quantum Computing Integration
  • Machine Learning Price Prediction
  • Advanced Risk Management
  • Institutional Features

Version 2.0 (Q4 2025)

  • Decentralized Trading
  • Blockchain Integration
  • Advanced AI Agents
  • Global Market Expansion

🌟 Acknowledgments

  • Chart.js: For excellent charting capabilities
  • Express.js: For robust server framework
  • API Providers: Alpha Vantage, Polygon, Yahoo Finance, CoinGecko
  • Open Source Community: For continuous inspiration and support

Built with ❀️ by the AI Quantum Charts Team

Visit us at aiquantumcharts.com for the live platform!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published