Skip to content
All library documents

Self-Trade Prevention Risks with Independent Spread-Taking Algorithms

Article vn.py community

Summary

The post describes a live-trading incident in which two instances of a spread-taking algorithm sent opposite orders in the same contract, and the broker executed them against each other. The author asks whether VeighNa has an in-process self-trade prevention mechanism, noting that they could not find confirmation in the risk manager, documentation, or forum. Because the algorithm instances run as independent processes, the author doubts that a simple strategy-level change can guarantee prevention.

This is an unresolved question rather than a documented solution: it provides no confirmation of VeighNa's capabilities, no mitigation procedure, and no frequency or impact data beyond describing the event as very rare. It nevertheless highlights a concurrency risk in multi-instance trading systems: separate processes can make conflicting decisions before either sees the other's order. The account does not establish whether prevention belongs in the framework, gateway, or broker, so readers should treat it as a system-design concern requiring verification across the execution stack.

Key ideas

  • Two independent spread-taking algorithm instances reportedly submitted opposite orders in the same contract.
  • The resulting broker execution caused the user's account to trade against itself.
  • The author could not verify whether VeighNa's risk manager prevents self-trades.
  • Independent processes can create coordination gaps that simple strategy changes may not fully resolve.
  • The post asks a question and supplies no confirmed mechanism or tested remedy.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.