Skip to content

Tutorials

Interactive Jupyter notebook tutorials with complete code examples, visualizations, and detailed explanations.


Getting Started

Level: Beginner

Topics: Data fetching, ArcticDB storage, datasets, visualization

Learn the fundamentals of chronos-lab through hands-on examples. This tutorial covers:

  • Fetching OHLCV data from Yahoo Finance and Intrinio
  • Storing and retrieving data with ArcticDB
  • Working with datasets for securities metadata
  • Creating and storing visualizations
  • Understanding configuration and file storage

Open Tutorial


Interactive Brokers Market Data

Level: Intermediate

Topics: Interactive Brokers integration, real-time data, streaming bars, tick data, contracts

Learn how to access real-time and historical market data from Interactive Brokers. This tutorial covers:

  • Connecting to IB Gateway/TWS and managing connections
  • Understanding IB Contracts and handling symbol ambiguity
  • Fetching historical data with sync and async methods
  • Subscribing to streaming bar data for real-time updates
  • Working with real-time tick data (bid/ask spreads)
  • Direct access to IB API functions (market depth, etc.)
  • Storing IB data to ArcticDB

Open Tutorial


OHLCV Anomaly Detection

Level: Intermediate

Topics: Time series isolation forest anomaly detection, visualization, inspecting calculation pipeline

Learn how to detect anomalies in OHLCV (Open, High, Low, Close, Volume) financial data using chronos-lab's analysis pipeline. This tutorial covers:

  • Fetching historical price data from multiple sources
  • Running the anomaly detection algorithm
  • Visualizing results with charts
  • Saving results to datasets for later use
  • Inspecting the calculation pipeline

Open Tutorial


Getting Started with Tutorials

Prerequisites

Before running these tutorials, install chronos-lab with the required extras:

# For Getting Started and OHLCV Anomaly Detection tutorials
uv pip install chronos-lab[yfinance,arcticdb,analysis,visualization]

# For Interactive Brokers tutorial (also requires IB Gateway/TWS)
uv pip install chronos-lab[ib,arcticdb,visualization]

Running Locally

  1. Clone the repository:

    git clone https://github.com/vitaliknet/chronos-lab.git
    cd chronos-lab
    

  2. Install dependencies:

    uv sync --all-extras
    

  3. Launch Jupyter:

    jupyter notebook notebooks/
    

Online Viewing

All tutorials are rendered with outputs (including charts) directly in the documentation. You can view them without installing anything!


Contributing Tutorials

Have a great use case or analysis workflow? We'd love to see your tutorial!

Guidelines: - Focus on real-world use cases - Include clear explanations and comments - Save notebooks with outputs (charts, tables) - Add markdown cells for context - Test that code runs end-to-end

Submit tutorials via GitHub pull requests.