Professionals

Opt-in modules for advisors, funds, and regulated desks: accounts, audit trail, secrets, calendars, live feeds.

The Professionals section covers modules you only need when running Horizon against client capital. If you are backtesting or trading your own account, skip this and use Quick Mode or the pipeline.

Everything here is opt-in. The core SDK does not require any of it, and existing Tier 1 to 3 code keeps working unchanged when these modules are added.

The gradient

Horizon is layered so you adopt only what you need:

Tier 1. Research and backtesting

The default. Write strategies, backtest, iterate. No accounts, no audit log, no secrets vault.
python
import horizon as hz
from horizon.quant import BollingerMeanRev

result = (hz.pipe("AAPL", "MSFT")
    .strategy(BollingerMeanRev(window=20))
    .kelly(fraction=0.25)
    .backtest(bars=252, cash=100_000))

Tier 2. Paper or imperative trading

One trader, one account, testing ideas in paper. See [Imperative API](/docs/venues/imperative-api).
python
ex = hz.connect("paper", initial_cash_usd=100_000)
ex.buy("AAPL", qty=10, limit=180.0)

Tier 3. Full pipeline, single portfolio

A live strategy for a personal or prop book. `hz.run()` drives the pipeline end to end. See [first strategy](/docs/first-strategy).
python
hz.run(mode="backtest", strategies=[MyStrat],
       universe=["AAPL", "MSFT"])

Tier 4. Professional

Managing money for others. Opt into persistent accounts with a per-account IPS, an immutable audit trail, a secrets vault, exchange calendars, and live feeds.
python
from horizon.accounts import AccountRegistry, Account, InvestmentPolicyStatement
from horizon.audit import AuditLog, SQLiteSink
from horizon.secrets import EnvSecrets
from horizon.calendars import NYSECalendar

registry = AccountRegistry()
registry.add_account(Account(..., ips=InvestmentPolicyStatement(...)))

log = AuditLog(sink=SQLiteSink("audit.db"))
secrets = EnvSecrets()
calendar = NYSECalendar()

hz.run(mode="live", accounts=registry, audit_log=log,
       secrets=secrets, calendar=calendar, ...)

What’s in this section

PageTopic
RoadmapWhat’s shipped (L0/L1), what’s next, what’s out of scope.
Accounts and IPSHousehold, Client, Account, Custodian. Investment Policy Statement per account. Per-account asset class allowlists. SMA vs. Fund vs. firm prop.
Order lifecycleFIX-style order states, client_order_id idempotency, extended VenueOrder / VenueFill fields (NBBO, liquidity, exchange of execution), TIF enum, tax-lot election.
Audit trailHash-chained event log. SQLite WORM sink. Daily anchor hashes. Rule 204-2 / 17a-4 context.
SecretsSecrets Protocol. How venues read credentials without touching os.environ. Backends: env var, dict (tests), vault adapters.
Market calendarsExchangeCalendar Protocol. NYSE holidays and half-days. AlwaysOpen for crypto. ResolutionCalendar for prediction markets.
Live feedsLiveFeed Protocol for real-time quotes with heartbeat, reconnect, and surfaced sequence gaps. Null feed for tests.
Alpaca adapterConcrete REST and WebSocket venue. Paper and live.

Do I need this?

  • Trading your own money. No. Tier 1 to 3 is enough.
  • Trading your own money, want better records. Read Audit trail. The immutable log is useful without regulatory pressure.
  • Series 65 advisor, or running an RIA. Read every page. Plan the compliance program around this infrastructure.
  • Running a 3(c)(1) or 3(c)(7) fund. Same as RIA, plus watch for the L2 fund NAV / units / subscriptions module on the roadmap.
  • Building a multi-tenant SaaS around Horizon. This section does not cover tenant isolation, RBAC, or rate limiting. Contact the maintainers first.

What this is not

This SDK provides the technical substrate a compliance program needs: immutable records, pre-trade controls, auditable state. It is not a turnkey compliance program. Form ADV filings, the Business Continuity Plan, the Code of Ethics, the advisory agreement, and custodian relationships remain the firm’s and counsel’s responsibility. The SDK produces the records your rules reference.