Repository navigation
[Evaluators] add Drex strategy evaluators and DrexEvaluator - #3775
Closed
chichengmessi wants to merge 2 commits into
Closed
chichengmessi wants to merge 2 commits into
chichengmessi wants to merge 2 commits into
Conversation
Contributor
|
No third party API please |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add optional Drex versions of the AI strategy evaluators and of
GPTEvaluator: same inputs and eval note scale, used only whenNACE_API_KEYis set, falling back to the existing LLM path on any Drex error.Related issue: #3774 (the TA eval note convention the Drex strategy evaluators pass along)
Changelog
CryptoDrexStrategyEvaluatorandGlobalDrexStrategyEvaluator(Evaluator/Strategies/drex_strategy_evaluator): the LLM strategy evaluators, with the agent team's decision answered by one Drex request.DrexEvaluator(Evaluator/TA/drex_evaluator):GPTEvaluator, with the up/down call answered by Drex.What's new?
Drex strategy evaluators. The LLM strategy evaluators send the TA, social and real-time notes to a team of LLM agents, which summarize them into an eval note from -1 (strong sell) to 1 (strong buy). The Drex versions override only
_run_agents_analysis:POST /v1/systemonewith the sameaggregated_dataand missing evaluator types, plus what each evaluator type's note means. OctoBot's TA and real-time evaluators use -1 for buy; social evaluators use 1 for positive.scorequestion with five stances, strong sell to strong buy.Drex: Buy (Strong sell 0%, Sell 1%, Neutral 2%, Buy 74%, Strong buy 23%). The AI Index trading mode reads both as before.Measured on 60 constructed cases (evaluator notes that clearly point to buy, sell or neutral: 30 per-crypto TA setups, 30 global fear and greed / market cap / news setups), each run twice, through the real
_run_agents_analysis, against the agent team ongpt-6-luna:The last row mostly comes from the input. The agents get the TA notes without the -1 = buy convention, so they read them the other way (10/30 TA setups, #3774). Given the same convention, the agent team gets 59/60.
DrexEvaluator.
GPTEvaluatorwithask_gptanswered by one yes/no Drex question on the same candle data: will the next candle close above the last close? The probability is written in GPTEvaluator'sup 62%format, so the threshold and profile settings work unchanged. With the key set, backtesting asks Drex for each candle instead of loading stored ChatGPT signals, so it works on any pair and date range.Neither model predicts the next 4h candle better than chance from 20 raw candles.
Behaviour
NACE_API_KEYand selecting the Drex tentacle instead of the one it extends, with the same settings.GPTEvaluator.aiohttp).NACE_DEFAULT_DECISION_MODEL(defaultdrex-max-finance) andNACE_BASE_URLare optional.X-Nace-Client/User-Agent: octobot/<LONG_VERSION>.Tests
pytest tentacles/Evaluator/Strategies/drex_strategy_evaluator/tests tentacles/Evaluator/TA/drex_evaluator/tests tentacles/Evaluator/TA/ai_evaluator/tests: 14 passed.DrexEvaluatorin a copy of GPT Trading: every request returned 200, with the headers above.DrexEvaluator: a 401 warning per candle, then a ChatGPT answer. The strategy fallback is covered by the unit tests.gpt-6-lunaon tool calls ("Function tools with reasoning_effort are not supported"). Withgpt-4.1-mini, the distribution agent skips ("missing signal_synthesis and risk_output"). I can open separate issues for those.Benchmark (Nace's Financial Decisions Benchmark, 48 held-out finance benchmarks, 3,361 decisions):
Disclosure: I work at Nace, which makes Drex.