Overview

dagobert is an abandoned algorithmic crypto trading research project. I built it with my good friend and co-founder over roughly 1,000 hours across 2019–2021 with the audacious goal of building a fully automated trading system that would make us rich within a year or two.

It failed spectacularly at that goal. But we learned an enormous amount about financial machine learning, signal processing, time series modelling, and - most importantly - developed a healthy skepticism toward anyone claiming you can reliably make money in day trading without being at a top-tier hedge fund. Simple ML models, moving average crossovers, and RSI-based strategies are not edges. They’re noise traps dressed up as insights.

Details

We put an incredible amount of time into going through Marcos Lopez De Prado’s Advances in Financial Machine Learning in detail and painstakingly implementing the pseudo-code and math in there as unit-tested and speed-optimized Python code. We added a huge amount of code for

  • automatic, at-scale data ingestion from crpyto exchanges
  • advanced financial feature engineering and selection
  • financial & temporal cross-validation
  • hyper specific financial labelling to turn this data into a supervised problem
  • implementing temporal convolutional nets to learn on this data
  • adding a fully custom Proximal Policy Optimisation (PPO) agent for portfolio allocation across multiple crypto assets:
    • Actor-Critic architecture with a Dirichlet distribution output head for continuous portfolio weights
    • Multi-head parallel environment for simultaneous simulation across instruments
    • Configurable reward shaping, transaction cost modelling
    • Parallel worker rollout collection
    • Based loosely on the PGPortfolio paper architecture with significant modifications

At one point I got extremely deep into PPO and how to fine-tune it. To give you a sense, this is the research ticket I wrote - to myself - while nearly going insane 3 times.

Even though this was a research project - well before any AI or agentic coding - we documented all functions rigorously, used type-hints (in 2019) and achieved 90% test coverage. We must have spent at least 200 hours on just writing, checking and reviewing those damn tests. Then we spent about $6k of GPU credits to tune our TCN models and RL environment separately and made exactly zero dollars. LOL.

My advice

If you’re here because you want to build a trading bot that makes money: my honest advice is don’t, unless you’re prepared to spend years on it and have access to proprietary data and infrastructure that the rest of the market doesn’t have.

If you’re here because you want to learn financial ML, study time series modelling, or need battle-tested building blocks for a research pipeline - this codebase might genuinely save you hundreds of hours.

Updated: