Skip to content
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

Momentum Indicators - RSI, MACD #119

Open
pythonhacker opened this issue Jul 31, 2023 · 8 comments · May be fixed by #131
Open

Momentum Indicators - RSI, MACD #119

pythonhacker opened this issue Jul 31, 2023 · 8 comments · May be fixed by #131
Labels
enhancement New feature or request

Comments

@pythonhacker
Copy link

pythonhacker commented Jul 31, 2023

First of all thanks for the great work. This package is amazing!

I think apart from moving averages and related bollinger bands, indicators like RSI would add relative strength to the package (pun intended). Let me know what you think.

This issue is about adding a feature for plotting RSI indicators using a 14 day window as suggested using the approach here -> https://www.alpharithms.com/relative-strength-index-rsi-in-python-470209/

Update: Edited the issue and generalized it over a number of momentum indicators. I can go ahead and implement them all or we can discuss it if you have suggestions.

@pythonhacker
Copy link
Author

I have completed an implementation of this in my fork of the project - https://github.com/pythonhacker/FinQuant/tree/feature/rsi-indicator.
Screenshot_2023-07-31_17-50-07

@fmilthaler
Copy link
Owner

Hey @pythonhacker :)
Awesome, appreciate both, the suggestion as well as your work on the implementation. I'll look over the PR in the next few days. :)

@pythonhacker pythonhacker changed the title Technical Indicators - RSI Momentum Indicators - RSI, MACD, SMI, ROC, CCI, Williamson Aug 1, 2023
@pythonhacker
Copy link
Author

pythonhacker commented Aug 1, 2023

I am right now using this project on a jupyter notebook to make decisions over stocks to invest in the highly bullish stock market of my country (India), so I am bullish on this project as well.

pythonhacker added a commit to pythonhacker/FinQuant that referenced this issue Aug 1, 2023
@pythonhacker
Copy link
Author

Here is an implementation of MACD in the same PR. See attached figure.
Screenshot_2023-08-02_00-00-57

@fmilthaler
Copy link
Owner

Man, really love this. :)
And happy to hear that you are using FinQuant to invest and making the project even better.

And feel free to add more such indicators if you please.

Just a friendly reminder:

While FinQuant has tests in place that are run automatically by GitHub Actions, it cannot guarantee to be bug free, nor that the analysis or optimised portfolio yield to wealth. Please use at your own discretion and refer to the License.

Source: FinQuant's documentation ;)

@fmilthaler fmilthaler added the enhancement New feature or request label Aug 3, 2023
fmilthaler pushed a commit that referenced this issue Aug 5, 2023
Implementation of RSI momentum indicator, ref ->
#119
@fmilthaler fmilthaler linked a pull request Aug 5, 2023 that will close this issue
pythonhacker added a commit to pythonhacker/FinQuant that referenced this issue Aug 6, 2023
@pythonhacker
Copy link
Author

@fmilthaler - Added documentation and unit test. Let me know if this looks good.

@fmilthaler
Copy link
Owner

Hey, thank you for adding those. I've already merged your branch into FinQuant's branch feature/rsi-indicator so that I could play around with it myself. Could you open a new PR and set it up to be merged into said branch? Thanks for adding those.
On a related note though, I stumbled upon this project: https://github.com/matplotlib/mplfinance
It adds support for all kinds of financial indicators. All you need to feed it is data in form of a dataframe. I haven't tried yet, but I believe this would work nicely in combination with FinQuant, as in you have your data in a Portfolio instance from FinQuant, and then feed that (example: pf.data) into the functions provided by mplfinance.

@pythonhacker
Copy link
Author

pythonhacker commented Aug 7, 2023

Hey, thank you for adding those. I've already merged your branch into FinQuant's branch feature/rsi-indicator so that I could play around with it myself. Could you open a new PR and set it up to be merged into said branch? Thanks for adding those. On a related note though, I stumbled upon this project: https://github.com/matplotlib/mplfinance It adds support for all kinds of financial indicators. All you need to feed it is data in form of a dataframe. I haven't tried yet, but I believe this would work nicely in combination with FinQuant, as in you have your data in a Portfolio instance from FinQuant, and then feed that (example: pf.data) into the functions provided by mplfinance.

Looks good, may I suggest we look into this as an enhancement over the current code ? Let us merge this first and in another set of feature issues, refactor the code to use mplfinance . Meanwhile I will create the 2nd PR.

fmilthaler pushed a commit that referenced this issue Aug 15, 2023
@pythonhacker pythonhacker changed the title Momentum Indicators - RSI, MACD, SMI, ROC, CCI, Williamson Momentum Indicators - RSI, MACD Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants