A full-stack, multi-asset algorithmic trading research platform with predictive modeling, backtesting, and portfolio optimization.
A full-stack, multi-asset algorithmic trading research platform with predictive modeling, backtesting, and portfolio optimization.
Current Status: β Backend-Frontend Integration Complete | β³ Live Trading is reserved
Live Product: (https://algo.dimensionlessdevelopments.com)
β
Production Deployment - Live
β
Multi-Asset Support - Stocks, Crypto, Forex, Indices
β
Advanced ML Models - ARIMA + GARCH predictive analytics
β
Regime-Adaptive Strategy - Dynamic strategy switching based on market conditions
β
Comprehensive Testing - 25+ integration tests, 100% core functionality coverage
β
Type-Safe Architecture - Full TypeScript + Pydantic validation
- Python 3.14+ with venv activated
- Node.js 16+ and npm
- Internet connection (for market data)
# Activate virtual environment
.\venv\Scripts\Activate.ps1
# Install dependencies (first time only)
pip install -r requirements.txt
# Start backend server
python start_backend.pyBackend runs on: http://localhost:8000
# In a new terminal
cd front
# Install dependencies (first time only)
npm install
# Start development server
npm run devFrontend runs on: http://localhost:5173
Open browser to: http://localhost:5173
Data Flow:
Market Data (yfinance)
β
Feature Engineering (Bollinger, %B, Volatility)
β
Predictive Models (ARIMA/GARCH)
β
Signal Generation (Hybrid Regime Strategy)
β
Backtesting (Positions, Returns, Metrics)
β
API Layer (FastAPI REST endpoints)
β
Frontend Dashboard
- Historical data via
yfinance - Multi-asset support (SPY, QQQ, BTC-USD, forex)
- OHLCV data processing
- Bollinger Bands (MA Β± 2Ο)
- Percent B indicator (%B)
- Rolling volatility
- Log returns
- ARIMA β Return forecasts
- GARCH β Volatility forecasts
- Risk-adjusted score:
predicted_return / predicted_volatility
- Low Volatility Regime: Mean reversion using Bollinger Bands
- High Volatility Regime: ARIMA/GARCH predictive signals
- Adaptive strategy based on market conditions
- Realistic position sizing
- Avoids look-ahead bias
- Strategy vs. market comparison
- Cumulative return tracking
- Metrics: Total Return, CAGR, Sharpe Ratio, Max Drawdown, Win Rate, Profit Factor
- Visualizations: Equity curve, drawdown chart
- Regime Analysis: Volatility classification and history
- Threshold optimization
- Walk-forward analysis (train β test β roll)
- Multi-parameter grid search
- Multi-asset combination
- Equal-weight allocation
- Time-series alignment
- Missing data handling
- FastAPI with auto-generated docs
- 3 REST endpoints:
GET /api/dashboard?symbol={symbol}- Full dashboard dataGET /api/signals?symbol={symbol}- Recent signalsPOST /api/backtest- Custom date range backtestPOST /api/optimize- Multi-parameter threshold optimizationPOST /api/portfolio- Multi-asset portfolio analysisPOST /api/backtest-risk- Risk management with stop-loss/take-profit
- Type-safe Pydantic models with validation
- Production CORS with environment-based configuration
- Health monitoring endpoint for uptime checks
- React + TypeScript with Vite
- Components:
- Bollinger Band chart
- Metrics panel (Sharpe, returns, drawdown)
- Signal history
- Equity curve
- Volatility regime indicator
- Real-time data from backend API
- Error handling and retry logic
Returns comprehensive dashboard data:
{
"symbol": "SPY",
"lastUpdate": "2024-04-06T10:30:00",
"bollinger": [...],
"signals": [...],
"metrics": {
"totalReturn": 23.47,
"sharpeRatio": 1.84,
"maxDrawdown": -8.23,
...
},
"equity": [...],
"regime": {...}
}Returns recent trading signals.
Run backtest with custom date range:
{
"symbol": "SPY",
"start": "2020-01-01",
"end": "2024-01-01"
}API Docs: http://localhost:8000/docs
quant/
βββ backend/ # Python backend
β βββ app/
β β βββ api/ # FastAPI routes
β β βββ backtest/ # Backtesting engine
β β βββ data/ # Data loading
β β βββ models/ # ARIMA/GARCH/Indicators
β β βββ optimization/ # Parameter optimization
β β βββ performance/ # Analytics
β β βββ portfolio/ # Multi-asset
β β βββ strategy/ # Signal generation
β βββ test_.py # Integration tests
β βββ ...
βββ front/ # React frontend
β βββ src/
β β βββ components/ # UI components
β β βββ pages/ # Dashboard page
β β βββ lib/ # API client
β βββ ...
βββ scripts/ # Development utilities
βββ start_backend.py # Backend startup script
βββ requirements.txt # Python dependencies
βββ INTEGRATION_GUIDE.md # Setup guide
βββ README.md # This file
python backend/test_portfolio.py
python backend/test_optimization.py
python backend/test_walkforward.py# Health check
curl http://localhost:8000/health
# Get dashboard
curl "http://localhost:8000/api/dashboard?symbol=SPY"- Start both backend and frontend
- Open
http://localhost:5173 - Verify data loads (not mock data)
- Check browser console for errors
- INTEGRATION_GUIDE.md - Complete setup guide, troubleshooting
- INTEGRATION_COMPLETE.md - What was built, what's next
- scripts/README.md - Utility scripts documentation
- API Docs - Auto-generated at
http://localhost:8000/docs
-
Data Pipeline
- Fetch historical data
- Calculate features
- Run models
-
Signal Generation
- Analyze volatility regime
- Generate hybrid signals
- Apply entry/exit rules
-
Backtesting
- Simulate positions
- Calculate returns
- Compute metrics
-
Visualization
- Display in dashboard
- Interactive charts
- Performance analysis
- Modular Architecture - Separable, testable components
- Type Safety - Pydantic (backend) + TypeScript (frontend)
- Separation of Concerns - Data/Models/Strategy/UI layers
- Regime Awareness - Adaptive strategy based on market conditions
- Research-First - Emphasis on backtesting before live trading
- First request takes 5-10 seconds (ARIMA/GARCH fitting)
- Default analysis: 2 years of daily data
- Supports: Stocks (SPY), Crypto (BTC-USD), Forex (EURUSD=X)
- Consider caching for production use
Backend:
- FastAPI (REST API)
- Pandas/NumPy (Data processing)
- yfinance (Market data)
- statsmodels (ARIMA)
- arch (GARCH)
- Pydantic (Data validation)
- Ensure venv is activated
- Install dependencies:
pip install -r requirements.txt - Check port 8000 is available
- Verify backend is running:
curl http://localhost:8000/health - Check CORS settings in
backend/app/main.py - Clear browser cache
- First request is slow (model fitting)
- Consider implementing caching
- Reduce date range for testing
See INTEGRATION_GUIDE.md for more troubleshooting.
MIT License - See LICENSE file for details
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
- Check documentation in
/docsfolder - Review API docs at
http://localhost:8000/docs - See troubleshooting in INTEGRATION_GUIDE.md
What Works:
β
Full-stack integration
β
Multi-asset backtesting
β
ARIMA/GARCH modeling
β
Hybrid regime strategy
β
Performance analytics
β
Interactive dashboard
β
REST API
What's Next: β³ Live trading infrastructure
Built with β€οΈ for quantitative trading research
Made by Dimensionless Developments Head to our website https://www.dimensionlessdevelopments.com β β β β β β β β β β Email: contact@dimensionlessdevelopments.com