Skip to main content
Version: latest

Getting Started

To get started with PoseiTrader, you will need:

  • A way to run Python scripts or Jupyter notebooks for backtesting and/or live trading.

Installation

The Installation guide will help to ensure that PoseiTrader is properly installed on your machine.

Quickstart

The Quickstart provides a step-by-step walk through for setting up your first backtest.

Examples in repository

The online documentation shows just a subset of examples. For the full set, see this repository on GitHub.

The following table lists example locations ordered by recommended learning progression:

Directory Contains
examples/a Fully runnable, self-contained Python examples.
docs/tutorials/ Jupyter notebook tutorials demonstrating common workflows.
docs/concepts/ Concept guides with concise code snippets illustrating key features.
posei_trader/examples/ Pure-Python examples of basic strategies, indicators, and execution algorithms.
tests/unit_tests/ Unit tests covering core functionality and edge cases.

Backtesting API levels

PoseiTrader provides two different API levels for backtesting:

API Level Description Characteristics
High-Level API Uses BacktestNode and TradingNode Recommended for production: easier transition to live trading; requires a Parquet-based data catalog.
Low-Level API Uses BacktestEngine Intended for library development: no live-trading path; direct component access; may encourage non–live-compatible patterns.

Backtesting involves running simulated trading systems on historical data.

To get started backtesting with PoseiTrader you need to first understand the two different API levels which are provided, and which one may be more suitable for your intended use case.

info

For more information on which API level to choose, refer to the Backtesting guide.

Backtest (low-level API)

This tutorial runs through how to load raw data (external to Posei) using data loaders and wranglers, and then use this data with a BacktestEngine to run a single backtest.

Backtest (high-level API)

This tutorial runs through how to load raw data (external to Posei) into the data catalog, and then use this data with a BacktestNode to run a single backtest.

Running in docker

Alternatively, a self-contained dockerized Jupyter notebook server is available for download, which does not require any setup or installation. This is the fastest way to get up and running to try out PoseiTrader. Bear in mind that any data will be deleted when the container is deleted.

  • To get started, install docker:
  • From a terminal, download the latest image
    • docker pull ghcr.io/poseitrader/jupyterlab:nightly --platform linux/amd64
  • Run the docker container, exposing the jupyter port:
    • docker run -p 8888:8888 ghcr.io/poseitrader/jupyterlab:nightly
  • Open your web browser to localhost:{port}
info

PoseiTrader currently exceeds the rate limit for Jupyter notebook logging (stdout output), this is why log_level in the examples is set to ERROR. If you lower this level to see more logging then the notebook will hang during cell execution. A fix is currently being investigated which involves either raising the configured rate limits for Jupyter, or throttling the log flushing from Posei.