pandas-ta
pandas-ta copied to clipboard
Arms Index (TRIN)
@reza1615,
Sure. Currently I do not have implementation time. So hopefully someone is willing to help making a PR and contribute.
Kind Regards, KJ
Hi @twopirllc , can I take up this issue. @reza1615, could you just tell me under which category Arms Index (TRIN) indicator comes?
I couldn't find its category. Base on the definition page. it is a overal market sentiment. In my opinion it should be under performance or momentum like rsi it shows overbought
Hello @reza1615 and @ramgarg102,
Base on the definition page. it is a overal market sentiment.
After double checking trin, it is classified as a Market Sentiment or Comparative Analysis indicator just like the Price Relative Indicator in Issue #161. It is more of "macro" indicator that utilizes two or more symbols/tickers and thus can not be included as a DataFrame Extension indicator like all the others df.ta.sma()
, df.ta.sma()
, et al. All the normal categorical indicators work for a single DataFrame ticker/symbol.
However I am not opposed to including trin and #161. They will need their own Category likely named comparative
. Also, it should be noted that it is the user's responsibility to manually pd.concat
the results on their own if needed.
Thoughts?
KJ
Hello @twopirllc
Why would the users need to manually use pd.concat()
if they can use (suppose we add Trin) df.ta.trin(append=True)
?
Does Trin being dependent on other indicators has something to do with it?
@ramgarg102
Does Trin being dependent on other indicators has something to do with it?
No.
Why would the users need to manually use pd.concat() if they can use (suppose we add Trin) df.ta.trin(append=True)?
Well a Pandas TA DataFrame is meant to represent a single ticker/symbol whereas trin depends on a basket of symbols as I described in my previous comment. TRIN typically aggregates all 500 symbols of the S&P 500 index or 50 for the Nifty 50, as detailed in the Quantinsti python code.
So in my mind it makes sense to exclude as a DataFrame Extension method. But if it were included as a DataFrame Extension method df.ta.trin(append=True)
it will need to be excluded from df.ta.strategy()
(but that's a simple fix).
KJ
So, finally what to do?
@ramgarg102,
Either implement it, wait for it to be implemented, or implement in your own forked repo. Up to you.
KJ