mktlib

Getting Started

  • Installation
  • Quick Start
  • Advanced Usage: Grid Search Optimization
  • See Also

API Reference

  • Backtest
  • Metrics
  • Scheduling
  • Rates
  • Reports
  • Data
mktlib
  • mktlib
  • View page source

mktlib

Polars-native financial market toolkit.

GitHub | PyPI | Changelog

Getting Started

  • Installation
    • Requirements
    • Install from PyPI
    • Optional extras
    • Install from source
    • Verify installation
  • Quick Start
    • Vectorized Backtesting
    • Financial Metrics
    • Exchange Scheduling
    • Treasury Rates
    • Performance Reports
    • Synthetic Data Generators
  • Advanced Usage: Grid Search Optimization
    • Generate Synthetic Data
    • Define a Parameterized Strategy
    • Grid Search over SMA Periods
    • Add Take-Profit / Stop-Loss Optimization
    • Analyze Results
    • Multi-Symbol Grid Search
    • See Also
  • See Also
    • Polars Plugins (mktlib dependencies)
    • Technical Analysis
    • Data Validation

API Reference

  • Backtest
    • Overview
    • Engine
    • Types
    • Conditions
    • Column Expressions
    • Performance
  • Metrics
    • Overview
    • Metric Enum
    • Dispatcher
    • Return Metrics
    • Risk-Adjusted Ratios
    • Tail Risk
    • Forward-Looking Estimators
    • Win/Loss
    • Drawdown
  • Scheduling
    • get_calendar()
    • ExchangeCalendar
    • ExchangeCalendarWithBreaks
    • Holiday Rules
  • Rates
    • MeanMethod
    • TreasuryRate
    • get_mean_treasury_rate()
    • get_risk_free_rate()
    • get_treasury_rates()
    • get_treasury_spread()
  • Reports
    • html()
    • metrics()
    • Result and Configuration
    • Forward-Looking Risk (Monte Carlo)
  • Data
    • Stochastic Differential Equations
    • OHLCV Aggregation
    • Monte Carlo

Indices and tables

  • Index

  • Module Index

Next

© Copyright 2025, Matt Buck.

Built with Sphinx using a theme provided by Read the Docs.