ta4j v0.14 Release Notes

Release Date: 2021-04-25 // about 3 years ago
  • ๐Ÿ’ฅ Breaking

    • ๐Ÿ’ฅ Breaking: **Changed order of parameters for addTrade in BaseBarSeries to match abstract and description
    • ๐Ÿ’ฅ Breaking: PrecisionNum renamed to DecimalNum
    • ๐Ÿ’ฅ Breaking: AverageProfitableTradesCriterion renamed to WinningTradesRatioCriterion
    • ๐Ÿ’ฅ Breaking: AverageProfitCriterion renamed to AverageReturnPerBarCriterion
    • ๐Ÿ’ฅ Breaking: BuyAndHoldCriterion renamed to BuyAndHoldReturnCriterion
    • ๐Ÿ’ฅ Breaking: RewardRiskRatioCriterion renamed to ReturnOverMaxDrawdownCriterion
    • ๐Ÿ’ฅ Breaking: ProfitLossCriterion moved to PnL-Package
    • ๐Ÿ’ฅ Breaking: ProfitLossPercentageCriterion moved to PnL-Package
    • ๐Ÿ’ฅ Breaking: TotalProfitCriterion renamed to GrossReturnCriterion and moved to PnL-Package.
    • ๐Ÿ’ฅ Breaking: TotalProfit2Criterion renamed to GrossProfitCriterion and moved to PnL-Package.
    • ๐Ÿ’ฅ Breaking: TotalLossCriterion renamed to NetLossCriterion and moved to PnL-Package.
    • ๐Ÿ’ฅ Breaking: package "tradereports" renamed to "reports"
    • ๐Ÿ’ฅ Breaking: NumberOfTradesCriterion renamed to NumberOfPositionsCriterion
    • ๐Ÿ’ฅ Breaking: NumberOfLosingTradesCriterion renamed to NumberOfLosingPositionsCriterion
    • ๐Ÿ’ฅ Breaking: NumberOfWinningTradesCriterion renamed to NumberOfWinningPositionsCriterion
    • ๐Ÿ’ฅ Breaking: NumberOfBreakEvenTradesCriterion renamed to NumberOfBreakEvenPositionsCriterion
    • ๐Ÿ’ฅ Breaking: WinningTradesRatioCriterion renamed to WinningPositionsRatioCriterion
    • ๐Ÿ’ฅ Breaking: TradeStatsReport renamed to PositionStatsReport
    • ๐Ÿ’ฅ Breaking: TradeStatsReportGenerator renamed to PositionStatsReportGenerator
    • ๐Ÿ’ฅ Breaking: TradeOpenedMinimumBarCountRule renamed to OpenedPositionMinimumBarCountRule
    • ๐Ÿ’ฅ Breaking: Trade.class renamed to Position.class
    • ๐Ÿ’ฅ Breaking: Order.class renamed to Trade.class
    • ๐Ÿ’ฅ Breaking: package "tradereports" renamed to "reports"
    • ๐Ÿ’ฅ Breaking: package "trading/rules" renamed to "rules"
    • ๐Ÿ’ฅ Breaking: remove Serializable from all indicators
    • ๐Ÿ’ฅ Breaking: Bar#trades: changed type from int to long

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed Trade: problem with profit calculations on short trades.
    • ๐Ÿ›  Fixed TotalLossCriterion: problem with profit calculations on short trades.
    • ๐Ÿ›  Fixed BarSeriesBuilder: removed the Serializable interface
    • ๐Ÿ›  Fixed ParabolicSarIndicator: problem with calculating in special cases
    • ๐Ÿ›  Fixed BaseTimeSeries: can now be serialized
    • ๐Ÿ›  Fixed ProfitLossPercentageCriterion: use entryPrice#getValue() instead of entryPrice#getPricePerAsset()

    ๐Ÿ”„ Changed

    • Trade: Changed the way Nums are created.
    • WinningTradesRatioCriterion (previously AverageProfitableTradesCriterion): Changed to calculate trade profits using Trade's getProfit().
    • BuyAndHoldReturnCriterion (previously BuyAndHoldCriterion): Changed to calculate trade profits using Trade's getProfit().
    • ExpectedShortfallCriterion: Removed unnecessary primitive boxing.
    • NumberOfBreakEvenTradesCriterion: Changed to calculate trade profits using Trade's getProfit().
    • NumberOfLosingTradesCriterion: Changed to calculate trade profits using Trade's getProfit().
    • NumberOfWinningTradesCriterion: Changed to calculate trade profits using Trade's getProfit().
    • ProfitLossPercentageCriterion: Changed to calculate trade profits using Trade's entry and exit prices.
    • TotalLossCriterion: Changed to calculate trade profits using Trade's getProfit().
    • TotalReturnCriterion (previously TotalProfitCriterion): Changed to calculate trade profits using Trade's getProfit().
    • WMAIndicator: reduced complexity of WMAIndicator implementation

    โœ‚ Removed/Deprecated

    • MultiplierIndicator: replaced by TransformIndicator.
    • AbsoluteIndicator: replaced by TransformIndicator.

    โž• Added

    • โœจ Enhancement Improvements on gitignore
    • โœจ Enhancement Added TradeOpenedMinimumBarCountRule - rule to specify minimum bar count for opened trade.
    • โœจ Enhancement Added DateTimeIndicator a new Indicator for dates.
    • โœจ Enhancement Added DayOfWeekRule for specifying days of the week to trade.
    • โœจ Enhancement Added TimeRangeRule for trading within time ranges.
    • โœจ Enhancement Added floor() and ceil() to Num.class
    • โœจ Enhancement Added getters getLow() and getUp() in CrossedDownIndicatorRule
    • โœจ Enhancement Added BarSeriesUtils: common helpers and shortcuts for BarSeries methods.
    • โœจ Enhancement Improvements for PreviousValueIndicator: more descriptive toString() method, validation of n-th previous bars in
    • โœจ Enhancement Added Percentage Volume Oscillator Indicator, PVOIndicator.
    • โœจ Enhancement Added Distance From Moving Average Indicator, DistanceFromMAIndicator.
    • โœจ Enhancement Added Know Sure Thing Indicator, KSTIndicator. constructor of PreviousValueIndicator
    • โœจ :tada: Enhancement added getGrossProfit() and getGrossProfit(BarSeries) on Trade.
    • โœจ :tada: Enhancement added getPricePerAsset(BarSeries) on Order.
    • โœจ :tada: Enhancement added convertBarSeries(BarSeries, conversionFunction) to BarSeriesUtils.
    • โœจ :tada: Enhancement added UnstableIndicator.
    • โœจ :tada: Enhancement added Chainrule.
    • โœจ :tada: Enhancement added BarSeriesUtils#sortBars.
    • โœจ :tada: Enhancement added BarSeriesUtils#addBars.
    • โœจ :tada: Enhancement added Num.negate() to negate a Num value.
    • โœจ :tada: Enhancement added GrossLossCriterion.class.
    • โœจ :tada: Enhancement added NetProfitCriterion.class.
    • โœจ :tada: Enhancement added chooseBest() method with parameter tradeType in AnalysisCriterion.
    • โœจ :tada: Enhancement added AverageLossCriterion.class.
    • โœจ :tada: Enhancement added AverageProfitCriterion.class.
    • โœจ :tada: Enhancement added ProfitLossRatioCriterion.class.
    • โœจ :tada: Enhancement added ExpectancyCriterion.class.
    • โœจ :tada: Enhancement added ConsecutiveWinningPositionsCriterion.class.
    • โœจ :tada: Enhancement added LosingPositionsRatioCriterion.class
    • โœจ :tada: Enhancement added Position#hasProfit.
    • โœจ :tada: Enhancement added Position#hasLoss.
    • โœจ :tada: Enhancement exposed both EMAs in MACD indicator

Previous changes from v0.13

  • ๐Ÿ’ฅ Breaking

    • ๐Ÿ’ฅ :boom: Breaking Refactored from Max/Min to High/Low in Bar class
    • ๐Ÿ’ฅ :boom: Breaking Removed redundant constructors from BaseBar class
    • ๐Ÿ’ฅ :boom: Breaking Renamed TimeSeries to BarSeries

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed BaseBarSeries: problem with getSubList for series with specified maximumBarCount.
    • ๐Ÿ›  Fixed return BigDecimal instead of Number in: PrecisionNum.getDelegate.
    • ๐Ÿ›  Fixed java.lang.ClassCastException in: PrecisionNum.equals().
    • ๐Ÿ›  Fixed java.lang.ClassCastException in: DoubleNum.equals().
    • ๐Ÿ›  Fixed java.lang.NullPointerException in: NumberOfBarsCriterion.calculate(TimeSeries, Trade) for opened trade.
    • ๐Ÿ›  Fixed java.lang.NullPointerException in: AverageProfitableTradesCriterion.calculate(TimeSeries, Trade) for opened trade.
    • StopGainRule: now correctly handles stops for sell orders
    • StopLossRule: now correctly handles stops for sell orders
    • ProfitLossCriterion: fixed to work properly for short trades
    • PivotPointIndicator: fixed possible npe if first bar is not in same period
    • IchimokuChikouSpanIndicator: fixed calculations - applied correct formula.
    • CloseLocationValueIndicator: fixed special case, return zero instead of NaN if high price == low price

    ๐Ÿ”„ Changed

    • PrecisionNum: improve performance for methods isZero/isPositive/isPositiveOrZero/isNegative/isNegativeOrZero.
    • BaseTimeSeriesBuilder moved from inner class to own class
    • TrailingStopLossRule added ability to look back the last x bars for calculating the trailing stop loss

    โž• Added

    • โœจ :tada: Enhancement Added getters for AroonDownIndicator and AroonUpIndicator in AroonOscillatorIndicator
    • โœจ :tada: Enhancement Added common constructors in BaseBar for BigDecimal, Double and String values
    • โœจ :tada: Enhancement Added constructor in BaseBar with trades property
    • โœจ :tada: Enhancement Added BaseBarBuilder and ConvertibleBaseBarBuilder - BaseBar builder classes
    • โœจ :tada: Enhancement Added BarAggregator and TimeSeriesAggregator to allow aggregates bars and time series
    • โœจ :tada: Enhancement Added LWMA Linearly Weighted Moving Average Indicator
    • โœจ :tada: Enhancement Implemented trading cost models (linear transaction and borrowing cost models)
    • โœจ :tada: Enhancement Implemented Value at Risk Analysis Criterion
    • โœจ :tada: Enhancement Implemented Expected Shortfall Analysis Criterion
    • โœจ :tada: Enhancement Implemented Returns class to analyze the time series of return rates. Supports logarithmic and arithmetic returns
    • โœจ :tada: Enhancement Implemented a way to find the best result for multiple strategies by submitting a range of numbers while backtesting
    • โœจ :tada: Enhancement Implemented NumberOfBreakEvenTradesCriterion for counting break even trades
    • โœจ :tada: Enhancement Implemented NumberOfLosingTradesCriterion for counting losing trades
    • โœจ :tada: Enhancement Implemented NumberOfWinningTradesCriterion for counting winning trades
    • โœจ :tada: Enhancement Implemented NumberOfWinningTradesCriterion for counting winning trades
    • โœจ :tada: Enhancement Implemented ProfitLossPercentageCriterion for calculating the total performance percentage of your trades
    • โœจ :tada: Enhancement Implemented TotalProfit2Criterion for calculating the total profit of your trades
    • โœจ :tada: Enhancement Implemented TotalLossCriterion for calculating the total loss of your trades
    • โœจ :tada: Enhancement Added ADX indicator based strategy to ta4j-examples
    • โœจ :tada: Enhancement TrailingStopLossRule: added possibility of calculations of TrailingStopLossRule also for open, high, low price. Added getter for currentStopLossLimitActivation
    • โœจ :tada: Enhancement Add constructors with parameters to allow custom implementation of ReportGenerators in BacktestExecutor
    • โœจ :tada: Enhancement Added license checker goal on CI's pipeline
    • โœจ :tada: Enhancement Added source format checker goal on CI's pipeline

    โœ‚ Removed/Deprecated