quaver

Contents

  • Getting Started
    • Installation
      • Optional extras
      • Install from source
    • Quick Example
    • Available Strategies
  • Strategy Guides
    • Mean Reversion Strategy
      • The idea in one sentence
      • Financial background
      • How it works
      • Signal logic
        • BUY signal — “oversold, expect a bounce”
        • SELL signal — “overbought, expect a pullback”
        • No signal
      • Worked example
      • When it works well
      • When it struggles
      • Key concepts
        • Simple Moving Average (SMA)
        • Divergence
        • Threshold
      • Parameters
        • Tuning guidelines
    • Regime Mean Reversion Strategy
      • The idea in one sentence
      • Financial background
      • How it works — overview
      • Step 1 — Technical indicators
        • Average Directional Index (ADX)
        • Bollinger Bands and Bollinger Band Width (BBW)
        • Relative Volume
        • Simple Moving Averages (SMA 20 / SMA 50)
        • Daily Returns
      • Step 2 — Regime classification
        • The 10 regimes
        • Example: reading a regime
      • Step 3 — Expanding-window probability
        • Base probability (all regimes)
        • Regime-specific probability
        • Win/loss ratio
        • Expanding window
        • Minimum events
        • Example
      • Step 4 — Signal generation
        • BUY (uptrend regimes: TREND_WEAK_UP or TREND_STRONG_UP)
        • SELL (downtrend regimes: TREND_WEAK_DOWN or TREND_STRONG_DOWN)
        • No signal cases
        • Confidence
      • Worked example — full pipeline
      • The safety margin parameter
      • VIX filtering (Phase 2 — not yet implemented)
        • What is the VIX?
        • How VIX filtering works
      • Parameters
        • Indicator parameters
        • Regime thresholds
        • Signal thresholds
        • Data parameters
        • Tuning guidelines
    • VSA Stopping Volume Strategy
      • The idea in one sentence
      • Financial background
      • How it works
        • Computed features
        • Trend filter
        • Volume-Spread Matrix
      • Signal logic
        • BUY signal — “stopping volume at the bottom”
        • SELL signal — “distribution at the top”
        • No signal
        • Confidence
      • Worked example
      • When it works well
      • When it struggles
      • Key concepts
        • Volume Spread Analysis (VSA)
        • Stopping Volume
        • Absorption
        • Close Position
      • Parameters
        • Lookback parameters
        • Volume-Spread Matrix thresholds
        • Stopping-volume pattern thresholds
        • Pattern toggles
        • Tuning guidelines
    • Breakout from Consolidation
      • What Is This Strategy?
      • Key Concepts Explained
        • Moving Average (MA50)
        • Price Range
        • ATR (Average True Range)
        • Volume
        • 20-Day High
      • Strategy Rules — Step by Step
        • Step 1 — Trend Filter
        • Step 2 — Confirm Consolidation
        • Step 3 — Confirm Volatility Compression
        • Step 4 — Breakout Trigger
        • Step 5 — Volume Confirmation
        • Step 6 — Stop Loss
        • Step 7 — Exit
      • Visual Example
      • Minimal Working Example (Python)
        • Sample Output
        • How to Interpret the Output
      • When This Strategy Works Best
      • When to Avoid It
    • Pullback in Trend (Trend Continuation)
      • What Is This Strategy?
      • Key Concepts Explained
        • Moving Average (MA)
        • RSI (Relative Strength Index)
        • ATR (Average True Range)
      • Strategy Rules — Step by Step
        • Step 1 — Confirm the Uptrend
        • Step 2 — Identify the Pullback
        • Step 3 — Confirm the Pullback Is “Healthy”
        • Step 4 — Enter the Trade
        • Step 5 — Set the Stop Loss
        • Step 6 — Set the Target
      • Visual Example
      • Minimal Working Example (Python)
        • Sample Output
        • How to Interpret the Output
      • When This Strategy Works Best
      • When to Avoid It
    • Reversal at Support (Mean Reversion Swing)
      • What Is This Strategy?
      • Key Concepts Explained
        • Moving Average (MA20, MA50, MA200)
        • RSI (Relative Strength Index)
        • Support Level
        • Structural Downtrend (What to Avoid)
        • Bullish Reversal Candle
      • Strategy Rules — Step by Step
        • Step 1 — Exclude Structural Downtrends
        • Step 2 — Confirm Extreme Oversold
        • Step 3 — Price at or Near Support
        • Step 4 — Bullish Entry Trigger
        • Step 5 — Stop Loss
        • Step 6 — Target
      • Visual Example
      • Minimal Working Example (Python)
        • Sample Output
        • How to Interpret the Output
      • When This Strategy Works Best
      • When to Avoid It
  • API Reference
    • Types
      • SignalDirection
        • SignalDirection.BUY
        • SignalDirection.SELL
        • SignalDirection.HOLD
        • SignalDirection.CLOSE
      • SignalStrength
        • SignalStrength.STRONG
        • SignalStrength.MODERATE
        • SignalStrength.WEAK
      • TimeFrame
        • TimeFrame.M1
        • TimeFrame.M5
        • TimeFrame.M15
        • TimeFrame.H1
        • TimeFrame.H4
        • TimeFrame.D1
        • TimeFrame.W1
      • ExitReason
        • ExitReason.SIGNAL
        • ExitReason.STOP_LOSS
        • ExitReason.TAKE_PROFIT
        • ExitReason.TRAILING_STOP
        • ExitReason.END_OF_DATA
      • InstrumentType
        • InstrumentType.STOCK
        • InstrumentType.ETF
        • InstrumentType.BOND
        • InstrumentType.COMMODITY
        • InstrumentType.CRYPTO
        • InstrumentType.INDEX
        • InstrumentType.UNKNOWN
      • EngineInfo
        • EngineInfo.slug
        • EngineInfo.name
        • EngineInfo.description
        • EngineInfo.parameter_schema
        • EngineInfo.universe_constraints
        • EngineInfo.default_parameters
    • Strategies
      • Base Classes
        • SignalOutput
        • UniverseFilter
        • BaseStrategy
        • MultiAssetStrategyOutput
        • MultiAssetStrategy
      • Registry
        • DuplicateEngineError
        • EngineNotFoundError
        • StrategyRegistry
      • Indicators
        • sma()
        • true_range()
        • wilder_smooth()
        • adx()
        • bollinger_bands()
        • bollinger_band_width()
        • rolling_percentile()
        • daily_returns()
        • volume_relative()
        • atr()
        • rsi()
        • rolling_max()
        • rolling_min()
        • ema()
        • macd()
        • stochastic()
        • obv()
        • vwap()
        • cci()
        • donchian()
        • keltner()
      • Mean Reversion
        • MeanReversionStrategy
      • Regime Mean Reversion
        • ProbabilityResult
        • RegimeMeanReversionStrategy
      • VSA Stopping Volume
        • VSAStoppingVolumeStrategy
      • Pairs Mean Reversion
        • PairsMeanReversionStrategy
      • Breakout from Consolidation
        • BreakoutConsolidationStrategy
      • Pullback in Trend
        • PullbackTrendStrategy
      • Reversal at Support
        • ReversalSupportStrategy
    • Backtest
      • Runner (Convenience Functions)
        • run_backtest()
        • run_multi_asset_backtest()
      • Engine (Single-Asset)
        • BacktestEngine
      • Multi-Asset Engine
        • MultiAssetBacktestEngine
      • Portfolio
        • CommissionConfig
        • SlippageConfig
        • ExitRules
        • OpenPosition
        • TradeRecord
        • Portfolio
      • Result
        • BacktestResult
      • Data Utilities
        • normalise_candles()
        • validate_candles()
  • Changelog
    • v0.1.2 — 2026-03-09
      • Features
      • Documentation
      • Bug Fixes
      • Chore
    • v0.1.0 — 2026-03-08
      • Features
      • Documentation
      • CI/CD
      • Bug Fixes
      • Style
quaver
  • quaver documentation
  • View page source

quaver documentation

quaver is a standalone Python library for quantitative trading signal generation and walk-forward backtesting.

Contents

  • Getting Started
    • Installation
    • Quick Example
    • Available Strategies
  • Strategy Guides
    • Mean Reversion Strategy
    • Regime Mean Reversion Strategy
    • VSA Stopping Volume Strategy
    • Breakout from Consolidation
    • Pullback in Trend (Trend Continuation)
    • Reversal at Support (Mean Reversion Swing)
  • API Reference
    • Types
    • Strategies
    • Backtest
  • Changelog
    • v0.1.2 — 2026-03-09
    • v0.1.0 — 2026-03-08

Indices and tables

  • Index

  • Module Index

  • Search Page

Next

© Copyright 2024, Massimo Gollo.

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