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

[GPT] enable historical signals fetch #1089

Merged
merged 7 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Evaluator/TA/ai_evaluator/ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, tentacles_setup_config):
self.indicator = None
self.source = None
self.period = None
self.min_confidence_threshold = 0
self.min_confidence_threshold = 100
Copy link
Member

Choose a reason for hiding this comment

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

This is the default value?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, we don't want to round to 1 below 100% confidence by default

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure I understand. I haven't seen any 100% confidence value sent by gpt

self.gpt_model = gpt_service.GPTService.DEFAULT_MODEL
self.is_backtesting = False
self.min_allowed_timeframe = os.getenv("MIN_GPT_TIMEFRAME", None)
Expand Down
7 changes: 6 additions & 1 deletion Evaluator/TA/ai_evaluator/tests/test_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def test_indicators(GPT_evaluator):
def test_get_candles_data_api(GPT_evaluator):
for source in GPT_evaluator.SOURCES:
GPT_evaluator.source = source
assert isinstance(GPT_evaluator.get_candles_data_api(), types.FunctionType)
if GPT_evaluator.source not in GPT_evaluator.get_unformated_sources():
assert isinstance(GPT_evaluator.get_candles_data_api(), types.FunctionType)


def test_parse_prediction_side(GPT_evaluator):
Expand All @@ -57,3 +58,7 @@ def test_parse_confidence(GPT_evaluator):
assert GPT_evaluator._parse_confidence("up 54.33%") == 54.33
assert GPT_evaluator._parse_confidence("down 70% confidence blablabla") == 70
assert GPT_evaluator._parse_confidence("Prediction: down 70%") == 70
GPT_evaluator.min_confidence_threshold = 60
assert GPT_evaluator._parse_confidence("up 70%") == 100
assert GPT_evaluator._parse_confidence("up 60%") == 100
assert GPT_evaluator._parse_confidence("up 59%") == 59