Reproducible backtesting framework for validating Remora's impact on Freqtrade strategies
Remora is a market awareness layer specifically built for Freqtrade strategies. It answers the question: "Should I be trading at all right now?" - not "Is this a good entry signal?"
Remora adds a thin, transparent, fail-safe risk layer that blocks trades during high-risk market conditions, helping Freqtrade users reduce drawdowns and improve risk-adjusted performance.
Key Features:
- ✅ Simple API call - not a plugin
- ✅ Fully transparent - returns reasoning, not just boolean
- ✅ Fail-safe design - fail-open by default
- ✅ Easy to remove - just delete a few lines
- ✅ Multiple data sources with redundancy/failover
This repository enables independent verification of Remora's impact on Freqtrade strategies through comprehensive backtesting. All results are reproducible, and the complete methodology is documented.
- Reconstructs historical Remora risk data (6 years of data)
- Runs backtests comparing baseline Freqtrade strategies vs Remora-enhanced strategies
- Tests across multiple market regimes (bull, bear, sideways, mixed)
- Generates comprehensive metrics and visualisations
- Provides complete reproducibility for independent validation
See the detailed analysis: Advanced Risk Management for Freqtrade
Summary of Backtest Results (6 years, 4 strategies, 20 tests):
- +1.54% profit improvement
- +1.55% drawdown reduction
- 4.3% of trades filtered (high-risk periods avoided)
- Improved risk-adjusted returns across all market regimes
All results are Freqtrade-specific and validated using real Freqtrade strategies.
# Install Freqtrade (required)
# See: https://www.freqtrade.io/en/stable/installation/
# Install Python packages
pip install -r requirements.txt# Fetch OHLCV data for Freqtrade backtesting
python fetch_data_robust.py --pair BTC/USDT --timeframe 5m --start 2020-01-01 --end 2025-12-31
# Fetch external market data (VIX, DXY, Fear & Greed, etc.)
python historical_remora/historical_data_fetcher.py --start 2020-01-01 --end 2025-12-31
# Build Remora history
python build_remora_history.py# Run all backtests (baseline vs Remora-enhanced Freqtrade strategies)
./run_backtests.sh
# Or run Python script directly
python run_backtests.pyResults are saved in results/ directory:
- JSON files with detailed metrics
- Comparison files showing baseline vs Remora
- Summary reports
- Visualisations (equity curves, drawdown comparisons, etc.)
All strategies are standard Freqtrade strategies with Remora integration:
- NFI Quickstart - Simple moving average crossover
- MACD Cross - MACD line crossover strategy
- RSI + EMA - RSI and EMA trend following
- Bollinger Breakout - Bollinger Band breakout
Each strategy has:
- Baseline version - Standard Freqtrade strategy
- Remora-enhanced version - Same strategy with Remora risk filtering
Remora filtering is added via confirm_trade_entry() method:
def confirm_trade_entry(self, pair, order_type, amount, rate, time_in_force, **kwargs):
# REMORA: Check if current market conditions are safe to trade
if not remora_allows(timestamp=current_time):
return False # Block trade during high-risk periods
# Your existing strategy logic continues unchanged
return TrueSee the integration examples and blog post for detailed, color-coded examples.
Backtests cover multiple market regimes to validate Remora across different conditions:
- 2020-2021: Bull market
- 2022: Bear market (critical for drawdown protection)
- 2023-2024: Sideways/choppy market (hardest environment for algos)
- 2024-2025: Mixed conditions
- 2020-2025: Full 6-year period (maximum statistical power)
- Total profit %
- Total number of trades
- Win rate %
- Profit factor
- Sharpe ratio
- Sortino ratio
- Maximum drawdown
- Exposure time
- Average trade duration
- % of trades filtered out (high-risk periods avoided)
- Average risk_score of losing trades
- Average risk_score of winning trades
- Distribution of returns by risk_class
- Distribution of returns by regime
- % of losing trades occurring during Remora high-risk periods
Everything required to reproduce the tests is included:
- ✅ Historical data fetching scripts
- ✅ Remora history builder
- ✅ All Freqtrade strategies (baseline and Remora-enhanced)
- ✅ Backtest execution scripts
- ✅ Visualisation scripts
- ✅ Complete methodology documentation
See METHODOLOGY.md for detailed methodology.
- Main Website: remora-ai.com
- Blog Post (Detailed Analysis): Advanced Risk Management for Freqtrade
- API Documentation: remora-ai.com/api-docs.php
- Live Status: remora-ai.com/status.php
- Freqtrade: freqtrade.io
- Freqtrade Integration Examples: remora-freqtrade repository
- remora-freqtrade: Freqtrade integration examples and onboarding guides
- remora-backtests: This repository - reproducible backtesting framework
- ✅ Lets you know if current market conditions are safe to trade in
- ✅ Blocks trades during high-risk periods (volatility spikes, regime changes, etc.)
- ✅ Provides full transparency (returns reasoning, not just boolean)
- ✅ Uses multiple data sources with redundancy and failover
- ❌ Does not replace your Freqtrade strategy logic
- ❌ Does not optimise entry/exit signals
- ❌ Does not require complex configuration
- ❌ Does not lock you in (easy to remove)
- Reduced Drawdowns: Avoid trading during high-risk market conditions
- Improved Risk-Adjusted Performance: Better Sharpe and Sortino ratios
- Transparency: See exactly why trades were blocked
- Fail-Safe: If Remora is unavailable, trades proceed normally (fail-open)
- Easy Integration: Simple API call, not a plugin
For detailed setup instructions, see SETUP_GUIDE.md.
No historical data available:
- Run data fetching scripts first
- Check data directory permissions
Backtests fail:
- Ensure Freqtrade is installed and configured
- Check that strategies are in the correct location (
user_data/strategies/) - Verify OHLCV data is available for the time period
Missing Remora history:
- Run
build_remora_history.pyfirst - Ensure external data is fetched
For issues or questions:
- Open an issue in this repository
- Check the METHODOLOGY.md for technical details
- Visit remora-ai.com for documentation
See LICENSE file for details.
Built for Freqtrade | Remora Website | Blog Post | Freqtrade

