ta4j v0.14 Release Notes
Release Date: 2021-04-25 // almost 4 years ago-
๐ฅ Breaking
- ๐ฅ Breaking: **Changed order of parameters for addTrade in
BaseBarSeries
to match abstract and description - ๐ฅ Breaking:
PrecisionNum
renamed toDecimalNum
- ๐ฅ Breaking:
AverageProfitableTradesCriterion
renamed toWinningTradesRatioCriterion
- ๐ฅ Breaking:
AverageProfitCriterion
renamed toAverageReturnPerBarCriterion
- ๐ฅ Breaking:
BuyAndHoldCriterion
renamed toBuyAndHoldReturnCriterion
- ๐ฅ Breaking:
RewardRiskRatioCriterion
renamed toReturnOverMaxDrawdownCriterion
- ๐ฅ Breaking:
ProfitLossCriterion
moved to PnL-Package - ๐ฅ Breaking:
ProfitLossPercentageCriterion
moved to PnL-Package - ๐ฅ Breaking:
TotalProfitCriterion
renamed toGrossReturnCriterion
and moved to PnL-Package. - ๐ฅ Breaking:
TotalProfit2Criterion
renamed toGrossProfitCriterion
and moved to PnL-Package. - ๐ฅ Breaking:
TotalLossCriterion
renamed toNetLossCriterion
and moved to PnL-Package. - ๐ฅ Breaking: package "tradereports" renamed to "reports"
- ๐ฅ Breaking:
NumberOfTradesCriterion
renamed toNumberOfPositionsCriterion
- ๐ฅ Breaking:
NumberOfLosingTradesCriterion
renamed toNumberOfLosingPositionsCriterion
- ๐ฅ Breaking:
NumberOfWinningTradesCriterion
renamed toNumberOfWinningPositionsCriterion
- ๐ฅ Breaking:
NumberOfBreakEvenTradesCriterion
renamed toNumberOfBreakEvenPositionsCriterion
- ๐ฅ Breaking:
WinningTradesRatioCriterion
renamed toWinningPositionsRatioCriterion
- ๐ฅ Breaking:
TradeStatsReport
renamed toPositionStatsReport
- ๐ฅ Breaking:
TradeStatsReportGenerator
renamed toPositionStatsReportGenerator
- ๐ฅ Breaking:
TradeOpenedMinimumBarCountRule
renamed toOpenedPositionMinimumBarCountRule
- ๐ฅ Breaking:
Trade.class
renamed toPosition.class
- ๐ฅ Breaking:
Order.class
renamed toTrade.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
- ๐ฅ Breaking: **Changed order of parameters for addTrade in
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
toBarSeries
๐ Fixed
- ๐ Fixed
BaseBarSeries
: problem with getSubList for series with specifiedmaximumBarCount
. - ๐ Fixed return
BigDecimal
instead ofNumber
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