
Jupiter Platform
Trading Platform Optimization
Overview
A trading platform for testing strategies on historical data (backtesting). The problem? Algorithms written in NodeJS took 4+ hours to test a single strategy. With thousands of strategies to validate, it was impossible to iterate quickly.
I analyzed the code: the main problem was nested for loops processing millions of CSV rows line by line. Each market tick was read, parsed, and processed individually - a performance disaster.
I rewrote everything in Python using NumPy for vectorized operations (instead of loops, calculations on entire arrays), replaced CSV with Parquet columnar format (reads only the columns needed, not the entire file), and optimized critical sections with Cython (compiles Python to C for native speed).
The system now integrates with IG.com for historical data and live trading, calculates risk management in real-time during tests (so you see immediately if a strategy would make you lose everything), and uses Monte Carlo simulations to validate robustness. Parallel processing: tests 10 different strategies simultaneously on different CPU cores. Database designed to support future brokers. All sensitive data (API credentials, account data) is encrypted per regulations.
Result: backtesting that previously required 4+ hours now completes in less than 10 minutes. 95% time saved, thousands of strategies tested in one day instead of weeks.
Key Features
- Backtesting 95% faster: from 4+ hours to less than 10 minutes per strategy
- Vectorized NumPy operations eliminating loops: native C calculations instead of Python
- Columnar Parquet format -70% I/O: reads only necessary columns instead of entire CSV
- Real-time risk management: drawdown, Sharpe ratio, margin call simulation during tests