Trading Background

Get your trading algorithms off the ground

Connect to any broker, automate order execution and manage the complete trade life-cycle

Register for Free

End-to-end implementation guides

The Learn section provides detailed, fully worked examples of trading strategies implemented on the Quantstrip platform — covering signal generation, order execution, position management, and post-trade reconciliation.

Each guide documents both the underlying strategy rationale and the specific platform integration, providing a reference implementation that can be adapted to other strategies and instruments. Browse examples →

Strategy Performance

Continuous execution via persistent background services

Each strategy is deployed as an isolated process — referred to as a client — registered with a system-level background service that initialises on startup and maintains execution across sessions. Clients are fully isolated: each has its own schedule, log stream, and database connection with no shared state between processes.

The Client Monitor provides a consolidated operational view: active clients, health status, start timestamps, and runtime error reporting — accessible via a locally hosted browser interface. Client lifecycle operations require no terminal access.

Client Monitor showing running strategies

Integrated Dashboard

The Quantstrip dashboard is a locally hosted web application providing a suite of purpose-built tooling: a Python IDE for authoring and deploying client code, a SQL editor for direct database access, a portfolio reporting module, a notification centre, and a settings manager.

All applications read from and write to the same underlying data model. Query results in the SQL editor reflect the same records rendered in the reporting module — there is no data transformation layer or synchronisation step between views.

Quantstrip integrated dashboard

Canonical trade lifecycle schema

Orders, executions, commissions, and position events are persisted to a structured SQLite database bundled with the platform. The schema is normalised around the complete trade lifecycle — from order submission through execution confirmation to commission settlement — providing a consistent, audit-ready record without requiring user-defined table structures.

Direct SQL access is available via the dashboard SQL editor, and all tables are exposed through the db_handler API for programmatic access from client code.

Quantstrip database schema

Platform resources accessible directly from client code

The Quantstrip Python library provides structured access to all platform integration points through five focused modules. The interface is intentionally narrow: rather than a general-purpose framework, it covers the operational concerns common to all production strategies — scheduling, persistence, notifications, configuration, and logging.

my_strategy.py
from quantstrip import ClientBase, db_handler, email_manager, settings
import logging

# All strategies extend ClientBase.
# Scheduling, persistence, and lifecycle
# management are provided by the base class.

class MyStrategy(ClientBase):

    def __init__(self, *args):
        super().__init__()
        self.display_name = "My Strategy"
        self.db = db_handler
        self.scheduler.every().day.at("16:00").do(self.job)

    def job(self):
        signal = self.compute_signal()
        self.db.insert_strategy_event(
            strategy_id="my_strat",
            symbol="SPY",
            event_type=signal
        )
        alloc = settings.get("my_strat.allocation")
        email_manager.send_summary(signal)
ClientBase
Base class for all connected clients. Provides built-in scheduling, lifecycle hooks, error handling, and registration with the background service.
db_handler
CRUD methods for every table in the canonical data model — orders, executions, positions, strategy events, commissions, and more.
email_manager
Compose and dispatch structured email notifications and end-of-day summaries. Supports multiple SMTP accounts and configurable recipients per client.
settings
Typed, runtime access to the platform settings tree — strategy parameters, connectivity credentials, allocation targets, and flags. Secrets stored encrypted.
logger
Central rotating log system with per-client streams, a 30-day retention window, and module-level formatting. Visible live in the dashboard logging view.

Portfolio performance reporting and data access

The Reporting module aggregates realised PnL across all registered strategies and produces cumulative equity curves, drawdown analysis, and return distribution histograms over configurable time horizons. Per-strategy statistics include annualised Sharpe ratio, maximum drawdown, trade count, and win rate.

All figures are derived directly from the platform database with no intermediate transformation step. Reported metrics are consistent with the raw execution records in the SQL editor — there is no reconciliation step between the two views.

For custom analysis, the database is accessible via the dashboard SQL editor using pre-built analytical queries covering trade-level PnL attribution, commission analysis, return on invested capital, and position history. Queries can be extended or replaced with user-defined SQL without modifying any platform components.

The database is also accessible via a pre-configured ODBC connection. Pre-defined views are available directly in Microsoft Excel, enabling bespoke PnL attribution, risk analysis, and portfolio reporting without any intermediate data export.

SQL editor and pre-built analytical queries Portfolio performance report — cumulative PnL and drawdown

Compatible with any broker offering a Python SDK or REST API

Quantstrip does not impose a proprietary connectivity layer. Any broker that provides a Python SDK or REST API can be integrated directly within a client. Broker-specific event handling — order status updates, execution reports, commission notifications — is mapped to the canonical Quantstrip data model by the client implementation, keeping integration code isolated and maintainable.

Trade lifecycle: order, execution and commission flow
Pre-built integration
Interactive Brokers
  • Order submission — market, limit, and bracket orders
  • Real-time execution and commission event capture
  • Historical OHLCV data retrieval
  • Position and account reconciliation via Flex Web API
  • OAuth authentication support via ibind
Custom integration

Brokers offering a Python SDK — such as Alpaca, Tradier, or Interactive Brokers via third-party wrappers — or any REST API can be integrated using the standard client pattern. The IB implementation serves as a structural reference. Once normalised to the Quantstrip data model, execution events are handled identically regardless of the originating broker.

Reference implementations and worked examples

Quantstrip includes a library of annotated example clients covering order submission, multi-leg execution flows, position reconciliation, and end-of-day reporting. Examples are structured as reference implementations — documented to support adaptation rather than direct reuse.

The platform ships with a bundled Python 3.11 installation and a PyPI package manager accessible from the dashboard. The Python IDE supports client development, simulation, and deployment to the production environment without requiring an external development toolchain.

Quantstrip Python IDE with example clients

Centralised infrastructure services for all clients

Logging, configuration management, and email notification are provided as platform-level services, available to every client through the Python API. This eliminates the need to implement these concerns independently per strategy and ensures consistent behaviour across the deployment.

Logging

A central rotating log system with per-client log streams, module-level formatting, and a 30-day retention window. All output is visible in the dashboard Logging view and written to disk for offline review.

Settings

Strategy parameters, connectivity credentials, asset lists, and allocation targets are defined in a typed settings tree, separate from client code. Secrets are stored encrypted. Values are accessible at runtime via the settings module without file I/O.

Notifications

Outbound email is managed through a central account configuration supporting multiple SMTP accounts, message batching, and per-client recipient lists. End-of-day summaries and runtime error alerts are dispatched automatically.