Adaptive Stop-Loss & Position-Sizing Framework for Systematic Equity Strategies
A private quantitative investor engaged Marsbridge to design a parametric risk-control engine that could sit beneath multiple technical-signal families and operate across tens of thousands of equities. We delivered a multi-stage stop-loss + dual-regime trailing exit model, and a backtest harness to study drawdowns and path risk.
Customer
The client's objective was to transform discretionary pattern ideas into measurable, defensible rules with explicit risk controls, so that signals could be tested and—if warranted—deployed with repeatable stop and exit policies rather than ad-hoc discretion.
Challenge
From Pattern Ideas to Defensible Risk Rules
Pattern detections produced mixed visual quality; the client asked for explicit stop-loss and exit frameworks to quantify hit-rate, drawdown and expectancy across very large universes.
- From 'nice charts' to defensible risk rules: Pattern detections produced mixed visual quality; explicit stop-loss and exit frameworks needed to quantify hit-rate, drawdown and expectancy
- Scale and liquidity: Research needed to run over 10k+ securities (US + European venues)
- Team-usable controls: Simple control panel ('mask') to enter weights/thresholds and apply the same risk logic consistently in live trading via IBKR
- Avoiding look-ahead & bias: Risk engine had to be compatible with signal timestamps, enforce 'detect-then-act' causality, and keep evaluation logic clean
Solution
Parametric Risk-Control Engine
Marsbridge fielded a compact squad—Quant Lead, Risk Engineer, Data Engineer, and Execution/IBKR Integrator—to (1) harden large-universe data, (2) codify multi-stage stops and trailing exits, (3) scale runs + reporting, and (4) prepare an IBKR-ready parametric entry/exit "mask."
Large-universe data & liquidity hygiene
Built a multi-exchange EOD warehouse (US + XETRA/PA/SW/MI/VX, etc.), with automated updates and PDF batch exports for review. Introduced a fast liquidity screen to filter out illiquid names.
Multi-stage stop-loss and trailing-exit model
Implemented ATR-based stop levels with configurable multipliers and dual-regime trailing exits that adapt to volatility conditions. Created signal-agnostic integration layer compatible with multiple pattern detectors.
Backtest harness & reporting
Vectorized runner to compute per-scenario statistics over large universes; improved detector speed by ~200× to enable full-universe sweeps and generate multi-hundred-page PDFs for analyst review.
IBKR execution mask (parametric UI)
Prepared a frontend mask and parameter spec for IBKR integration, allowing consistent application of risk rules in live trading without hand-rewriting orders.
Technologies & tools
Python, NumPy, Pandas
EOD multi-exchange equities, US + EU venues, Universe management
Interactive Brokers TWS/API, Parametric order mask
PDF chart exporters, Vectorized runners
Process
Data foundation—EOD ingest, multi-exchange coverage. Quality & liquidity pass—fast screening. Risk framework design—multi-stage stops, trailing exits. Signal-agnostic wiring—compatible with multiple detectors. Backtests & review—vectorized runs, PDF generation. IBKR mask prep—parametric UI for live trading.
- Data foundation
- Quality & liquidity pass
- Risk framework design
- Signal-agnostic wiring
- Backtests & review
- IBKR mask prep
Team
Results
- 38k+ Securities: Full-universe coverage with fast execution
- 200× Faster: Vectorized detector performance improvement
- Multi-Stage: Adaptive stop-loss and trailing exit system
Delivered a reusable risk-control engine with multi-stage stops and trailing exits. Achieved end-to-end runs across ~38k equities with vectorized performance. Implemented liquidity realism through fast pre-filtering. Provided IBKR-ready parameter mask for live deployment.
Make Risk a First-Class Feature
Need a stop/exit policy you can actually trust? We turn discretionary ideas into parametric risk engines—wired into your signals and your broker.
Request a Consultation
Drop us a line! We are here to answer your questions within 1 business day.
What happens next?
Once we’ve received and processed your request, we’ll get back to you to detail your project needs and generally sign an NDA to ensure confidentiality.
After examining your project requirements, our team will devise a proposal with the scope of work, team size, time, and cost estimates.
We’ll arrange a meeting with you to discuss the offer and nail down the details.
Finally, we’ll sign a contract and start working on your project with agreed timeline