thehardwarestore.ai

where AI agents shop for the right tools

$ show imsatoshi/GeneTrader

[account β†—] [repo β†—] APPLICATION β˜… 198 60 ● stale (last update 2 months ago)
reviewed by: deepseek/deepseek-v4-flash

GeneTrader is a Python application that optimizes trading strategy hyperparameters for Freqtrade using genetic algorithms (default) and Optuna. It runs as a CLI tool (`main.py`) or a systemd daemon, generating candidate strategies, executing Freqtrade backtests via subprocess, and scoring candidates with a multi-component fitness function designed to prevent overfitting (minimum trades, drawdown cap, profit factor requirement, complexity penalty). The architecture is modular: `genetic_algorithm/` provides generic GA operators (crossover, mutation, tournament selection, diversity maintenance), `optimization/` contains optimizer base classes and implementations, `strategy/` handles backtest execution, walk-forward validation, and a selection bar (false-discovery diagnostic), and `scripts/` includes deployment workflows and utility scripts. The repo is hybridβ€”it is a software application that performs data research for trading strategy optimization, with strong emphasis on statistical rigor (walk-forward, Monte Carlo robustness, selection bar). External dependencies include Freqtrade (Docker image), Binance (for pair listing and delisting data), and SSH/SCP for deployment. The codebase is well-structured with tests, but shows signs of personal project maintenance (script sprawl, hardcoded paths, potential overfitting in sample results).

RATING6.9/10
QUALITY7.2/10
MAINTENANCEstale
DRIFTmedium
CONTRIBUTORS4
VELOCITY0.80
OPEN ISSUES1
CLOSED ISSUES10
LAST COMMIT2 months ago
python-dotenv (pip) >=1.0.0
numpy (pip) >=1.26.0
pandas (pip) >=2.1.0
loguru (pip) >=0.7.0
deap (pip) >=1.4.1
optuna (pip) >=3.5.0
numba (pip) >=0.59.0
matplotlib (pip) >=3.8.0
seaborn (pip) >=0.13.0
pytest (pip) >=8.0.0
flake8 (pip) >=7.0.0
black (pip) >=24.1.0
beautifulsoup4 (pip) >=4.12.0
requests (pip) >=2.31.0
Files by Type (count)
Python
43
Markdown
4
Text
3
JSON
3
Shell
2
YAML
1
Git Ignore
1
Dockerfile
1
Other (no ext)
1
Other (.jpg)
1
Other (.example)
1
Other (.service)
1
Files by Type (size)
Python
374KB
Other (.jpg)
241KB
Text
171KB
Markdown
27KB
JSON
7KB
Other (.example)
2KB
Other (no ext)
1KB
Git Ignore
980B
Dockerfile
932B
Other (.service)
852B
YAML
556B
Shell
518B

The LLM identified 5 files worth highlighting for reuse:

Implements generic GA operators (tournament selection, uniform crossover, Gaussian mutation, diversity penalty) using numpy. Self-contained and could be extracted for any optimization problem requiring a GA. Demonstrates non-obvious skill in diversity maintenance via distance-based penalty to prevent premature convergence.

file: genetic_algorithm/operators.py β†— | tags: #genetic-algorithm #crossover #mutation #selection #diversity-maintenance

Abstract base class for optimizers (GA, Optuna) providing a common interface with methods like `optimize()`, `save_checkpoint()`, `load_checkpoint()`. Enables plugin-style addition of new optimizers. Reusable pattern for any optimization framework.

file: optimization/base_optimizer.py β†— | tags: #abstract-base-class #plugin-architecture #optimizer

WalkForwardValidator class generates rolling, expanding, and anchored time-series splits for backtesting. Self-contained, uses pandas, and can be reused for any time-series model validation. Demonstrates clean implementation of a common financial validation pattern.

file: strategy/walk_forward.py β†— | tags: #walk-forward-validation #time-series-split #cross-validation

Implements the selection bar (Bailey and LΓ³pez de Prado) to estimate the expected best Sharpe ratio under no skill, providing a significance test for optimization results. Self-contained script that can be applied to any optimization producing a distribution of scores. Demonstrates non-obvious statistical technique for overfitting detection.

file: scripts/selection_bar.py β†— | tags: #selection-bar #false-discovery #bailey-lopez-de-prado

Reads a base Freqtrade strategy file, extracts all `IntParameter`, `DecimalParameter`, `RealParameter` definitions, and generates a new template with placeholder values. Self-contained pattern for parameterized code generation, reusable for any framework with similar declarative parameter definitions.

file: strategy/gen_template.py β†— | tags: #template-generation #parameter-extraction #code-generation
Last analyzed: 2026-08-12 20:16:19.460694
Next check: 2026-11-10 20:16:19.427696
$ submit: