Blog

  • Reading liquidity before you size a position

    A strategy that looks robust in a backtest can fall apart the moment it meets a real order book. The usual culprit is sizing that assumes liquidity the market will not actually provide.

    Depth is not volume

    Daily volume tells you how much traded over a session. It does not tell you how much you can move right now without shifting the price against yourself. Those are different questions, and only the second one governs your fill.

    A practical check

    Before sizing, we measure the cost of consuming the book to a target depth and compare it against the edge the signal claims. If expected slippage eats a meaningful share of expected edge, the position is too large regardless of what the risk model says.

    This is unglamorous and it removes trades from the book. It also removes most of the trades that would have lost money on execution alone.

  • How we run reconciliation across venues

    Every trading system eventually confronts the same question: does what we think we hold match what the venue thinks we hold? Reconciliation answers it, and it is the least glamorous component in the stack.

    The problem

    Orders can fill partially. Acknowledgements arrive out of order or not at all. A venue can restate a fill hours later. Any of these leaves your internal ledger disagreeing with the exchange, and the disagreement compounds silently until someone looks.

    Design

    We treat reconciliation as a queue of small, independently retryable jobs rather than a nightly batch. Each job compares one position against one venue snapshot and emits a discrepancy record if they disagree. Jobs that fail repeatedly move to a dead-letter queue instead of blocking the pipeline.

    What we learned

    Two things. First, retention matters as much as correctness: a queue that keeps every failed job forever will exhaust memory long before it exhausts patience, so failed records need a bounded lifetime. Second, a growing dead-letter queue is a signal, not a resting state — if nothing consumes it, it is just a slower way to lose data.

  • Welcome to the RicoMatrix blog

    We have been running quantitative strategies and building the infrastructure behind them for a while without writing much of it down. This blog fixes that.

    What to expect

    Three kinds of posts: market commentary when conditions are worth remarking on, engineering write-ups when we build something we would have wanted to read about, and research notes when a piece of strategy work produces a result worth sharing.

    We would rather publish fewer posts that are specific than a steady stream of generalities. Expect detail, numbers, and the occasional account of something that did not work.

    A standing disclaimer

    Nothing here is investment advice. Descriptions of strategies are not recommendations, and past results do not predict future ones.