Skip to content

Latest commit

 

History

315 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ta4 main chart

Welcome to the ta4j Wiki

ta4j gives you the building blocks for technical-analysis-driven systems in Java: bar series, indicators, rules, strategies, reports, and a unified trading-record model that now spans backtests, paper trading, and live execution.

The current wiki reflects ta4j's newer unified trading stack:

  • BaseTradingRecord is the default trading-record implementation for both backtests and live or paper-trading flows.
  • BarSeriesManager is the default single-strategy backtest driver and now accepts either its own default record factory or a record you provide.
  • BacktestExecutor builds on BarSeriesManager when you want to rank or tune many strategies at once, including weighted normalized leaderboards.
  • Manual loops are still the right tool when orders and fills are decoupled, partial fills matter, or your broker confirms executions asynchronously.
  • LiveTradingRecord and ExecutionFill remain available only as 0.22.x compatibility facades. New code should use BaseTradingRecord and TradeFill.

Choose your audience path

What’s Newer On Current Master

  • Configurable backtest execution models: BarSeriesManager and BacktestExecutor can now stay on the default next-open model or switch to current-close, slippage, or stop-limit execution.
  • Weighted strategy ranking: BacktestExecutionResult#getTopStrategiesWeighted(...) and WeightedCriterion let you rank strategies by a normalized composite score instead of a single raw metric.
  • One trade-record story for partial fills: New code can stream TradeFill values directly with TradingRecord.operate(fill) or group an order with Trade.fromFills(...), then inspect getCurrentPosition() and getOpenPositions() on the same record.
  • Broader analysis surface: Recent current-master additions include SharpeRatioCriterion, SortinoRatioCriterion, CalmarRatioCriterion, OmegaRatioCriterion, and volume pressure indicators such as ForceIndexIndicator, EaseOfMovementIndicator, and KlingerVolumeOscillatorIndicator.
  • Forecast foundation targeting 0.23.1: Num-only summaries now declare empirical or analytic support, return estimators compose canonical ReturnMoments, and feature vectors publish representation-bound schemas.
  • Exact and explicit price models: MonteCarloPriceForecastIndicator summarizes transformed terminal-price paths exactly; LognormalApproximationPriceForecastIndicator is the clearly named analytic alternative when paths are unavailable.
  • State-conditioned projections and calibrated tails: AnalogReturnProjectionIndicator builds deterministic empirical neighbor forecasts, and RollingConformalForecastProjectionIndicator widens tails from matured residuals without changing base provenance.
  • Composable rough-volatility state: RoughVolatilityForecastStateIndicator keeps canonical return moments while adding bounded roughness, vol-of-vol, cumulative horizon variance, and an explicit analog feature schema.
  • Bayesian regime state: OnlineChangePointForecastStateIndicator adds canonical constant-hazard run-length inference, window-qualified recent-change posterior mass, typed component summaries, and direct analog composition.
  • Serialization named shorthand preview: The companion ta4j PR #1507 targets 0.23.1 with compact expressions such as SMA(7,21), SmaCrossUp(7,21), RSI(14), and SharpeRatio while keeping canonical descriptor JSON as the durable storage format.
  • Forecast migration required: The 0.23.1 correction intentionally replaces the forecast API introduced in 0.23.0. See Migration and Version Compatibility.

Start Here

Core Concepts

  • Bar Series & Bars - OHLCV data, aggregation, moving windows, and streaming updates
  • Data Sources - Loading bars or trades from files and HTTP providers
  • Num - Precision-aware numeric types such as DoubleNum and DecimalNum
  • Technical Indicators - Indicator composition and caching
  • Highs and Lows - Recent swing methods, canonical defaults, confirmation timing, and forming extremes
  • Forecast Indicators - Forward-looking return and price distributions, point projections, and strategy filters
  • Forecast State Estimation - Minimal lifecycle state, canonical, rough-volatility, and Bayesian regime moments, representation-bound schemas, and provenance-aware summaries
  • Forecast Projection Models - Analog neighbors, rolling conformal calibration, maturity guards, tuning, and failure behavior
  • Trading Strategies - Rules, strategies, unstable bars, and serialization
  • Serialization and Named Shorthand - Preview guide for canonical JSON, compact strategy JSON v2, and named asset expressions
  • Charting - Visual overlays, trading-record rendering, and analysis charts

Pick The Right Execution Path

Use the canonical matrix for execution choices:

Where To Go Next

Community

Maintainer design docs

About

Repository for maintaining the ta4j wiki https://ta4j.github.io/ta4j-wiki/

Resources

Stars

62 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages