# solo76 — solo76 Engine > A high-performance backtesting and trading engine for C++ and Python, shipped as a licensed binary library that runs entirely on the customer's own premises. A strategy can now be written with AI in minutes; finding out whether it is real did not get cheaper, and that is the part this library is — position accounting through a reversal, exposure at the instant of the fill, the order refused before it is sent, and one yardstick applied to every candidate whatever wrote it. Five nodes make every robot: an Input turns ticks into a number, a Pattern watches Inputs and fires, a Rule turns a firing into an order, a Robot owns a set of Rules, an Account owns the robots. Every trade a Rule orders is one of four position verbs: Entry from flat, Rebalance on the same side, Flip across zero, Exit to exactly zero; an order that breaks the quantity bound of its verb is refused. > solo76 sells software, not financial services. The solo76 Engine is a licensed binary library that runs on the customer's own machines. solo76 is not a broker, an exchange, a fund or an investment adviser. It never takes custody of money or assets, never holds a customer account, never places an order on anyone's behalf, and gives no investment advice. It holds no financial-regulator licence because it provides no financial service: the software is a tool the customer runs, against venues and data feeds the customer chooses and contracts with directly. ## Product - [Overview](https://solo76.com/): what the engine does, what it does not do, supported platforms. - [AI](https://solo76.com/ai): why cheap model generation raises the value of a verified engine, and how to point any local or public AI service at this library. - [Why not LEAN, and why not build it yourself](https://solo76.com/alternatives): an honest comparison against QuantConnect LEAN and against an in-house engine, stating where each of those wins, plus the source-code escrow offered on request against vendor risk. - [Audit trail](https://solo76.com/audit-trail): what a compliance or risk reviewer can establish from the engine's insert-only trade journal, which lives on the customer's own filesystem — the rule and robot behind each execution, the market and execution timestamps, the exposure snapshots taken the instant before the fill — plus what the record does not carry today and why nothing of it can travel in the licence check. - [Robot examples](https://solo76.com/examples): 37 worked examples, each in C++ and Python, each linked to its source. - [Benchmarks](https://solo76.com/benchmarks): two sections kept apart — Connection, the measured latency and throughput of the connection library against boost::beast and the kernel loopback ceiling; and Engine, a MACD robot over 320 591 minute bars against LEAN on the same machine, 1.2 times faster from C++ and 1.5 times faster from Python, with the method, the machine and every measured cell. - [Pricing](https://solo76.com/pricing): the rate per actively running robot per day that will apply once billing opens; while the project is starting, every customer gets a renewable trial license of at least one month instead of a purchase. - [Release notes](https://solo76.com/release-notes): version history. Also as Markdown: https://solo76.com/release-notes.md ## Documentation - [Documentation](https://solo76.com/docs): overview articles — installation, API overview, architecture, the cross-language workflow. - [API overview](https://solo76.com/docs/api-overview). Also as Markdown: https://solo76.com/docs/api-overview.md - [How a robot works](https://solo76.com/docs/architecture). Also as Markdown: https://solo76.com/docs/architecture.md - [Research in Python, production in C++](https://solo76.com/docs/cross-language-workflow). Also as Markdown: https://solo76.com/docs/cross-language-workflow.md - [Installation](https://solo76.com/docs/installation). Also as Markdown: https://solo76.com/docs/installation.md - [API reference](https://solo76.com/reference): the complete reference, published as one indexable page per chapter. - [Full reference as one Markdown file](https://solo76.com/llms-full.txt): every chapter of the reference in one text file, version 6.0.0.0, ABI 11. - [Disclaimer](https://solo76.com/reference/00-disclaimer): The solo76 Engine, this website and the services offered on it are provided "as is" and "as available", without warranty of any kind, express or implied, including warranties of merchantability, fitness for a particular purpose and non-infringement. Also as Markdown: https://solo76.com/reference/00-disclaimer.md - [What the engine does](https://solo76.com/reference/01-what-the-engine-does): The solo76 Engine is a high-performance backtesting and trading engine. It processes large data volumes, handles complex portfolios, produces extensive statistics, and makes ML and AI models straightforward to integrate. Also as Markdown: https://solo76.com/reference/01-what-the-engine-does.md - [How a robot works](https://solo76.com/reference/02-how-a-robot-works): The engine does not execute a program you write; it runs a graph you declare. Also as Markdown: https://solo76.com/reference/02-how-a-robot-works.md - [Risk management](https://solo76.com/reference/03-risk-management): Every robot in this engine trades against a constraint, and the first architectural decision you make about a strategy is where that constraint is evaluated. Also as Markdown: https://solo76.com/reference/03-risk-management.md - [Input](https://solo76.com/reference/04-input): An input is the entry node of a robot: a named, duration-stamped cache of a processed time series, built over a set of contracts on one market-data adapter. Also as Markdown: https://solo76.com/reference/04-input.md - [Pattern](https://solo76.com/reference/05-pattern): A pattern is the decision node of a robot: it observes one or more inputs, referenced by their labels, and emits a trading signal whenever its condition holds. Also as Markdown: https://solo76.com/reference/05-pattern.md - [Rule](https://solo76.com/reference/06-rule): A rule is the bridge between observation and action: it listens to one event source and, on each firing, emits one fully specified instruction — an order, an amend of an in-flight order, or a whole transaction group. Also as Markdown: https://solo76.com/reference/06-rule.md - [Robot](https://solo76.com/reference/07-robot): A robot is the execution node at the top of a robot graph. Also as Markdown: https://solo76.com/reference/07-robot.md - [Account](https://solo76.com/reference/08-account): The account is the root object of every run: every handle other than a market adapter is created from it, and every result is read back through it. Also as Markdown: https://solo76.com/reference/08-account.md - [The environment](https://solo76.com/reference/09-the-environment): Everything a robot runs inside of — the shared library itself, the process-wide initial parameters, the contracts and currencies the engine is monomorphized for, the duration grid, thread placement. Also as Markdown: https://solo76.com/reference/09-the-environment.md - [The order book](https://solo76.com/reference/10-the-order-book): The engine ships three order-book implementations, one per market-data depth level, and the export layer mirrors them behind a single handle type. Also as Markdown: https://solo76.com/reference/10-the-order-book.md - [Timeserie tools](https://solo76.com/reference/11-timeserie-tools): tse_timeserie.h exports the engine's own CSV reader and writer as first-class handles, plus the timeserie utilities the engine uses internally. Also as Markdown: https://solo76.com/reference/11-timeserie-tools.md - [Statistics](https://solo76.com/reference/12-statistics): tse_statistics.h exports the engine's own statistics subsystem: the sixty-five entry points behind which stand the measures the engine itself uses to score a run. Also as Markdown: https://solo76.com/reference/12-statistics.md - [Built-in input processors](https://solo76.com/reference/13-built-in-input-processors): An input turns every tick into a number, and until now that number came from a callable you wrote. Also as Markdown: https://solo76.com/reference/13-built-in-input-processors.md - [Examples](https://solo76.com/reference/14-examples): The examples live in a dedicated repository: github.com/andreysolovyev381/tse. Also as Markdown: https://solo76.com/reference/14-examples.md - [Appendix](https://solo76.com/reference/15-appendix): This appendix collects the reference tables that the preceding chapters rely on: the numeric values of every enumeration exported by tse_enums.h, tse_duration.h, tse_log.h and tse_protection.h. Also as Markdown: https://solo76.com/reference/15-appendix.md - [Audit trail](https://solo76.com/reference/16-audit-trail): A compliance officer, a risk officer or a regulator opens this record with one question: for a given order that left this installation, what decided to send it, against what state, and when. Also as Markdown: https://solo76.com/reference/16-audit-trail.md - [Guides](https://solo76.com/guides): step-by-step articles on building robots. - [Build a MACD robot](https://solo76.com/guides/build-a-macd-robot). Also as Markdown: https://solo76.com/guides/build-a-macd-robot.md - [Plug in an ML model](https://solo76.com/guides/plug-in-an-ml-model). Also as Markdown: https://solo76.com/guides/plug-in-an-ml-model.md - [Two places where risk can live](https://solo76.com/guides/risk-management). Also as Markdown: https://solo76.com/guides/risk-management.md - [Questions and answers](https://solo76.com/faq): what solo76 is and is not — broker, custody, regulation, where data and strategy logic go, and what happens to the licensee if solo76 stops being around. ## Example groups - Hello world: Brings a robot up from nothing: the process-wide configuration, the full assembly, a parameter sweep, several feeds, the saved recipe, the swap that takes it live, and the four position verbs a rule can speak. - Robots: Builds strategies with that assembly, changing the code inside one callable and the parameters on the rules and nothing else. - Risk: Adds risk control, in the form the engine computes inside itself and in the form that rests at the venue. - Statistics: Reads the statistics back: the blotter of retained fills, the per-period scores, and a model that ranks candidates on them. - Everything else: Collects the facilities that surround a running engine: cores, currency, storage, manual booking, bulk controls and the data toolkit. ## Examples - [01 Initial parameters](https://github.com/andreysolovyev381/tse/tree/main/01%20hello%20world%20-%20initial%20params): No robot — process-wide configuration only; each account captures the data folder at construction. - [02 MACD](https://github.com/andreysolovyev381/tse/tree/main/02%20hello%20world%20-%20macd): Input: MACD of the close → Patterns: thresholds against zero → Rules: market entry and exit. - [02.1 Built-in inputs](https://github.com/andreysolovyev381/tse/tree/main/02.1%20hello%20world%20-%20built-in%20inputs): Inputs: two shipped simple moving averages → Pattern: crossover → Rules: market entry and exit. - [03 Grid search](https://github.com/andreysolovyev381/tse/tree/main/03%20hello%20world%20-%20grid%20search): One robot built four times by the grid runner — a fresh account per lookback, the same history. - [03.1 Grid search over several parameters](https://github.com/andreysolovyev381/tse/tree/main/03.1%20hello%20world%20-%20grid%20search%2C%20multiple%20parameters): A grid over a table of period pairs: three fast against two slow, six independent runs. - [04 Multiple contracts](https://github.com/andreysolovyev381/tse/tree/main/04%20hello%20world%20-%20multiple%20contracts): Inputs: average AAPL close, average BTC mid → Patterns: threshold and peak → Rules: market entry and limit exit on WTI. - [05 Multiple adapters](https://github.com/andreysolovyev381/tse/tree/main/05%20hello%20world%20-%20multiple%20adapters): Inputs: 50-day and 200-day AAPL averages → Pattern: crossover → Rules: entry and exit; BTC/USDT is subscribed for marking only. - [06 Save / Load — Research → Production](https://github.com/andreysolovyev381/tse/tree/main/06%20hello%20world%20-%20save%20load): One graph, two processes: Python saves the recipe, C++ loads it, binds each Input to a fresh adapter and starts. - [07 Live trading](https://github.com/andreysolovyev381/tse/tree/main/07%20hello%20world%20-%20trading): Input: MACD → Patterns: two thresholds at zero → Rules: market entry and exit; both ends swapped — a market-data client replays into the adapter, a broker callback replaces the Simulator. - [07.1 Basic rules](https://github.com/andreysolovyev381/tse/tree/main/07.1%20hello%20world%20-%20basic%20rules): Input: last trade price → Patterns: six timestamps one second apart → Rules: one per step — entry, rebalance, flip, rebalance, flip, exit — every order at the market; no indicator, no file of history, no selection criterion. - [08 Gradient-boosted model](https://github.com/andreysolovyev381/tse/tree/main/08%20robots%20-%20gbm%20model): Input: model forecast from mid, spread and quote imbalance → Patterns: thresholds at zero → Rules: market entry and exit. - [09 Rebalance](https://github.com/andreysolovyev381/tse/tree/main/09%20robots%20-%20rebalance): Patterns: two timestamps → Rules: one market entry and one rebalance that adds to the open position. - [10 Market maker](https://github.com/andreysolovyev381/tse/tree/main/10%20robots%20-%20market%20maker): Inputs: two book feeds splitting client flow → Patterns: eight formulas reading the live position → Rules: eight orders whose size comes from the signal, four per side — entry, reduce, close and top-up — the two top-ups taking their price and side from the signal too. - [11 Market maker with amendments](https://github.com/andreysolovyev381/tse/tree/main/11%20robots%20-%20market%20maker%20amend): Input: recorded prints → Patterns: outsized trade, same-side run, quiet gap → Rules: cancel, replace and modify on the one resting quote. - [12 Voting group](https://github.com/andreysolovyev381/tse/tree/main/12%20robots%20-%20voting%20group): Input: signed sum of three robots' fills on an executed-trade adapter → Patterns: two thresholds → Rules: entry and exit for a fourth robot. - [13 Order-book imbalance](https://github.com/andreysolovyev381/tse/tree/main/13%20robots%20-%20book%20imbalance): Input: built-in book imbalance over an L3 book → Patterns: thresholds at +0.2 and −0.2 → Rules: entry and exit on each side. - [14 The same signal on L1, L2 and L3](https://github.com/andreysolovyev381/tse/tree/main/14%20robots%20-%20book%20ofi): The graph of 13 unchanged; the only line that differs is the book's construction — L1, L2 or L3. - [15 Cross-venue book arbitrage](https://github.com/andreysolovyev381/tse/tree/main/15%20robots%20-%20book%20arbitrage): Inputs: imbalance on an L2 book and on an L3 book → Patterns: formulas comparing the two → Rules: entry and exit in a third contract. - [16 Multileg butterfly](https://github.com/andreysolovyev381/tse/tree/main/16%20robots%20-%20multileg%20butterfly): Patterns: two timestamps → Rule: one multileg transaction of three option legs, filled together or not at all. - [17 Multileg strangle hedge](https://github.com/andreysolovyev381/tse/tree/main/17%20robots%20-%20multileg%20strangle%20hedge): Patterns: two timestamps → Rule: one multileg transaction of a future and three option legs. - [18 Internal risk calculation](https://github.com/andreysolovyev381/tse/tree/main/18%20risk%20-%20internal%20calc): Risk policies gate the order before it is sent; risk rules watch the position and fire on the unrealized-P&L ratio. Neither takes a Pattern. - [19 Fixed bracket](https://github.com/andreysolovyev381/tse/tree/main/19%20risk%20-%20external%20tools,%20bracket%20fixed): Pattern: three-over-ten crossover → Rule: one bracket — an entry leg plus a fixed stop and a fixed target resting at the venue. - [20 Trailing bracket](https://github.com/andreysolovyev381/tse/tree/main/20%20risk%20-%20external%20tools,%20bracket%20trailing): Pattern: fifty-over-two-hundred crossover → Rule: one bracket with a trailing stop and a fixed target. - [21 OCO and amendments](https://github.com/andreysolovyev381/tse/tree/main/21%20risk%20-%20external%20tools,%20oco%20and%20amends): Patterns: timestamps → Rules: cancel, modify and replace on a resting limit order, and one OCO pair on an open position. - [22 Transaction and robot statistics](https://github.com/andreysolovyev381/tse/tree/main/22%20stats%20-%20transaction%20and%20robot): One crossover robot; the statistics are read back off the account afterwards, not declared in the graph. - [22.1 Multithreaded ex-post](https://github.com/andreysolovyev381/tse/tree/main/22.1%20stats%20-%20multithreaded%20ex-post): Eight crossover robots, each on a contract of its own fed the same WTI bars; the scores are computed on every core. - [22.2 Resuming ex-post](https://github.com/andreysolovyev381/tse/tree/main/22.2%20stats%20-%20resuming%20ex-post): The WTI run of example 22, saved and then re-entered three ways. - [23 Candidate selection](https://github.com/andreysolovyev381/tse/tree/main/23%20stats%20-%20candidate%20selection): Five robots from the grid runner, each scored through ex_post; a booster ranks the score rows and picks one. - [23.1 Candidate selection, multithreaded](https://github.com/andreysolovyev381/tse/tree/main/23.1%20stats%20-%20candidate%20selection,%20multithreaded): The five candidates of example 23; each finished account is scored twice, on one thread and on every core. - [24 Core affinity](https://github.com/andreysolovyev381/tse/tree/main/24%20misc%20-%20core%20affinity): One AAPL trend follower run twice, once unpinned and once with the inputs and the blotter nailed to cores. - [25 Multicurrency](https://github.com/andreysolovyev381/tse/tree/main/25%20misc%20-%20multicurrency): Patterns: two timestamps → Rules: one entry and one exit; the only variable is the account's currency. - [26 Storage regimes](https://github.com/andreysolovyev381/tse/tree/main/26%20misc%20-%20storage%20regimes): The same crossover graph twice; the only variable is the account's storage regime. - [27 Manual booking](https://github.com/andreysolovyev381/tse/tree/main/27%20misc%20-%20manual%20booking): No graph at all — a contract registered straight with the portfolio, and fills booked by hand. - [27.1 Seeded position](https://github.com/andreysolovyev381/tse/tree/main/27.1%20misc%20-%20seeded%20position): An account created already holding ten of a contract at a hundred, with nothing traded and nothing journaled. - [28 Bulk actions](https://github.com/andreysolovyev381/tse/tree/main/28%20misc%20-%20bulk%20actions): Rules: one market entry and one resting limit exit, then the bulk actions addressed by robot label. - [29 Timeserie tools](https://github.com/andreysolovyev381/tse/tree/main/29%20misc%20-%20timeserie%20tools): No robot — the CSV reader, the slicing transforms and the writer run as one pipeline. - [30 Statistics](https://github.com/andreysolovyev381/tse/tree/main/30%20misc%20-%20statistics): A field of the bar projected into a flat array, then the measures asked directly. ## Legal - [Terms of Service](https://solo76.com/tos) - [EULA](https://solo76.com/eula) - [Disclaimer](https://solo76.com/disclaimer) - [Privacy](https://solo76.com/privacy) - [Third-Party Licenses](https://solo76.com/third-party-licenses) - [Refund Policy](https://solo76.com/refund-policy)