-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add True Momentum Oscillator (TMO) #729
Conversation
7113fbf
to
4dde8ee
Compare
@twopirllc can you please confirm that in tests_studies.py:12 one should add the columns a new indicator introduces? Is this to be accounted for and added as well in test_studies.py:33 by adding the N columns your indicator introduces, into the Thanks in advance. |
0b5cabe
to
4df3087
Compare
Added TMO indicator, defaults 14/5/3 values. See documentation for the calculation, defaults, and variants presented by some common platforms. Added example jupyterlab notebook showing how with the present information is trivial to compute the variants that other platforms present. Added plots with matplotlib, plotly, bokeh, with conditional shading.
354f87c
to
274efc0
Compare
Good questions. Was the quickest solution I could come up with without trying to dynamically figure it out. 😅
Yes
Yes
I don't recall off the top of my head. But my gut says no. Thanks for the help! 😎 |
@twopirllc thank you, i guess we're good to go with this PR, unless anything missed my attention. Tests with numba were matching the Pandas and Numpy approach, with slight numerical precision issues i believe. This warrants further tests and timings. If you're heading in that direction let me know and i can submit another PR later with a faster numpy+numba+combined convolution approach. |
I would prefer to take care of the numpy/numba version soon than later. Also a later PR is totally fine. No rush. 😎 |
@twopirllc Ok. Feel free to merge this at will then. Performance wise it's not bad, since the moving averages are already optimized and using TA-lib if available as well. I'll investigate the numerical issues with the combined kernel approach, but have in mind that by virtue of allowing the user to specify the moving average type, we might need to combine the summation with all the alternative MAs. This might pose a problem if you have piecewise functions, since you would end up with non-standard convolutions, and the cost benefit ratio might not justify the investment. |
Hey @luisbarrancos, Thanks again for contribution and patience to the library! 😎 I did some refactoring here and there and modified the columns names slightly. When you get a chance, can you give it spin to make sure it works as intended after my adjustments. Thanks, |
@twopirllc no worries really. It's a perfect excuse to spend more time with stochastic calculus and signal processing. As discussed earlier, i'm investigating the possibility of optimizing this further by combining the sum and initial MA kernels, which might be beneficial if you have particularly large time series to process, but this will be for another PR. Thanks for the PR review(s) and suggestions. |
Yeah, those are interesting fields. 😎
Awesome. I avoided substituting calculation alternatives at this time. It's not slow on my end.
Don't worry about the stuff you missed too much. Especially variable names and resultant
Sounds great! Looking forward to it. I appreciate all your help. 😎 Thanx |
Added TMO indicator, addressing issue #700. defaults 14/5/3 values. See documentation for the calculation, defaults, and variants presented by some common platforms, also listed in the references.
Added example jupyterlab notebook showing how we can trivially compute the necessary information to replicate the expected results from other platforms. Added as well the respective plots with matplotlib, plotly, bokeh, with conditional shading.