Skip to content

Meridian

Backtest a trading idea in 15 lines of Python.

pip install open-meridian
from meridian import LocalClient, SignalEngine

client = LocalClient(starting_cash=100_000)
client.load_bars("AAPL", "prices.csv")

class Momentum(SignalEngine):
    def on_data(self, window):
        bars = window.bars("AAPL", lookback=20)
        if len(bars) >= 20:
            ret = (bars[-1].close - bars[0].close) / bars[0].close
            if ret > 0.03:
                self.submit_order("AAPL", "BUY", 100)

Momentum(client).run(warmup=20)

print(client.positions())   # What you hold
print(client.cash())        # Cash remaining
print(client.fills())       # Trade history

That's it. No infrastructure. No Docker. No API keys. Just Python and your idea.


What Can You Build Today?

Test a trading idea in 5 minutes

Have an idea for a momentum strategy? A mean reversion signal? Load a CSV, write a few lines of Python, and see if it actually works. No spreadsheets, no infrastructure — just you and your hypothesis.

Quick Start Momentum example

Track your own portfolio

Tired of checking five brokerage apps? Load your positions into Meridian and see everything in one place — what you hold, what you paid, your P&L, your trade journal. All in Python, all under your control.

Risk parity rebalancer

Compare strategies head to head

Run momentum, mean reversion, and pairs trading on the same data. Same starting cash, same time period. See which one actually makes money — and which one you just thought would work.

Strategy Gallery — 5 runnable examples

Build something and share it

Built a cool indicator? A new data adapter? A smarter rebalancer? Package it as a plugin and share it with other developers. They can install it with one command.

Build Your First Plugin


How It Works

Meridian is a kernel + plugin ecosystem. The kernel handles the infrastructure — message routing, order lifecycle, position tracking, access control, audit logging. You build the interesting parts as plugins.

Plugins talk to the kernel through a sidecar on localhost:9191. They never talk to each other directly — they communicate through the message bus. This means you can swap, upgrade, or replace any plugin without touching the others.

Data sources → Signal engines → Order management → Execution → Broker
    ↑                                                            │
    └──── Positions, fills, audit trail ←────────────────────────┘
  1. Data plugins publish market data to the bus
  2. Signal engines subscribe to data, generate trading signals
  3. Order management receives signals, applies compliance checks, clears orders
  4. Execution routes orders to brokers, manages child orders, aggregates fills
  5. The kernel records every transaction — positions, cash, fills, audit trail

All of this is event-sourced. Every state change is a message on the bus. Every message is logged. If a plugin crashes and restarts, it recovers its state from the event log automatically.

Why Plugins?

Most trading platforms are monoliths — if you want to change one piece, you change everything. Meridian is the opposite:

  • Your compliance vendor sucks? Swap the compliance plugin. Your signal engines, execution, and reporting don't change.
  • Found a better execution algorithm? Deploy it as a new plugin alongside the old one. Compare performance. Switch when ready.
  • Need a custom data source? Write a data gateway plugin in 200 lines of Python. It publishes to the bus; everything downstream just works.
  • Want to sell your plugin? List it in the marketplace. Every deployment on Meridian can install it.

Architecture at a Glance

                     ┌─────────────────────────┐
                     │    Management UI         │
                     └───────────┬─────────────┘
                     ┌───────────▼─────────────┐
                     │    Bus API (gRPC/HTTP)   │
                     │    Execution Kernel      │
                     └──┬──┬──┬──┬──┬──┬──┬──┘
                        │  │  │  │  │  │  │
          ┌─────────────┤  │  │  │  │  │  ├─────────────┐
          │             │  │  │  │  │  │  │             │
     ┌────▼───┐    ┌───▼──▼┐ │ ┌▼──▼┐ │ ┌▼────┐   ┌───▼───┐
     │Sidecar │    │Sidecar│ │ │Side│ │ │Side │   │Sidecar│
     │   +    │    │  +    │ │ │ +  │ │ │ +   │   │  +    │
     │ Data   │    │Signal │ │ │OMS │ │ │Brkr │   │Valua- │
     │Gateway │    │Engine │ │ │    │ │ │Adapt│   │ tion  │
     └────────┘    └───────┘ │ └────┘ │ └─────┘   └───────┘

Every plugin runs alongside a sidecar that handles pub/sub, access control, health monitoring, and state recovery. Plugins communicate only with their local sidecar on localhost:9191 — never directly with the bus or other plugins.

Get started in 5 minutes

pip install open-meridian
Write a momentum strategy, backtest it against historical data, and see positions — all locally, no infrastructure needed. Follow the Quick Start.

Next Steps

I want to... Go here
Try it now (5 min) Quick Start
See runnable examples Strategy Gallery
Understand the architecture Architecture Overview
Build a plugin Your First Plugin
Connect to a broker Building a Broker Adapter
Contribute Contributing

Community

  • GitHub — source code, issues, discussions
  • Discord — ask questions, share what you're building, get help

SDKs

Language Status Install
Python Production-ready (84 API operations) pip install open-meridian
Go Production-ready (84 API operations) go get github.com/Societal-Lab-Inc/meridian-go
Java In development Coming soon
C++ In development Coming soon
Rust In development Coming soon

License

  • meridian-core (kernel): Apache License 2.0
  • SDKs (Python, Go): Business Source License 1.1 — free for plugin development and trading. Converts to Apache 2.0 after 4 years.