lrvx
Framework for building trading systems.
pip install lrvx
npm install @lrvx/lrvx
What it does
- One strategy class runs backtest, paper and live.
- Backtests replay recorded tick tapes. The same tape gives the same result, and CI checks that on every change.
- Strategies in Python, Node.js, Codon or C++; a C API for anything else.
- Connectors: Bybit, Bitget, Hyperliquid, Polymarket.
- Venue module: matching engine, FIX 4.4 and SBE gateways, journal, checkpoints.
lrvx-mcp: an MCP server, so Claude Code, Cursor or Cline can scaffold, validate and backtest a strategy.
import lrvx
class SMACross(lrvx.Strategy):
def __init__(self, symbols):
super().__init__(symbols)
self.fast = lrvx.SMA(10)
self.slow = lrvx.SMA(30)
def on_trade(self, ctx, trade):
f = self.fast.update(trade.price)
s = self.slow.update(trade.price)
if f is None or s is None:
return
if f > s and ctx.is_flat():
self.market_buy(0.01)
elif f < s and ctx.is_long():
self.close_position()
# same class: backtest, paper, live
bt = lrvx.BacktestRunner(
registry, fee_rate=0.0004, initial_capital=10_000
)
bt.set_strategy(SMACross([btc]))
stats = bt.run_csv("btcusdt_1m.csv", "BTCUSDT")
MITopen source
330+ testsin CI on Linux, macOS, Windows
Three runnersbacktest, paper, live
docs.lrvx.devtutorials, how-tos, API reference
Services
We build on lrvx for teams: trading system setup, custom connectors and execution, venue infrastructure.