One of the goals is to also gather things which have already been posted by community members. Always retaining the copyright they have posted, as for example:
Docs - ZigZag indicator for live trading
If you believe you have something to contribute, post it and it will be considered, just like anything else, but picked up things (initial idea) will be mostly related to indicators.
How could I simulate the following behavior in BT:
Once a position is closed (D+0) and there is profit, the broker will pay you only 3 days after, in D+3 (these are the rules in Brazil)
I need to incorporate this in my backtest. I guess it has to do with checksubmit, but how could I delay the cash adjust?
I"m new to backtrader, I"m writing my first serious strategy and I want to correlate
the current data to SMA("SPY"),
for example, divide current close with current SMA("SPY") read in my strategy.
Semathically something like this:
buy1 = self.data.close / indicators.SMA("SPY")
The "SPY" part should be static no matter which symbol I"m currently working.
Ultimately I want to compare my symbol to the leading trend.
bta-lib is a new pandas based technical analysis library focused on being easy to use, reuse and with a framework to allow quick indicator prototyping and development.
For those with no time to read and eger to click on GitHub links:
The repo is at: bta-lib github repo - https://github.com/mementum/bta-lib
The rationale behind the library
In several threads here it was mentioned that plenty of the python-based (or with python bindings) technical analysis libraries populating GitHub are broken to a greater or lesser extent. Rather than broken one can also say that they contain I3 Indicators, i.e.: Improperly Implemented Indicators. Yes, even ta-lib imho.
Should you have interest in a practical example, the documentation contains a section named: I3 Indicators with a practical example featuring ta-lib and the MACD
The link: I3 Indicators - ta-lib and MACD - https://btalib.backtrader.com/i3indicators/
Hence the birth of this library, which in addition to the aforementioned goals, tries to offer correct implementations of the indicators (and a backwards compatibility flag to ta-lib where desired by the end user)
What's in place so far:
The framework to make things palatable, i.e.: easy
A test framework to ensure things don't break when making changes
Full Documentation ... only missing the indicator development part
36 indicators which have been the basis to proof the framework is sound
The classic indicators such as SMA, EMA, RSI, Stochastic, MACD, ATR were the first targets for the development (given that some of them are often improperly implemented)
The next steps
Develop extra indicators, to get close to 100, roughly following the ta-lib API, except for candlestick pattern formation (longer term goal)
Consider a couple of small internal enhancements to the API to address use cases in which the input naming is actually irrelevant for an indicator or n-plicated naming would be a feature
None of these changes will mean a change for the end user and would only "add" to the internal Indicator development facilities