Skip to content

Enhancement: Add RSI and MACD technical indicators #11#36

Merged
bratergit merged 12 commits into
bratergit:mainfrom
adalbertobrant:main
Oct 8, 2025
Merged

Enhancement: Add RSI and MACD technical indicators #11#36
bratergit merged 12 commits into
bratergit:mainfrom
adalbertobrant:main

Conversation

@adalbertobrant

Copy link
Copy Markdown
Contributor

@bratergit just pull

Update repo from bratergit
This commit extends the `B3Data` module to include the calculation of Relative Strength Index (RSI) and Moving Average Convergence Divergence (MACD) indicators for the fetched stock data.

- Adds `pandas-ta` as a new dependency.

- Implements a `calculate_indicators` method in the `B3Data` class to compute the RSI and MACD.

- Updates the `get_stock_data` method to include the new indicators in the returned DataFrame.

- Modifies the test suite to verify the presence of the new indicator columns.
@bratergit bratergit self-requested a review October 8, 2025 16:43
@bratergit bratergit added hacktoberfest hacktoberfest 2025 hacktoberfest-accepted enhancement New feature or request labels Oct 8, 2025
@bratergit bratergit marked this pull request as draft October 8, 2025 16:46
@bratergit

Copy link
Copy Markdown
Owner

@adalbertobrant , please review and fix:

Run flake8
./app.py:2:1: F401 'pandas as pd' imported but unused
./app.py:4:80: E501 line too long (98 > 79 characters)
./app.py:6:1: E302 expected 2 blank lines, found 1
./app.py:10:80: E501 line too long (120 > 79 characters)
./app.py:24:1: W293 blank line contains whitespace
./app.py:28:1: W293 blank line contains whitespace
./app.py:30:1: W293 blank line contains whitespace
./app.py:32:80: E501 line too long (104 > 79 characters)
./app.py:33:80: E501 line too long (114 > 79 characters)
./app.py:34:1: W293 blank line contains whitespace
./app.py:36:80: E501 line too long (118 > 79 characters)
./app.py:37:80: E501 line too long (105 > 79 characters)
./app.py:38:1: W293 blank line contains whitespace
./app.py:41:1: W293 blank line contains whitespace
./app.py:43:80: E501 line too long (109 > 79 characters)
./app.py:44:1: W293 blank line contains whitespace
./app.py:46:1: W293 blank line contains whitespace
./app.py:49:1: W293 blank line contains whitespace
./app.py:51:80: E501 line too long (81 > 79 characters)
./app.py:53:1: W293 blank line contains whitespace
./app.py:57:1: W293 blank line contains whitespace
./app.py:60:80: E501 line too long (109 > 79 characters)
./app.py:62:1: W293 blank line contains whitespace
./app.py:65:80: E501 line too long (88 > 79 characters)
./app.py:67:1: E305 expected 2 blank lines after class or function definition, found 1
./examples/fetch_b3.py:2:30: E231 missing whitespace after ','
./src/data/init.py:3:21: W292 no newline at end of file
./src/data/b3_data.py:5:1: F401 'pandas_ta as ta' imported but unused
./src/data/b3_data.py:7:80: E501 line too long (94 > 79 characters)
./src/data/b3_data.py:9:1: E302 expected 2 blank lines, found 1
./src/data/b3_data.py:25:80: E501 line too long (86 > 79 characters)
./src/data/b3_data.py:32:80: E501 line too long (98 > 79 characters)
./src/data/b3_data.py:36:80: E501 line too long (95 > 79 characters)
./src/data/b3_data.py:43:80: E501 line too long (101 > 79 characters)
./src/data/b3_data.py:55:1: W293 blank line contains whitespace
./src/data/b3_data.py:66:1: W293 blank line contains whitespace
./src/data/fx_scraper.py:4:1: E302 expected 2 blank lines, found 1
./src/data/fx_scraper.py:15:1: W293 blank line contains whitespace
./src/data/fx_scraper.py:20:1: W293 blank line contains whitespace
./src/ml/predict.py:6:80: E501 line too long (85 > 79 characters)
./src/utils/init.py:1:1: F401 '.investment_calculator.calculate_investment_value' imported but unused
./src/utils/init.py:1:1: F401 '.investment_calculator.investment_growth_schedule' imported but unused
./src/utils/init.py:1:80: E501 line too long (89 > 79 characters)
./src/utils/investment_calculator.py:1:1: F401 'typing.Union' imported but unused
./src/utils/investment_calculator.py:4:1: E302 expected 2 blank lines, found 1
./src/utils/investment_calculator.py:12:80: E501 line too long (96 > 79 characters)
./src/utils/investment_calculator.py:13:1: W293 blank line contains whitespace
./src/utils/investment_calculator.py:17:80: E501 line too long (89 > 79 characters)
./src/utils/investment_calculator.py:19:80: E501 line too long (106 > 79 characters)
./src/utils/investment_calculator.py:20:1: W293 blank line contains whitespace
./src/utils/investment_calculator.py:27:1: W293 blank line contains whitespace
./src/utils/investment_calculator.py:31:1: W293 blank line contains whitespace
./src/utils/investment_calculator.py:34:1: W293 blank line contains whitespace
./src/utils/investment_calculator.py:38:80: E501 line too long (110 > 79 characters)
./src/utils/investment_calculator.py:41:1: W293 blank line contains whitespace
./src/utils/investment_calculator.py:44:1: E302 expected 2 blank lines, found 1
./src/utils/investment_calculator.py:53:1: W293 blank line contains whitespace
./src/utils/investment_calculator.py:60:1: W293 blank line contains whitespace
./src/utils/investment_calculator.py:62:80: E501 line too long (106 > 79 characters)
./src/utils/investment_calculator.py:66:1: W293 blank line contains whitespace
./src/utils/investment_calculator.py:69:1: W293 blank line contains whitespace
./src/utils/investment_calculator.py:76:1: W293 blank line contains whitespace
./src/utils/investment_calculator.py:78:80: E501 line too long (83 > 79 characters)
./src/utils/investment_calculator.py:81:1: W293 blank line contains whitespace
./src/utils/investment_calculator.py:83:1: W293 blank line contains whitespace
./src/utils/investment_calculator.py:90:1: W293 blank line contains whitespace
./tests/test_b3_data.py:4:1: E302 expected 2 blank lines, found 1
./tests/test_b3_data.py:7:41: E231 missing whitespace after ','
./tests/test_b3_data.py:9:21: E231 missing whitespace after ','
./tests/test_b3_data.py:10:23: E231 missing whitespace after ','
./tests/test_b3_data.py:15:41: W292 no newline at end of file

@adalbertobrant adalbertobrant marked this pull request as ready for review October 8, 2025 17:32
@bratergit bratergit merged commit 341172c into bratergit:main Oct 8, 2025
1 check failed

@bratergit bratergit left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@bratergit bratergit added good first issue Good for newcomers feature labels Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature good first issue Good for newcomers hacktoberfest hacktoberfest 2025 hacktoberfest-accepted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants