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

[Model/trade] Technical indicators support #1579

Open
3 of 8 tasks
trizin opened this issue Sep 3, 2024 · 0 comments
Open
3 of 8 tasks

[Model/trade] Technical indicators support #1579

trizin opened this issue Sep 3, 2024 · 0 comments
Labels
Type: Enhancement New feature or request

Comments

@trizin
Copy link
Contributor

trizin commented Sep 3, 2024

Background

The Python ta library has 200+ "technical analysis" indicators. Taking these as inputs (along with their interactions, eg -, /, *) could be very useful. (from #1406)

TODOs

Step1: #1578

  • Implement ta interfaces/classes into pdr-backend
  • Update predict_train_feedsets to accept an array of technical indicators
  • Indicators are calculated & used as a feature in simengine

Step2:

  • Create technical indicator string class to parse parameters
  • More indicators
  • Use pdr sim to assess performance compared to our status quo
  • Try variants. Eg with different interactions, different ML models

Step3:

  • Predictoor integration
@trizin trizin added the Type: Enhancement New feature or request label Sep 3, 2024
trizin added a commit that referenced this issue Sep 5, 2024
* Add ta_features parameter to PredictTrainFeedset constructor

* Add ta_features parameter to PredictTrainFeedset constructor

* Add TechnicalIndicator class for calculating technical indicators

* formatting

* Add MACD technical indicator class

* Add RSI technical indicator class

* Add get_ta_indicator function for retrieving technical indicator class

* Add ta_features parameter to SimEngine constructor

* Formatting

* Add ta_features parameter to ppss.yaml

* Format

* Add technical indicator features to AimodelDataFactory

The code changes in `aimodel_data_factory.py` introduce the `ta_features` parameter to the `AimodelDataFactory` class. This parameter allows for the calculation of technical indicator features based on the provided feeds. The technical indicators are retrieved using the `get_ta_indicator` function, which has been added in a recent commit.

* add ta

* assert correct

* Typo fix

* Refactor TechnicalIndicator constructor parameter names for clarity

* linter

* linter

* Formatting

* Add mypy configuration for ta package

* Better handling

* remove unused import

* Readability

* formatting

* Add MockTechnicalIndicator for testing purposes

* Add conftest.py for technical indicators tests

* test get_ta_indicator

* Add unit test for MACD indicator

* test RSI calculation against ta library

* test TechnicalIndicator

* Linter fixes

* Update tests

* linter fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant