Video in the works
AlgoStudio
Generating market data, backtesting a strategy, and the warnings panel.

About the project
AlgoStudio lets you create realistic market data, describe a trading strategy as settings in a file, test how it would have done (a backtest), and let a search find better settings.
AlgoStudio is a workbench for trading-strategy research. Instead of testing one idea by hand, you generate market data for different conditions, describe strategies as JSON, backtest them, and let a search find the best settings.
It was a two-day prototype, public on GitHub. Its most useful part turned out to be the warnings: most "best" strategies looked good on Sharpe ratio while losing money.
How it works
Make market data
Pick a market mood, such as trending, ranging, volatile, breakout or reversal, and get realistic prices.
Describe a strategy
Entry and exit signals, risk and position rules, written as JSON from templates.
Backtest
With stop loss, take profit, trailing stops, cooldowns and fees.
Search
A parallel search tries many settings and keeps the best for each dataset.
Check
Warnings flag results that mislead, like a good Sharpe ratio with a negative return.
Under the hood
- Dashboard
- Streamlit with Plotly candlestick charts.
- Engine
- pandas and numpy, with RSI, MACD, Bollinger Bands, EMA, ATR and stochastic indicators.
- Models
- LSTM code written but never trained. The strategies come from search.
What I did
- A market-data generator with 7 market moods: trending up or down, ranging, volatile, breakout, reversal, consolidation
- A backtester with stop loss, take profit, trailing stops, cooldowns and fees, reporting return, Sharpe, drawdown and win rate
- A JSON strategy language with templates for risk, positions, entry and exit signals
- Indicator features: RSI, MACD, Bollinger Bands, EMA, ATR, stochastic and volume
- A parallel search that finds the best settings for each dataset
- A Streamlit dashboard with candlestick charts, a backtesting lab and saved assets
- Warnings that flag misleading results, like a good Sharpe ratio with a negative return
What was new
- Sharpe alone misleads: 10 of my first 12 "best" strategies lost money despite a positive Sharpe
- Treating strategy tuning as a learning problem, with the best settings found by search as labels
- Loading heavy ML libraries lazily inside Streamlit
Problems I hit, and how I fixed them
Loading TensorFlow and PyTorch together froze the dashboard.
Fix Lazy imports, pinned thread counts and a lighter optimiser.
The optimiser picked strategies with high Sharpe but negative returns, and position sizes up to 50%.
Fix A score that punishes losses and drawdown, caps on position size and stop loss, and a warnings panel.
Signal names and units didn't match between the strategy config and the backtester, so trades were wrong or missing.
Fix A mapping layer for names and units.
Generated datasets grew to about 210 MB.
Fix Kept them out of git.
Screenshots
Screenshots in the works
Real screens from AlgoStudio go here.
To be clear
The dashboard's training screen is a simulation, and no trained model exists. The model code (an LSTM and an LSTM with attention) is written, but the strategies come from search, not a trained model. The README's mention of GRU and Transformer models goes further than the code.