Skip to content
View dluksza's full-sized avatar

Block or report dluksza

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
dluksza/README.md

Hi, I'm Darek 👋

I've been writing software for two decades, and shipping it for nearly that long. My code lives in Gerrit (the review infrastructure behind Android and Chromium), in HabitChallenge (263K+ downloads on Android and iOS), and now in quantedge-ta, a Rust crate for streaming technical analysis. Self-taught since 11. GSoC alumnus, Eclipse Top Contributor 2011.

Currently: quantedge, a Rust workspace for streaming-first systematic trading. The first crate, quantedge-ta, is on crates.io. Engine, sim, and order book are next.

Available for Rust / Flutter contract work. Reach me on LinkedIn.


What I'm Building

quantedge is a Cargo workspace for systematic trading in Rust. Streaming-first by design.

The thing most TA libraries get wrong: they treat the current bar as final. In live trading, the bar you care about is the one still forming, ticking second by second. quantedge makes that explicit in the type system. A strategy declares exactly what it reads up front, the engine surfaces only that, and tests panic loudly the moment evaluation drifts from declaration.

use quantedge_strategy::{
    EmaConfig, MarketSide, MarketSignal, MarketSignalConfig,
    MarketSnapshot, SignalGenerator, Timeframe, nz,
};

#[derive(Default)]
struct EmaCross { ema9: EmaConfig, ema21: EmaConfig }

impl SignalGenerator for EmaCross {
    fn id(&self) -> &'static str { "ema_9_21_cross" }
    fn name(&self) -> &'static str { "EMA9/EMA21 cross (H4)" }

    // Declare exactly what evaluate() will read.
    // Anything undeclared panics in tests via FakeEngine.
    fn configure<C: MarketSignalConfig>(&self, c: C) -> C {
        c.require_closed_bars(1)
            .require_timeframes(&[Timeframe::HOUR_4])
            .register(&self.ema9)
            .register(&self.ema21)
    }

    fn evaluate(&self, snap: &impl MarketSnapshot) -> Option<MarketSignal> {
        let h4 = snap.for_timeframe(Timeframe::HOUR_4);
        let prev = h4.closed(0)?;       // last closed bar
        let now  = h4.forming();        // currently-building bar

        let (p9, p21) = (prev.value(&self.ema9)?, prev.value(&self.ema21)?);
        let (n9, n21) = (now.value(&self.ema9)?, now.value(&self.ema21)?);

        (p9 <= p21 && n9 > n21).then(|| {
            MarketSignal::from_forming(self, snap, Timeframe::HOUR_4, "bull_cross")
                .with_side(MarketSide::Long)
                .add_reason("bull_cross", "EMA9 crossed above EMA21")
                .build()
        })
    }
}

crates.io downloads docs.rs CI codecov


Background

  • 🦀 Rust today, three languages of trading-bot scar tissue. Built the same trading system across Dart, Elixir, and Rust. The Dart version still runs unattended with 1yr+ uptime. The Rust version became quantedge.
  • 📦 Contributed to Gerrit Code Review and JGit, the code-review and Java Git stack used by Android, Chromium, and LibreOffice.
  • 🎓 GSoC alumnus. Apache Cocoon, eGit (Eclipse Foundation). Eclipse Top Contributor 2011.
  • 📱 Mobile. Flutter, React Native. Conference talks at Flutter London and Confitura Warsaw

Selected Projects

Project Stack Status
quantedge Rust Active workspace. First crate quantedge-ta on crates.io; engine/sim/order book in flight.
HabitChallenge Flutter / Dart 263K+ downloads, 4.7★ (Play Store · App Store)
screenful Lua / AwesomeWM Stable, 160+ ⭐

Writing

I write about software engineering and open source at luksza.org.


Reach me

LinkedIn X Blog


London. Building things that compound.

Pinned Loading

  1. quantedge quantedge Public

    Streaming-first Rust toolkit for systematic trading. 21 verified indicators today; engine, sim, order book next.

    Rust 2 2