Comments (4)
I think it's been already discussed within pr #1008.
What's been shared as a concern is the breaking aspect of such a change. The PR was then dropped because of that.
As you're the second one to bring that on the table, would it be interesting to consider this suggestion for the next major version ?
from ta4j.
Yes, whenever we make breaking changes we need to do a cost benefit analysis of sorts to determine if the improvement outweighs the cost. While updating references isn't a big deal, multiply it by 1000 users and in aggregate it becomes a not insignificant cost.
That said we should not let breaking changes become an anchor on progress and dismiss changes out of hand. What kind of structure/organization are you proposing?
from ta4j.
"multiply it by 1000 users and in aggregate it becomes a not insignificant cost"
But cost per user is still insignificant. I would not block evolution in 0.** beta phase, where whole concept/architecture of library is still being profiled. And on other side cost of usage unfriendly API may be far more significant than breaking changes that improves usability.
As a newcomer I have strugled with UX and flow of creating real trading bot. It is easy to misconfigure indicators and use differentBar series than intended.
new Indicator(barseries1) instead of new Indicator(barseries2)
I'd like to hide as much implementation details as possible, so implementor of trading bot or backtesting does not need to know how all things wire together to work correctly.
The possible way that I'd like is to enforce usage of builders and hide public constructors from outer world usage:
interface BarSerie {
IndicatorFactory indicatorFactory();
}
var barSerie = BarSerie.buider()
.duration(xxx)
.name(xxx)
...
.build()
// this facade hides serie reference transfer to indicator and eliminates space for mistakes
var indicatorFactory = barSerie.indicatorFactory()
var sma = indicatorFactory.sma(50);
var macd = indicatorFactory.macd(12, 26);
new Indicator(xxx) // compile error, use Factory please.
Another proposal of structure change is related to parsing helpers.
Why CsvBarSeriesParser is in example? :) It is useful easy implementation of backtests.
Why not create ta4j-csv module for CSV parsing? ta4j-json for json parsing?
It is easier to fetch data from yfinance and write csv in expected format than fetch data from yfinance to some own csv and then write own parser. Provision of basic parser would save me some time.
from ta4j.
TODO look closely at NumericIndicator, which I have found just now.
from ta4j.
Related Issues (20)
- Zig Zag indicator implementation question HOT 3
- Create releases more often HOT 23
- Trade style specific question [Support and resistence] HOT 8
- Can ta4j backtest trading multiple stocks simultaneously HOT 2
- [BUG] ProfitLossCriterion: Javadoc says "excludes trading costs" but code uses trading cost HOT 5
- Backtest with fixed entry amount like a new BarSeriesManager or Strategy
- [BUG] VersusEnterAndHoldCriterion should use 'amount' to match comparsion
- [BUG]
- [BUG] HOT 1
- Suggestion to secure the correct functionality of the library HOT 3
- SMAIndicator inner cache
- Improve stability propagation HOT 7
- Distinction between Rule and Indicator HOT 2
- Move minimal supported base JDK at least to JDK 21 HOT 1
- Indicator and BarSerie should not be responsible for managing constants nor series HOT 2
- Implement reversal candles indicator
- [BUG] Contractf of Num.compareTo is broken
- how to test a strategy with averaging? HOT 3
- [BUG] VarianceIndicator calculation seems to be wrong HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ta4j.