Changelog for ta4j
, roughly following keepachangelog.com from version 0.9 onwards.
- Upgraded to Java 11
- VersusBuyAndHoldCriterion renamed to
VersusEnterAndHoldCriterion
- BarSeries constructors use any instance of Num instead of Num-Function
- GrossReturnCriterion renamed to
ReturnCriterion
- NetProfitCriterion and GrossProfitCriterion replaced by
ProfitCriterion
- NetLossCriterion and GrossLossCriterion replaced by
LossCriterion
- LosingPositionsRatioCriterion replaced by
PositionsRatioCriterion
- WinningPositionsRatioCriterion replaced by
PositionsRatioCriterion
- Strategy#unstablePeriod renamed to
Strategy#unstableBars*
- DateTimeIndicator moved to package
indicators/helpers
- UnstableIndicator moved to package
indicators/helpers
- BarSeriesManager updated to use
TradeOnNextOpenModel
by default, which opens new trades at indext + 1
at the open price.- For strategies require the previous behaviour, i.e. trades seconds or minutes before the closing prices,
TradeOnCurerentCloseModel
can be passed to BarSeriesManager- For example:
BarSeriesManager manager = new BarSeriesManager(barSeries, new TradeOnCurrentCloseModel())
BarSeriesManager manager = new BarSeriesManager(barSeries, transactionCostModel, holdingCostModel, tradeExecutionModel)
- For example:
- For strategies require the previous behaviour, i.e. trades seconds or minutes before the closing prices,
- BarSeriesManager and BacktestExecutor moved to packge
backtest
- Fixed ParabolicSarIndicator fixed calculation for sporadic indices
- ExpectancyCriterion fixed calculation
- catch NumberFormatException if
DecimalNum.valueOf(Number)
isNaN
- ProfitCriterion fixed excludeCosts functionality as it was reversed
- LossCriterion fixed excludeCosts functionality as it was reversed
- PerformanceReportGenerator fixed netProfit and netLoss calculations to include costs
- DifferencePercentageIndicator fixed re-calculate instance variable on every iteration
- ThreeWhiteSoldiersIndicator fixed eliminated instance variable holding possible wrong value
- ThreeBlackCrowsIndicator fixed eliminated instance variable holding possible wrong value
- TrailingStopLossRule removed instance variable
currentStopLossLimitActivation
because it may not be alway the correct (last) value - BaseBarSeries fixed
UnsupportedOperationException
when creating a bar series that is based on an unmodifiable collection
- BarSeriesManager consider finishIndex when running backtest
- BarSeriesManager add
holdingTransaction
- BacktestExecutor evaluates strategies in parallel when possible
- CachedIndicator synchronize on getValue()
- BaseBar defaults to
DecimalNum
type in all constructors - TRIndicator improved calculation
- WMAIndicator improved calculation
- KSTIndicator improved calculation
- RSIIndicator simplify calculation
- FisherIndicator improved calculation
- DoubleEMAIndicator improved calculation
- CMOIndicator improved calculation
- PearsonCorrelationIndicator improved calculation
- PivotPoint-Indicators improved calculations
- ValueAtRiskCriterion improved calculation
- ExpectedShortfallCriterion improved calculation
- SqnCriterion improved calculation
- NumberOfBreakEvenPositionsCriterion shorten code
- AverageReturnPerBarCriterion improved calculation
- ZLEMAIndicator improved calculation
- InPipeRule improved calculation
- updated pom.xml: slf4j-api to 2.0.7
- updated pom.xml: org.apache.poi to 5.2.3
- updated pom.xml: maven-jar-plugin to 3.3.0
- add
final
to properties where possible - improved javadoc
- SuperTrendIndicator,SuperTrendUpperIndicator,SuperTrendLowerIndicator: optimized calculation
- SuperTrendIndicator, SuperTrendLowerBandIndicator, SuperTrendUpperBandIndicator:
multiplier
changed to fromInteger
toDouble
- add missing
@Override
annotation - RecursiveCachedIndicator: simplified code
- LossIndicator: optimize calculation
- GainIndicator: improved calculation
- PriceVariationIndicator renamed to ClosePriceRatioIndicator for consistency with new ClosePriceDifferenceIndicator
- made UnaryOperation and BinaryOperation public
- removed Serializable from
CostModel
- removed
@Deprecated Bar#addTrade(double tradeVolume, double tradePrice, Function<Number, Num> numFunction)
; useBar#addTrade(Num tradeVolume, Num tradePrice)
instead. - removed
@Deprecated Bar#addTrade(String tradeVolume, String tradePrice, Function<Number, Num> numFunction)
; useBar#addTrade(Num tradeVolume, Num tradePrice)
instead. - removed
DecimalNum.valueOf(DecimalNum)
- delete
.travis.yml
as this project is managed by "Github actions"
- added
TradingRecord.getStartIndex()
andTradingRecord.getEndIndex()
to track start and end of the recording - added SuperTrendIndicator
- added SuperTrendUpperBandIndicator
- added SuperTrendLowerBandIndicator
- added Donchian Channel indicators (Upper, Lower, and Middle)
- added
Indicator.getUnstableBars()
- added
TransformIndicator.pow()
- added
BarSeriesManager.getHoldingCostModel()
andBarSeriesManager.getTransactionCostModel()
to allow extending BarSeriesManager and reimplementingrun()
- added
MovingAverageCrossOverRangeBacktest.java
andETH-USD-PT5M-2023-3-13_2023-3-15.json
test data file to demonstrate parallel strategy evaluation - added javadoc improvements for percentage criteria
- added "lessIsBetter"-property for AverageCriterion
- added "lessIsBetter"-property for RelativeStandardDeviation
- added "lessIsBetter"-property for StandardDeviationCriterion
- added "lessIsBetter"-property for StandardErrorCriterion
- added "lessIsBetter"-property for VarianceCriterion
- added "lessIsBetter"-property for NumberOfPositionsCriterion
- added "addBase"-property for ReturnCriterion to include or exclude the base percentage of 1
- added RelativeVolumeStandardDeviationIndicator
- added MoneyFlowIndexIndicator
- added IntraDayMomentumIndexIndicator
- added ClosePriceDifferenceIndicator
- added TimeSegmentedVolumeIndicator
- added
DecimalNum.valueOf(DoubleNum)
to convert a DoubleNum to a DecimalNum. - added
DoubleNum.valueOf(DecimalNum)
to convert a DecimalNum to a DoubleNum. - added "TradeExecutionModel" to modify trade execution during backtesting
- added NumIndicator to calculate any
Num
-value for aBar
- Fixed CashFlow fixed calculation with custom startIndex and endIndex
- Fixed Returns fixed calculation with custom startIndex and endIndex
- Fixed ExpectedShortfallCriterion fixed calculation with custom startIndex and endIndex
- Fixed MaximumDrawDownCriterion fixed calculation with custom startIndex and endIndex
- Fixed EnterAndHoldReturnCriterion fixed calculation with custom startIndex and endIndex
- Fixed VersusEnterAndHoldCriterion fixed calculation with custom startIndex and endIndex
- Fixed BarSeriesManager consider finishIndex when running backtest
- NumberOfConsecutiveWinningPositions renamed to
NumberOfConsecutivePositions
- DifferencePercentage renamed to
DifferencePercentageIndicator
- BuyAndHoldCriterion renamed to
EnterAndHoldCriterion
- DXIndicator moved to adx-package
- PlusDMIndicator moved to adx-package
- MinusDMIndicator moved to adx-package
analysis/criterion
-package moved to rootcost
-package moved toanalysis/cost
-package- AroonXXX indicators moved to aroon package
- LosingPositionsRatioCriterion correct betterThan
- VersusBuyAndHoldCriterionTest NaN-Error.
- Fixed
ChaikinOscillatorIndicatorTest
- DecimalNum#remainder() adds NaN-check
- Fixed ParabolicSarIndicatorTest fixed openPrice always 0 and highPrice lower than lowPrice
- UlcerIndexIndicator using the max price of current period instead of the highest value of last n bars
- DurationBarAggregator fixed aggregation of bars with gaps
- KeltnerChannelMiddleIndicator changed superclass to AbstractIndicator; add GetBarCount() and toString()
- KeltnerChannelUpperIndicator add constructor to accept pre-constructed ATR; add GetBarCount() and toString()
- KeltnerChannelLowerIndicator add constructor to accept pre-constructed ATR; add GetBarCount() and toString()
- BarSeriesManager removed empty args constructor
- Open|High|Low|Close do not cache price values anymore
- DifferenceIndicator(i1,i2) replaced by the more flexible CombineIndicator.minus(i1,i2)
- DoubleNum replace redundant
toString()
call inDoubleNum.valueOf(Number i)
withi.doubleValue()
- ZeroCostModel now extends from
FixedTransactionCostModel
- Num removed Serializable
- PriceIndicator removed
- NumericIndicator new class providing a fluent and lightweight api for indicator creation
- AroonFacade, BollingerBandFacade, KeltnerChannelFacade new classes providing a facade for indicator groups by using lightweight
NumericIndicators
- AbstractEMAIndicator added getBarCount() to support future enhancements
- ATRIndicator "uncached" by changing superclass to AbstractIndicator; added constructor to accept TRIndicator and getter for same; added toString(); added getBarCount() to support future enhancements
- π Enhancement added possibility to use CostModels when backtesting with the BacktestExecutor
- π Enhancement added Num#zero, Num#one, Num#hundred
- π Enhancement added possibility to use CostModels when backtesting with the BacktestExecutor
- π Enhancement added Indicator#stream() method
- π Enhancement added a new CombineIndicator, which can combine the values of two Num Indicators with a given combine-function
- Example added a json serialization and deserialization example of BarSeries using google-gson library
- EnterAndHoldCriterion added constructor with TradeType to begin with buy or sell
- π Enhancement added Position#getStartingType() method
- π Enhancement added
SqnCriterion
- π Enhancement added
StandardDeviationCriterion
- π Enhancement added
RelativeStandardDeviationCriterion
- π Enhancement added
StandardErrorCriterion
- π Enhancement added
VarianceCriterion
- π Enhancement added
AverageCriterion
- π Enhancement added javadoc for all rules to make clear which rule makes use of a TradingRecord
- Enhancement prevent Object[] allocation for varargs log.trace and log.debug calls by wrapping them in
if
blocks - π Enhancement added
FixedTransactionCostModel
- π Enhancement added
AnalysisCriterion.PositionFilter
to handle both sides within one Criterion.
- 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
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()
- 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
- MultiplierIndicator: replaced by TransformIndicator.
- AbsoluteIndicator: replaced by TransformIndicator.
- 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
- π Enhancement added getGrossProfit() and getGrossProfit(BarSeries) on Trade.
- π Enhancement added getPricePerAsset(BarSeries) on Order.
- π Enhancement added convertBarSeries(BarSeries, conversionFunction) to BarSeriesUtils.
- π Enhancement added UnstableIndicator.
- π Enhancement added Chainrule.
- π Enhancement added BarSeriesUtils#sortBars.
- π Enhancement added BarSeriesUtils#addBars.
- π Enhancement added Num.negate() to negate a Num value.
- π Enhancement added
GrossLossCriterion.class
. - π Enhancement added
NetProfitCriterion.class
. - π Enhancement added chooseBest() method with parameter tradeType in AnalysisCriterion.
- π Enhancement added
AverageLossCriterion.class
. - π Enhancement added
AverageProfitCriterion.class
. - π Enhancement added
ProfitLossRatioCriterion.class
. - π Enhancement added
ExpectancyCriterion.class
. - π Enhancement added
ConsecutiveWinningPositionsCriterion.class
. - π Enhancement added
LosingPositionsRatioCriterion.class
- π Enhancement added Position#hasProfit.
- π Enhancement added Position#hasLoss.
- π Enhancement exposed both EMAs in MACD indicator
- Breaking Refactored from Max/Min to High/Low in Bar class
- Breaking Removed redundant constructors from BaseBar class
- Breaking Renamed
TimeSeries
toBarSeries
- 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
- 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
- Enhancement Added getters for AroonDownIndicator and AroonUpIndicator in AroonOscillatorIndicator
- Enhancement Added common constructors in BaseBar for BigDecimal, Double and String values
- Enhancement Added constructor in BaseBar with trades property
- Enhancement Added BaseBarBuilder and ConvertibleBaseBarBuilder - BaseBar builder classes
- Enhancement Added BarAggregator and TimeSeriesAggregator to allow aggregates bars and time series
- Enhancement Added LWMA Linearly Weighted Moving Average Indicator
- Enhancement Implemented trading cost models (linear transaction and borrowing cost models)
- Enhancement Implemented Value at Risk Analysis Criterion
- Enhancement Implemented Expected Shortfall Analysis Criterion
- Enhancement Implemented Returns class to analyze the time series of return rates. Supports logarithmic and arithmetic returns
- Enhancement Implemented a way to find the best result for multiple strategies by submitting a range of numbers while backtesting
- Enhancement Implemented NumberOfBreakEvenTradesCriterion for counting break even trades
- Enhancement Implemented NumberOfLosingTradesCriterion for counting losing trades
- Enhancement Implemented NumberOfWinningTradesCriterion for counting winning trades
- Enhancement Implemented NumberOfWinningTradesCriterion for counting winning trades
- Enhancement Implemented ProfitLossPercentageCriterion for calculating the total performance percentage of your trades
- Enhancement Implemented TotalProfit2Criterion for calculating the total profit of your trades
- Enhancement Implemented TotalLossCriterion for calculating the total loss of your trades
- Enhancement Added ADX indicator based strategy to ta4j-examples
- Enhancement TrailingStopLossRule: added possibility of calculations of TrailingStopLossRule also for open, high, low price. Added getter for currentStopLossLimitActivation
- Enhancement Add constructors with parameters to allow custom implementation of ReportGenerators in BacktestExecutor
- Enhancement Added license checker goal on CI's pipeline
- Enhancement Added source format checker goal on CI's pipeline
Decimal
class has been replaced by newNum
interface. Enables usingDouble
,BigDecimal
and custom data types for calculations.- Big changes in
TimeSeries
andBaseTimeSeries
. Multiple newaddBar(..)
functions inTimeSeries
allow to add data directly to the series
- 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)
- ALL INDICATORS:
Decimal
replaced byNum
. - ALL CRITERION: Calculations modified to use
Num
. - AbstractIndicator: new
AbstractIndicator#numOf(Number n)
function as counterpart of droppedDecimal.valueOf(double|int|..)
- TimeSeries | Bar: preferred way to add bar data to a
TimeSeries
is directly to the series via newTimeSeries#addBar(time,open,high,..)
functions. It ensures to use the correctNum
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)
toNum.sqrt()
, other small improvements - RandomWalk[High|Low]Indicator: renamed to
RWI[High|Low]Indicator
- BaseTimeSeries.SeriesBuilder: simplifies creation of BaseTimeSeries.
- Num: Extracted interface of dropped
Decimal
class - DoubleNum:
Num
implementation to support calculations based ondouble
primitive - BigDecimalNum: Default
Num
implementation ofBaseTimeSeries
- 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
andBigDecimalNum
- 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.
- 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. UseTimeSeries.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. UseTimeSeries.getSubseries(int i, int i)
instead - BigDecimalNum: removed. Replaced by
PrecisionNum
- AbstractCriterionTest: removed constructor
AbstractCriterionTest(Function<Number, Num)
. UseAbstractCriterionTest(CriterionFactory, Function<Number, Num>)
. - Indicator: removed redundant
private TimeSeries
- BREAKING: Tick has been renamed to Bar
- ATRIndicator: fixed calculations
- PlusDI, MinusDI, ADX: fixed calculations
- LinearTransactionCostCriterion: fixed calculations, added xls file and unit tests
- FisherIndicator: fixed calculations
- ConvergenceDivergenceIndicator: fixed NPE of optional "minStrenght"-property
- TotalProfitCriterion: If not
NaN
the criterion uses the price of theOrder
and not just the close price of underlyingTimeSeries
- Order: Now constructors and static
sell/buyAt(..)
functions need a price and amount parameter to satisfy correct be behaviour of criterions (entry/exit prices can differ from corresponding close prices inOrder
) - JustOnceRule: now it is possible to add another rule so that this rule is satisfied if the inner rule is satisfied for the first time
- MeanDeviationIndicator: moved to statistics package
- Decimal: use
BigDecimal::valueof
instead of instantiating a new BigDecimal for double, int and long- now
Decimal
extendsNumber
- now
- Strategy: can now have a optional parameter "name".
- Tick:
Tick
has been renamed toBar
for a more appropriate description of the price movement over a set period of time. - MMAIndicator: restructured and moved from
helpers
toindicators
package - AverageTrueRangeIndicator: renamed to ATRIndicator
- AverageDirectionalMovementDownIndicator: renamed to ADXIndicator
- ADXIndicator: added new two argument constructor
- DirectionalMovementPlusIndicator and DirectionalMovementPlusIndicator: renamed to PlusDIIndicator and MinusDIIndicator
- XlsTestsUtils: rewritten to provide getSeries(), getIndicator(), getFinalCriterionValue(), and getTradingRecord() in support of XLSCriterionTest and XLSIndicatorTest.
- IndicatorFactory: made generic and renamed createIndicator() to getIndicator()
- RSIIndicatorTest: example showing usage of new generic unit testing of indicators
- LinearTransactionCostCriterionTest: example showing usage of new generic unit testing of criteria
- ConvergenceDivergenceIndicator: new Indicator for positive/negative convergence and divergence.
- BooleanTransformIndicator: new indicator to transform any decimal indicator to a boolean indicator by using logical operations.
- DecimalTransformIndicator: new indicator to transforms any indicator by using common math operations.
- Decimal: added functions
Decimal valueOf(BigDecimal)
andBigDecimal getDelegate()
- AbstractEMAIndicator: new abstract indicator for ema based indicators like MMAIndicator
- PearsonCorrelationIndicator: new statistic indicator with pearson correlation
- TimeSeries: new method
getSubSeries(int, int)
to create a sub series of the TimeSeries that stores bars exclusively betweenstartIndex
andendIndex
parameters - IIIIndicator: Intraday Intensity Index
- CriterionFactory: new functional interface to support CriterionTest
- IndicatorTest: new class for storing an indicator factory, allows for generic calls like getIndicator(D data, P... params) after the factory is set once in the constructor call. Facilitates standardization across unit tests.
- CriterionTest: new class for storing a criterion factory, allows for generic calls like getCriterion(P... params) after the factory is set once in the constructor call. Facilitates standardization across unit tests.
- ExternalIndicatorTest: new interface for fetching indicators and time series from external sources
- ExternalCriterionTest: new interface for fetching criteria, trading records, and time series from external sources
- XLSIndicatorTest: new class implementing ExternalIndicatorTest for XLS files, for use in XLS unit tests
- XLSCriterionTest: new class implementing ExternalCriterionTest for XLS files, for use in XLS unit tests
- TraillingStopLossIndicator: no need for this as indicator. No further calculations possible after price falls below stop loss. Use
StopLossRule
orDifferenceIndicator
- BaseTimeSeries: Constructor:
BaseTimeSeries(TimeSeries defaultSeries, int seriesBeginIndex, int seriesEndIndex)
usegetSubSeries(int, int)
- Decimal: Method
toDouble()
usedoubleValue()
with the release 0.10 we have changed the previous java package definition to org.ta4j or to be more specific to org.ta4j.core (the new organisation). You have to reorganize all your refernces to the new packages! In eclipse you can do this easily by selecting your sources and run "Organize imports" Changed ownership of the ta4j repository: from mdeverdelhan/ta4j (stopped the maintenance) to ta4j/ta4j (new organization)
- ParabolicSarIndicator: wrong calculation fixed
- KAMAIndicator: stack overflow bug fixed
- AroonUpIndicator and AroonDownIndicator: wrong calculations fixed and can handle NaN values now
- BREAKING: new package structure: change eu.verdelhan.ta4j to org.ta4j.ta4j-core
- new package adx: new location of AverageDirectionalMovementIndicator and DMI+/DMI-
- Ownership of the ta4j repository: from mdeverdelhan/ta4j (stopped the maintenance) to ta4j/ta4j (new organization)
- ParabolicSarIndicator: old constructor removed (there was no need for time frame parameter after big fix). Three new constructors for default and custom parameters.
- HighestValueIndicator and LowestValueIndicator: ignore also NaN values if they are at the current index
- AroonOscillatorIndicator: new indicator based on AroonUp/DownIndicator
- AroonUpIndicator and AroonDownIndicator: New constructor with parameter for custom indicator for min price and max price calculation
- ROCVIndicator: rate of Change of Volume
- DirectionalMovementPlusIndicator: new indicator for Directional Movement System (DMI+)
- DirectionalMovementDownIndicator: new indicator for Directional Movement System (DMI-)
- ChaikinOscillatorIndicator: new indicator.
- InSlopeRule: new rule that is satisfied if the slope of two indicators are within a boundary
- IsEqualRule: new rule that is satisfied if two indicators are equal
- AroonUpIndicator and AroonDownIndicator: new constructor with parameter for custom indicator for min price and max price calculation
- Pivot Point Indicators Package: new package with Indicators for calculating standard, Fibonacci and DeMark pivot points and reversals
- PivotPointIndicator: new indicator for calculating the standard pivot point
- StandardReversalIndicator: new indicator for calculating the standard reversals (R3,R2,R1,S1,S2,S3)
- FibonacciReversalIndicator: new indicator for calculating the Fibonacci reversals (R3,R2,R1,S1,S2,S3)
- DeMarkPivotPointIndicator: new indicator for calculating the DeMark pivot point
- DeMarkReversalIndicator: new indicator for calculating the DeMark resistance and the DeMark support
- PivotPointIndicator: new indicator for calculating the standard pivot point
- IsFallingRule: new rule that is satisfied if indicator strictly decreases within the timeFrame.
- IsRisingRule: new rule that is satisfied if indicator strictly increases within the timeFrame.
- IsLowestRule: new rule that is satisfied if indicator is the lowest within the timeFrame.
- IsHighestRule: new rule that is satisfied if indicator is the highest within the timeFrame.
- BREAKING drops Java 7 support
- use
java.time
instead ofjava.util.Date
- Added interfaces for some API basic objects
- Cleaned whole API
- Reordered indicators
- Added PreviousValueIndicator
- Fixed #162 - Added amount field into Tick constructor
- Fixed #183 - addTrade bad calculation
- Fixed #153, #170 - Updated StopGainRule and StopLossRule for short trades
- Removed dependency to Joda-time
- Dropped Java 6 and Java 7 compatibility
- Fixed #120 - ZLEMAIndicator StackOverflowError
- Added stochastic RSI indicator
- Added smoothed RSI indicator
- Fixed examples
- Fixed #81 - Tick uses Period of 24H when it possibly means 1 Day
- Fixed #80 - TimeSeries always iterates over all the data
- Removed the
timePeriod
field in time series - Fixed #102 - RSIIndicator returns NaN when rsi == 100
- Added periodical growth rate indicator
- Fixed #105 - Strange calculation with Ichimoku Indicator
- Added Random Walk Index (high/low) indicators
- Improved performance for Williams %R indicator
- Moved mock indicators to regular scope (renamed in Fixed*Indicator)
- Fixed StackOverflowErrors on recursive indicators (see #60 and #68)
- Fixed #74 - Question on backtesting strategies with indicators calculated with enough ticks
- Added Chande Momentum Oscillator indicator
- Added cumulated losses/gains indicators
- Added Range Action Verification Index indicator
- Added MVWAP indicator
- Added VWAP indicator
- Added Chandelier exit indicators
- Improved Decimal performances
- Added Fisher indicator
- Added KAMA indicator
- Added Detrended Price Oscillator
- Added Ichimoku clouds indicators
- Added statistical indicators: Simple linear regression, Correlation coefficient, Variance, Covariance, Standard error
- Moved standard deviation
- Added Bollinger BandWidth and %B indicator
- Added Keltner channel indicators
- Added Ulcer Index and Mass Index indicators
- Added a trailing stop-loss indicator
- Added Coppock Curve indicator
- Added sum indicator
- Added candle indicators: Real body, Upper/Lower shadow, Doji, 3 black crows, 3 white soldiers, Bullish/Bearish Harami, Bullish/Bearish Engulfing
- Added absolute indicator
- Added Hull Moving Average indicator
- Updated Bollinger Bands (variable multiplier, see #53)
- Fixed #39 - Possible update for TimeSeries.run()
- Added Chaikin Money Flow indicator
- Improved volume indicator
- Added Close Location Value indicator
- Added Positive Volume Index and Negative Volume Index indicators
- Added zero-lag EMA indicator
- Fixed #35 - Fix max drawdown criterion
- Improved documentation: user's guide & contributor's guidelines
- Fixed #37 - Update Tick.toString method
- Fixed #36 - Missing 'Period timePeriod' in full Tick constructor
- Updated examples
- Improved analysis criteria (to use actual entry/exit prices instead of close prices)
- Added price and amount to
Order
- Added helpers for order creation
- Renamed
Operation
toOrder
- Added a record/history of a trading session (
TradingRecord
) - Moved the trading logic from strategies to rules
- Refactored trade operations
- Added a difference indicator
- Small other API changes
- Added
NaN
to Decimals - Renamed
TADecimal
toDecimal
- Fixed #24 - Error in standard deviation calculation
- Added moving time series (& cache: #25)
- Refactored time series and ticks
- Added entry-pass filter and exit-pass filter strategies
- Replaced
JustBuyOnceStrategy
andCombinedBuyAndSellStrategy
byJustEnterOnceStrategy
andCombinedEntryAndExitStrategy
respectively - Added examples
- Added operation type helpers
- Added strategy execution traces through SLF4J
- Removed
.summarize(...)
methods andDecision
(analysis) - Improved performance of some indicators and strategies
- Generalized cache to all indicators (#20)
- Removed AssertJ dependency
- Fixed #16 - Division by zero in updated WalkForward example
- Switched doubles for TADecimals (BigDecimals) in indicators
- Semantic improvement for IndicatorOverIndicatorStrategy
- Fixed #11 - UnknownFormatConversionException when using toString() for 4 strategies
- Added a maximum value starter strategy
- Added linear transaction cost (analysis criterion)
- Removed evaluators (replaced by
.chooseBest(...)
and.betterThan(...)
methods) - Added triple EMA indicator
- Added double EMA indicator
- Removed slicers (replaced by
.split(...)
methods) - Removed runner (replaced by
.run(...)
methods) - Added more tests
- Removed
ConstrainedTimeSeries
(replaced by.subseries(...)
methods) - Added/refactored examples (including walk-forward and candlestick chart)
- Fixed #2 - Tests failing in JDK8
- Added indicators: Mean deviation, Commodity channel index, Percentage price oscillator (tests)
- Added distance between indicator and constant
- Added opposite strategy
- Removed some runners
- Added strategy runs on whole series
- Refactored slicers
- Removed log4j dependency
- Added examples
- First public release
- 100% Pure Java - works on any Java Platform version 6 or later
- More than 40 technical indicators (Aroon, ATR, moving averages, parabolic SAR, RSI, etc.)
- A powerful engine for building custom trading strategies
- Utilities to run and compare strategies
- Minimal 3rd party dependencies
- MIT license