ta4j v0.13 Release Notes

Release Date: 2019-11-05 // almost 2 years ago
  • ๐Ÿ’ฅ 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


Previous changes from v0.12

  • ๐Ÿ’ฅ Breaking:

    • Decimal class has been replaced by new Num interface. Enables using Double, BigDecimal and custom data types for calculations.
    • Big changes in TimeSeries and BaseTimeSeries. Multiple new addBar(..) functions in TimeSeries allow to add data directly to the series

    ๐Ÿ›  Fixed

    • TradingBotOnMovingTimeSeries: fixed calculations and ArithmeticException Overflow
    • ๐Ÿ›  Fixed wrong indexing in: Indicator.toDouble().
    • PrecisionNum.sqrt(): using DecimalFormat.parse().
    • RandomWalk[High|Low]Indicator: fixed formula (max/min of formula with n iterating from 2 to barCount)

    ๐Ÿ”„ Changed

    • ALL INDICATORS: Decimal replaced by Num.
    • ALL CRITERION: Calculations modified to use Num.
    • AbstractIndicator: new AbstractIndicator#numOf(Number n) function as counterpart of dropped Decimal.valueOf(double|int|..)
    • TimeSeries | Bar: preferred way to add bar data to a TimeSeries is directly to the series via new TimeSeries#addBar(time,open,high,..) functions. It ensures to use the correct Num implementation of the series
    • โœ… XlsTestsUtils: now processes xls with one or more days between data rows (daily, weekly, monthly, etc). Also handle xls #DIV/0! calculated cells (imported as NaN.NaN)
    • CachedIndicator: Last bar is not cached to support real time indicators
    • *TimeSeries | Bar *: added new #addPrice(price) function that adds price to (last) bar.
    • Parameter timeFrame renamed to barCount.
    • Various Rules: added constructor that provides Number parameters
    • AroonUpIndicator: redundant TimeSeries call was removed from constructor
    • AroonDownIndicator: redundant TimeSeries call was removed from constructor
    • BaseTimeSeries: added setDefaultFunction() to SeriesBuilder for setting the default Num type function for all new TimeSeries built by that SeriesBuilder, updated BuildTimeSeries example
    • โœ… CriterionTest: changed from explicit constructor calls to AbstractCriterionTest.getCriterion() calls.
    • ChopIndicator: transparent fixes
    • StochasticRSIIndicator: comments and params names changes to reduce confusion
    • ConvergenceDivergenceIndicator: remove unused method
    • โœ… ChopIndicatorTest: spelling, TODO: add better tests
    • Various Indicators: remove double math operations, change Math.sqrt(double) to Num.sqrt(), other small improvements
    • RandomWalk[High|Low]Indicator: renamed to RWI[High|Low]Indicator

    โž• Added

    • BaseTimeSeries.SeriesBuilder: simplifies creation of BaseTimeSeries.
    • Num: Extracted interface of dropped Decimal class
    • DoubleNum: Num implementation to support calculations based on double primitive
    • BigDecimalNum: Default Num implementation of BaseTimeSeries
    • DifferencePercentageIndicator: New indicator to get the difference in percentage from last value
    • PrecisionNum: Num implementation to support arbitrary precision
    • โœ… TestUtils: removed convenience methods for permuted parameters, fixed all unit tests
    • โœ… TestUtils: added parameterized abstract test classes to allow two test runs with DoubleNum and BigDecimalNum
    • ChopIndicator new common indicator of market choppiness (low volatility), and related 'ChopIndicatorTest' JUnit test and 'CandlestickChartWithChopIndicator' example
    • BollingerBandWidthIndicator: added missing constructor documentation.
    • BollingerBandsLowerIndicator: added missing constructor documentation.
    • BollingerBandsMiddleIndicator: added missing constructor documentation.
    • TrailingStopLossRule: new rule that is satisfied if trailing stop loss is reached
    • Num: added Num sqrt(int) and Num sqrt()
    • pom.xml: added support to generate ta4j-core OSGi artifact.

    โœ‚ Removed/Deprecated

    • Decimal: removed. Replaced by Num interface
    • TimeSeries#addBar(Bar bar): deprecated. Use TimeSeries#addBar(Time, open, high, low, ...)
    • BaseTimeSeries: Constructor BaseTimeSeries(TimeSeries defaultSeries, int seriesBeginIndex, int seriesEndIndex) removed. Use TimeSeries.getSubseries(int i, int i) instead
    • FisherIndicator: commented constructor removed.
    • โœ… TestUtils: removed convenience methods for permuted parameters, fixed all unit tests
    • BaseTimeSeries: Constructor BaseTimeSeries(TimeSeries defaultSeries, int seriesBeginIndex, int seriesEndIndex) removed. Use TimeSeries.getSubseries(int i, int i) instead
    • BigDecimalNum: removed. Replaced by PrecisionNum
    • โœ… AbstractCriterionTest: removed constructor AbstractCriterionTest(Function<Number, Num). Use AbstractCriterionTest(CriterionFactory, Function<Number, Num>).
    • Indicator: removed redundant private TimeSeries