Skip to content

feat: add inventory-aware market making benchmark#93

Open
luyq-hhh wants to merge 3 commits into
EinsiaLab:mainfrom
luyq-hhh:feat/MarketMaking/suite
Open

feat: add inventory-aware market making benchmark#93
luyq-hhh wants to merge 3 commits into
EinsiaLab:mainfrom
luyq-hhh:feat/MarketMaking/suite

Conversation

@luyq-hhh

@luyq-hhh luyq-hhh commented Jul 13, 2026

Copy link
Copy Markdown

中文说明

本 PR 新增 MarketMaking/InventoryAwareQuoting,作为 Frontier-Engineering 中 MarketMaking 方向的库存感知报价任务。

该任务模拟一个做市台在多资产环境下进行双边报价:候选策略需要根据库存、市场体制、流动性状态和自然语言 desk mandate,动态决定 bid/ask offset 与 size,并在收益、库存风险、流动性供给和逆向选择防御之间取得平衡。

核心设计

  • 引入自然语言 desk_mandate,覆盖流动性支持、adverse-selection 防御和库存回收等目标。
  • 不同市场体制下存在互斥约束,例如 quiet regime 鼓励提供更大流动性,而 toxic regime 要求缩小挂单规模。
  • 采用分层 action 校验:schema 完整性 → 数值范围 → 做市台约束与风险约束。
  • 返回稳定、可区分的违规类别,方便 Agent 根据 verifier feedback 调试。
  • candidate 在独立 worker 进程中运行,降低状态泄露和 evaluator 被篡改的风险。
  • 补充 task config 与 baseline/result_log.txt,方便 reviewer 复现。

English Summary

This PR adds MarketMaking/InventoryAwareQuoting, an inventory-aware quoting benchmark for the MarketMaking domain in Frontier-Engineering.

The task evaluates whether an agent can design a feasible market-making policy that adapts bid/ask offsets and sizes under inventory pressure, market regimes, liquidity requirements, adverse-selection risk, and natural-language desk mandates.

Key Features

  • Natural-language desk_mandate instructions are injected into the observation and enforced by the verifier.
  • Mutually different regime constraints make the task harder to solve with a static numeric/grid-search policy.
  • Action validation is layered into schema checks, numeric range checks, and semantic/risk constraints.
  • Stable violation categories provide actionable feedback for iterative agent improvement.
  • Candidate code runs in an isolated worker process to reduce leakage and evaluator tampering risk.
  • Task config and baseline result log are included for reproducibility.

Quality Assurance

  • Direct baseline evaluation: 20/20 feasible scenarios.
  • Baseline combined score recorded in baseline/result_log.txt.
  • Local regression tests recorded in baseline/result_log.txt.
  • Review feedback addressed:
    • richer task dimension through natural-language mandates;
    • clearer schema/range/constraint validation;
    • PascalCase task directory naming;
    • task run config added;
    • baseline/result_log.txt added.

@github-actions

Copy link
Copy Markdown

🤖 AI Code Review (gemini-3-flash-preview)

🇬🇧 English Analysis

1. Executive Summary

  • Core Purpose: This PR introduces a new benchmark task titled inventory_aware_quoting under the MarketMaking domain. It provides a deterministic, offline simulator for market-making control, focusing on inventory management, adverse selection, and spread capture across synthetic equity pairs.
  • Modified File Structure & Modifications:
    • TASK_DETAILS.md & TASK_DETAILS_zh-CN.md: Registered the new MarketMaking domain and inventory_aware_quoting task in the global registry.
    • benchmarks/MarketMaking/README.md (and zh-CN): Created domain-level documentation explaining the dual-listing fair value concept.
    • benchmarks/MarketMaking/inventory_aware_quoting/README.md (and zh-CN): Provided setup instructions, direct evaluation commands, and regression test steps.
    • benchmarks/MarketMaking/inventory_aware_quoting/Task.md (and zh-CN): Detailed the technical specifications, including the market simulator logic, observation/action schemas, and the multi-objective scoring function.
    • benchmarks/MarketMaking/inventory_aware_quoting/frontier_eval/: Added framework-specific configuration files (agent_files.txt, eval_command.txt, etc.) to integrate with the frontier_eval unified evaluator.
    • benchmarks/MarketMaking/inventory_aware_quoting/references/: Added config.json for scenario seeds and design_notes.md explaining the modeling choices (inspired by ABIDES).
    • benchmarks/MarketMaking/inventory_aware_quoting/scripts/init.py: Provided a baseline policy implementing a linear inventory skew logic.
    • benchmarks/MarketMaking/inventory_aware_quoting/verification/: Implemented the core evaluator.py, simulator.py, and process isolation logic (policy_runtime.py, policy_worker.py).

2. AI Content Analysis

  • Estimated AI Component: 15%
  • Reasoning & Evidence: The core logic, particularly the DualMarketSimulator and the process isolation in policy_runtime.py, exhibits high domain-specific nuance (e.g., handling maker/taker fees, adverse selection, and PCG64-based reproducibility) that is atypical for generic AI generation. The documentation is highly structured and consistent, suggesting AI was likely used for translation (English to Chinese) and generating standard boilerplate for the frontier_eval configuration files. The baseline policy in init.py is a classic "textbook" implementation of inventory skew, which could be AI-generated but fits the requirement for a simple starting point.

3. Engineering & Economic Assessment

  • Engineering Reality Check: This is a production-grade engineering benchmark. It avoids the "toy example" trap by implementing:
    1. Process Isolation: Running candidate code in a separate worker process to prevent state leakage and evaluator mutation.
    2. Deterministic Reproducibility: Pre-generating all exogenous shocks to ensure fair comparison between agents.
    3. Realistic Constraints: Enforcing inventory limits, liquidity service requirements, and maker/taker fee structures.
  • Economic Value: High. For quantitative finance and AI research, this provides a low-latency, high-fidelity environment to test market-making agents without the infrastructure overhead of a live exchange or the complexity of full order-book simulators like ABIDES. It reduces technical debt for researchers by providing a standardized evaluation harness.

4. Quality Assurance

  • Verification & Testing:
    • frontier_eval Integration: Yes.
    • task_name: MarketMaking/inventory_aware_quoting
    • Execution & Dependencies: The README.md clearly documents pip install -r verification/requirements.txt and provides the exact python -m frontier_eval command for unified evaluation.
  • Documentation Quality: Excellent. The documentation provides both high-level context and low-level technical details (e.g., the tanh scoring map). No significant grammatical errors or formatting inconsistencies were detected. The dual-language support is comprehensive.
  • Organizational Structure: The structure is highly logical and follows the established patterns of the frontier_eval repository. The separation of verification (internal logic) and scripts (user-editable code) is clear.

5. Security & Privacy Check

  • Sensitive Files: Clean. No .env, API keys, or IDE-specific files (.vscode/) were found.
  • Absolute Paths: None detected. The evaluator.py correctly uses Path(__file__).resolve().parents[1] to handle relative pathing.

🇨🇳 中文分析

1. 摘要

  • 核心目的: 此 PR 在 MarketMaking 领域下引入了一个名为 inventory_aware_quoting 的新基准任务。它提供了一个确定性的、离线的做市控制模拟器,重点关注合成股票对的库存管理、不利选择和价差获取。
  • 修改的文件结构与变更摘要:
    • TASK_DETAILS.md & TASK_DETAILS_zh-CN.md: 在全局注册表中注册了新的 MarketMaking 领域和 inventory_aware_quoting 任务。
    • benchmarks/MarketMaking/README.md (及中文件): 创建了领域级文档,解释了双重上市公允价值的概念。
    • benchmarks/MarketMaking/inventory_aware_quoting/README.md (及中文件): 提供了环境准备、直接评测命令和回归测试步骤。
    • benchmarks/MarketMaking/inventory_aware_quoting/Task.md (及中文件): 详细说明了技术规范,包括市场模拟器逻辑、观察/动作模式以及多目标评分函数。
    • benchmarks/MarketMaking/inventory_aware_quoting/frontier_eval/: 添加了框架特定的配置文件,以便与 frontier_eval 统一评测器集成。
    • benchmarks/MarketMaking/inventory_aware_quoting/references/: 添加了用于场景种子的 config.json 和解释建模选择(受 ABIDES 启发)的 design_notes.md
    • benchmarks/MarketMaking/inventory_aware_quoting/scripts/init.py: 提供了一个实现线性库存偏移逻辑的基线策略。
    • benchmarks/MarketMaking/inventory_aware_quoting/verification/: 实现了核心的 evaluator.pysimulator.py 和进程隔离逻辑。

2. AI 成分分析

  • 预估 AI 含量: 15%
  • 判断依据与证据: 核心逻辑(特别是 DualMarketSimulatorpolicy_runtime.py 中的进程隔离)表现出高度的领域专业性(如处理 maker/taker 费用、不利选择和基于 PCG64 的可复现性),这在通用 AI 生成中并不常见。文档结构高度统一,表明 AI 可能被用于翻译(英译中)和生成 frontier_eval 配置文件的标准模板。init.py 中的基线策略是经典的“教科书式”库存偏移实现,虽然可能是 AI 生成的,但符合简单入门示例的要求。

3. 工程与经济评估

  • 工程现实检验: 这是一个生产级别的工程基准任务。它通过以下方式避免了“玩具示例”的陷阱:
    1. 进程隔离: 在独立的 worker 进程中运行候选代码,防止状态泄露和评测器被篡改。
    2. 确定性可复现性: 预先生成所有外生冲击,确保 Agent 之间的公平比较。
    3. 现实约束: 强制执行库存限制、流动性服务要求以及 maker/taker 费用结构。
  • 经济价值: 。对于量化金融和 AI 研究,它提供了一个低延迟、高保真的环境来测试做市 Agent,而无需真实交易所的基础设施开销,也无需像 ABIDES 那样复杂的全订单簿模拟器。它通过提供标准化的评估工具减少了研究人员的技术债务。

4. Quality Assurance

  • 验证与测试:
    • frontier_eval 集成: 是。
    • task_name: MarketMaking/inventory_aware_quoting
    • 运行与依赖: README.md 清晰地记录了 pip install -r verification/requirements.txt 并提供了统一评测的准确命令。
  • 文档质量: 优秀。文档提供了高层背景和底层技术细节(如 tanh 评分映射)。未检测到明显的语法错误或格式不一致。双语支持非常全面。
  • 组织结构: 文件组织逻辑性强,遵循了 frontier_eval 仓库的既定模式。verification(内部逻辑)和 scripts(用户可编辑代码)的分离非常清晰。

5. 安全与隐私检查

  • 敏感文件: 未发现异常。未发现 .env、API 密钥或 IDE 特定文件(如 .vscode/)。
  • 绝对路径: 未检测到evaluator.py 正确使用了 Path(__file__).resolve().parents[1] 来处理相对路径。

@luyq-hhh
luyq-hhh marked this pull request as ready for review July 14, 2026 02:27
@jdp22
jdp22 requested a review from wrh-human July 14, 2026 08:25

@wrh-human wrh-human left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

感谢贡献inventory_aware_quoting MarketMaking领域填补了Frontier-Eng的一个空白,simulator设计干净,双语文档完整,candidate isolation的process boundary做得很到位,测试覆盖也在线。

在合并前,建议关注以下两个与评测设计相关的问题:

1.Task维度可以进一步丰富,避免被纯数值搜索绕过

当前action space只有4个数值(bid/ask offset + bid/ask size)× 3 assets,observation是纯数值序列。这意味着一个agent完全可以用grid search或random search逼近最优策略,而不需要真正理解做市的工程判断(比如如何处理adverse selection、为何inventory skew要做均值回复、不同regime下liquidity的差异意味着什么)。当agent能力超过一个不高阈值后,再多"工程推理"也无法转化为更高的分数——task的区分度上限可能偏低。

建议丰富task的信息维度,让candidate需要做的不仅仅是纯数值回归。例如在observation中加入需要语义理解的内容,或者增加需要写出结构上有意义的代码才能满足的约束,使纯参数搜索无法达到可行解。

2.step_quotes中的异常处理过于宽泛,可能掩盖候选行为的真实问题

当前实现中,step_quotestry/except包裹所有symbol的处理。这意味着缺失key、类型错误、数值越界都会走同一条路径(violation + fallback默认值),evaluator和developer无法区分"candidate的结构是错的"和"数值稍微越界了"。

建议至少加一层前置schema校验,先验证action dict的结构完整性(所有symbol存在、所有key存在、类型正确),再检查数值范围。这样错误路径更清晰,agent的debug反馈也更有用。


非阻塞建议

以下内容不会阻止合入,但后续可以顺手完善:

  1. 任务目录命名 — 现有benchmark统一使用PascalCase(如 BatteryFastChargingProfileCarAerodynamicsSensing),建议将inventory_aware_quoting改为InventoryAwareQuoting,保持风格一致。

  2. 确认是否缺少 run config — 当前没有看到frontier_eval/conf/task/下的task config,建议确认运行时框架是否能自动发现这个task,否则需要补充 yaml 配置。


整体方向没有问题。 核心是确保task不会轻易被纯数值搜索trivialize,以及evaluator的错误路径足够清晰;解决这两个问题后即可继续审核。

@luyq-hhh
luyq-hhh requested a review from wrh-human July 14, 2026 10:59
@github-actions

Copy link
Copy Markdown

🤖 AI Code Review (gemini-3-flash-preview)

🇬🇧 English Analysis

1. Executive Summary

  • Core Purpose: This PR introduces a new benchmark task titled "Inventory-Aware Quoting" under the MarketMaking category. It simulates a market-making scenario where an agent must provide liquidity for synthetic assets while managing inventory risk, adverse selection, and natural language "desk mandates."
  • Modified File Structure & Modifications:
    • TASK_DETAILS.md & TASK_DETAILS_zh-CN.md: Added the MarketMaking/InventoryAwareQuoting entry to the task registry.
    • benchmarks/MarketMaking/InventoryAwareQuoting/README.md (and zh-CN): Provided setup instructions, evaluation commands, and task overview.
    • benchmarks/MarketMaking/InventoryAwareQuoting/Task.md (and zh-CN): Detailed the engineering problem, simulator mechanics, observation/action schemas, and scoring logic.
    • benchmarks/MarketMaking/InventoryAwareQuoting/frontier_eval/: Created configuration files (agent_files.txt, constraints.txt, etc.) to integrate the task into the frontier_eval framework.
    • benchmarks/MarketMaking/InventoryAwareQuoting/references/: Added config.json for scenario seeds and design_notes.md explaining the simulator's theoretical background.
    • benchmarks/MarketMaking/InventoryAwareQuoting/scripts/init.py: Implemented a baseline heuristic policy using inventory skew and mandate-parsing logic.
    • benchmarks/MarketMaking/InventoryAwareQuoting/verification/: Added the core evaluation engine, including evaluator.py (and implied simulator files) which handles process isolation and scoring.

2. AI Content Analysis

  • Estimated AI Component: 15%
  • Reasoning & Evidence: The documentation and task design exhibit high domain-specific nuance (e.g., "adverse selection," "basis points (bps)," "inventory RMS," "maker/taker fees") that suggests expert human authorship. The AI contribution is likely limited to boilerplate code in the evaluator.py or initial translations for the zh-CN documentation. The baseline policy in init.py uses standard algorithmic trading heuristics that are well-structured but common in quantitative finance examples.

3. Engineering & Economic Assessment

  • Engineering Reality Check: This is a high-fidelity "production-grade" simulation. Unlike toy examples, it incorporates realistic constraints such as process isolation for candidates, deterministic pseudo-randomness for reproducibility, and "desk mandates" that force the agent to bridge natural language understanding with numeric optimization. It effectively handles edge cases like position limits and cash constraints.
  • Economic Value: High. For organizations developing AI for quantitative finance, this provides a standardized, low-latency environment to benchmark LLM reasoning in high-stakes, constrained environments. It reduces technical debt by providing a modular, reusable simulation framework.

4. Quality Assurance

  • Verification & Testing:
    • frontier_eval Integration: Yes
    • task_name: inventory_aware_quoting
    • Execution & Dependencies: The README.md clearly documents the pip install requirements and provides exact commands for both direct evaluation and unified frontier_eval execution.
  • Documentation Quality: Excellent. The documentation is comprehensive, providing both the "what" (Task.md) and the "why" (design_notes.md). The dual-language support is consistent. No significant grammatical errors or formatting inconsistencies were detected in the provided diff.
  • Organizational Structure: The structure is logical and scalable. Separating the verification logic from the scripts (agent code) and references (config/notes) follows best practices for benchmark repositories.

5. Security & Privacy Check

  • Sensitive Files: Clean. No .env, API keys, or IDE-specific files (.vscode/) were found in the diff.
  • Absolute Paths: None detected. The code uses Path(__file__).resolve() to handle relative paths dynamically, ensuring portability across different environments.

🇨🇳 中文分析

1. 摘要

  • 核心目的: 此 PR 在 MarketMaking 类别下引入了一个名为 “库存感知做市报价” (Inventory-Aware Quoting) 的新基准任务。它模拟了一个做市场景,要求 Agent 在管理库存风险、不利选择(逆向选择)和处理自然语言“交易台指令”的同时,为合成本地资产提供流动性。
  • 修改的文件结构与变更摘要:
    • TASK_DETAILS.md & TASK_DETAILS_zh-CN.md: 在任务注册表中添加了 MarketMaking/InventoryAwareQuoting 条目。
    • benchmarks/MarketMaking/InventoryAwareQuoting/README.md (及中英版): 提供了环境配置说明、评测命令和任务概览。
    • benchmarks/MarketMaking/InventoryAwareQuoting/Task.md (及中英版): 详细说明了工程问题、模拟器机制、观察/动作架构以及评分逻辑。
    • benchmarks/MarketMaking/InventoryAwareQuoting/frontier_eval/: 创建了配置文件(agent_files.txt, constraints.txt 等),将任务集成到 frontier_eval 框架中。
    • benchmarks/MarketMaking/InventoryAwareQuoting/references/: 添加了用于场景种子的 config.json 和解释模拟器理论背景的 design_notes.md
    • benchmarks/MarketMaking/InventoryAwareQuoting/scripts/init.py: 实现了一个基线启发式策略,包含库存偏置和指令解析逻辑。
    • benchmarks/MarketMaking/InventoryAwareQuoting/verification/: 添加了核心评测引擎,包括处理进程隔离和评分的 evaluator.py(及隐含的模拟器文件)。

2. AI 成分分析

  • 预估 AI 含量: 15%
  • 判断依据与证据: 文档和任务设计展示了极高的领域专业性(如“不利选择”、“基点 (bps)”、“库存 RMS”、“挂单/吃单费”),表明由人类专家编写。AI 的贡献可能仅限于 evaluator.py 中的模板代码或 zh-CN 文档的初步翻译。init.py 中的基线策略使用了标准的量化交易启发式算法,结构清晰但在量化金融示例中较为常见。

3. 工程与经济评估

  • 工程现实检验: 这是一个高保真的“生产级”模拟。与玩具示例不同,它结合了现实约束,如候选代码的进程隔离、用于复现的确定性伪随机性,以及强制 Agent 将自然语言理解与数值优化相结合的“交易台指令”。它有效地处理了持仓限制和现金约束等边缘情况。
  • 经济价值: 。对于开发量化金融 AI 的组织,这提供了一个标准化的、低延迟的环境,用于衡量 LLM 在高风险、受限环境下的推理能力。通过提供模块化、可重用的模拟框架,减少了技术债务。

4. 质量保证

  • 验证与测试:
    • frontier_eval 集成: 是
    • task_name: inventory_aware_quoting
    • 运行与依赖: README.md 清晰地记录了 pip install 需求,并提供了直接评测和统一 frontier_eval 运行的确切命令。
  • 文档质量: 优秀。文档非常全面,同时提供了“做什么”(Task.md)和“为什么这么做”(design_notes.md)。双语支持保持了一致性。在提供的 diff 中未检测到明显的语法错误或格式不一致。
  • 组织结构: 结构逻辑清晰且具备可扩展性。将 verification 逻辑与 scripts(Agent 代码)和 references(配置/笔记)分离,符合基准测试仓库的最佳实践。

5. 安全与隐私检查

  • 敏感文件: 未发现异常。diff 中未发现 .env、API 密钥或 IDE 专用文件(如 .vscode/)。
  • 绝对路径: 未检测到。代码使用 Path(__file__).resolve() 动态处理相对路径,确保了在不同环境下的可移植性。

@luyq-hhh

Copy link
Copy Markdown
Author

感谢贡献inventory_aware_quoting MarketMaking领域填补了Frontier-Eng的一个空白,simulator设计干净,双语文档完整,candidate isolation的process boundary做得很到位,测试覆盖也在线。

在合并前,建议关注以下两个与评测设计相关的问题:

1.Task维度可以进一步丰富,避免被纯数值搜索绕过

当前action space只有4个数值(bid/ask offset + bid/ask size)× 3 assets,observation是纯数值序列。这意味着一个agent完全可以用grid search或random search逼近最优策略,而不需要真正理解做市的工程判断(比如如何处理adverse selection、为何inventory skew要做均值回复、不同regime下liquidity的差异意味着什么)。当agent能力超过一个不高阈值后,再多"工程推理"也无法转化为更高的分数——task的区分度上限可能偏低。

建议丰富task的信息维度,让candidate需要做的不仅仅是纯数值回归。例如在observation中加入需要语义理解的内容,或者增加需要写出结构上有意义的代码才能满足的约束,使纯参数搜索无法达到可行解。

2.step_quotes中的异常处理过于宽泛,可能掩盖候选行为的真实问题

当前实现中,step_quotestry/except包裹所有symbol的处理。这意味着缺失key、类型错误、数值越界都会走同一条路径(violation + fallback默认值),evaluator和developer无法区分"candidate的结构是错的"和"数值稍微越界了"。

建议至少加一层前置schema校验,先验证action dict的结构完整性(所有symbol存在、所有key存在、类型正确),再检查数值范围。这样错误路径更清晰,agent的debug反馈也更有用。

非阻塞建议

以下内容不会阻止合入,但后续可以顺手完善:

  1. 任务目录命名 — 现有benchmark统一使用PascalCase(如 BatteryFastChargingProfileCarAerodynamicsSensing),建议将inventory_aware_quoting改为InventoryAwareQuoting,保持风格一致。
  2. 确认是否缺少 run config — 当前没有看到frontier_eval/conf/task/下的task config,建议确认运行时框架是否能自动发现这个task,否则需要补充 yaml 配置。

整体方向没有问题。 核心是确保task不会轻易被纯数值搜索trivialize,以及evaluator的错误路径足够清晰;解决这两个问题后即可继续审核。

感谢详细的 review!已根据建议完成修改:

  1. 增加了可组合的自然语言 desk_mandate,覆盖流动性支持、adverse-selection 防御和库存回收。不同指令具有相互不同的动态约束,因此固定数值/grid search 无法直接满足全部场景,candidate 需要实现状态相关的结构化策略。

  2. 重构了 action 校验流程:先校验完整 schema,再检查数值范围,最后检查仓位和做市台约束。同时增加稳定的违规分类,例如 schema_missing_fieldrange_offsetmandate_maker_onlyrisk_position_limit,方便 Agent 根据反馈调试。

  3. 将任务目录统一改为 InventoryAwareQuoting

  4. 补充了 frontier_eval/conf/task/inventory_aware_quoting.yaml,运行框架现在可以直接发现该任务。

本地回归测试 27/27 通过,基线策略在 20/20 个评测场景中均保持可行。再次感谢建议!

@wrh-human wrh-human left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

感谢对 feedback 的及时响应和修改。我对最新commit中的改动逐项进行了核查,结果如下:

1. Desk Mandate 实现

_desk_mandate() 根据当前 regime 和 inventory 状态动态生成自然语言指令,_enforce_desk_mandate() 在 step_quotes 中对其进行强制校验。Quiet 和 toxic regime 下的约束互斥(分别要求 >= 2 lots 和 <= 1 lot),组合上 inventory recovery 指令后,静态数值策略无法同时满足所有场景。新增的 test_unconditional_numeric_quotes_violate_compositional_mandates 对此提供了覆盖。已通过。

2. Action 校验分层与错误分类

校验流程已重构为三级结构:schema 完整性 → 数值范围 → constraint 及 desk mandate 合规性。错误分类粒度适当(如 schema_missing_fieldrange_offsetmandate_toxic_sizerisk_position_limit),能够为 agent 调试提供有价值的反馈。test_schema_violation_feedback_is_actionable 覆盖了缺失字段的异常路径。已通过。

3. 目录命名

任务目录已从 inventory_aware_quoting 改为 InventoryAwareQuoting,与项目中其他 benchmark 的命名风格保持一致,旧目录已清理。已通过。

4. Task run config

frontier_eval/conf/task/inventory_aware_quoting.yaml 已补充,运行时框架可直接发现该任务。已通过。


以上四项确认无误。

有一个额外的建议:建议补充 baseline/result_log.txt,记录 python verification/evaluator.py scripts/init.py 的运行输出,以便 reviewer 直接确认 baseline 在 20/20 个场景中均保持可行。

上述内容补充完毕后,我没有其他问题,建议可以合并。

@github-actions

Copy link
Copy Markdown

🤖 AI Code Review (gemini-3-flash-preview)

🇬🇧 English Analysis

1. Executive Summary

  • Core Purpose: This PR introduces a new benchmark task named InventoryAwareQuoting under the MarketMaking category. It simulates a market-making scenario where an agent must provide liquidity for synthetic assets while managing inventory risk, adverse selection, and natural-language desk mandates.
  • Modified File Structure & Modifications:
    • TASK_DETAILS.md & TASK_DETAILS_zh-CN.md: Added MarketMaking/InventoryAwareQuoting to the task registry.
    • benchmarks/MarketMaking/InventoryAwareQuoting/README.md (and _zh-CN.md): Provided setup instructions, evaluation commands, and task overview.
    • benchmarks/MarketMaking/InventoryAwareQuoting/Task.md (and _zh-CN.md): Detailed technical specifications, including the market simulator logic, observation/action schemas, and scoring functions.
    • benchmarks/MarketMaking/InventoryAwareQuoting/scripts/init.py: Implemented a baseline inventory-skew policy with logic to handle "desk mandates" (e.g., adverse-selection alerts).
    • benchmarks/MarketMaking/InventoryAwareQuoting/frontier_eval/: Added framework-specific configuration files (agent_files.txt, eval_command.txt, etc.) for integration.
    • benchmarks/MarketMaking/InventoryAwareQuoting/references/: Added config.json for simulation parameters and design_notes.md explaining the modeling choices.
    • benchmarks/MarketMaking/InventoryAwareQuoting/baseline/result_log.txt: Recorded baseline performance metrics.

2. AI Content Analysis

  • Estimated AI Component: 15%
  • Reasoning & Evidence: The core logic in scripts/init.py and the simulator design (referenced in design_notes.md) exhibit high domain-specific nuance (e.g., basis points calculations, inventory skew formulas like base + skew, and handling of "toxic flow"). The documentation is highly structured and professional, likely assisted by AI for formatting and translation, but the underlying engineering requirements (process isolation, deterministic pseudo-random segments) reflect human architectural design.

3. Engineering & Economic Assessment

  • Engineering Reality Check: This is a high-quality, production-grade engineering problem. It moves beyond "toy" examples by incorporating:
    • Adverse Selection: Simulating "toxic" flow where informed traders exploit stale quotes.
    • Desk Mandates: Forcing the agent to parse and adhere to natural-language constraints, bridging the gap between LLM reasoning and quantitative execution.
    • Process Isolation: Ensuring the candidate code cannot "cheat" by inspecting the simulator's internal state.
  • Economic Value: High. Market making and inventory management are fundamental to quantitative finance. This benchmark provides a robust environment for testing agents' ability to optimize PnL while strictly adhering to risk limits and operational mandates.

4. Quality Assurance

  • Verification & Testing:
    • frontier_eval Integration: Yes.
    • task_name: inventory_aware_quoting (as seen in README.md and eval_command.txt).
    • Execution & Dependencies: The README.md clearly documents the pip install requirements and provides exact commands for direct evaluation and regression testing.
  • Documentation Quality: Excellent. The PR provides comprehensive bilingual documentation. It clearly defines the objective function, hard constraints, and the boundary between the candidate and the evaluator. No significant grammatical errors or formatting inconsistencies were detected.
  • Organizational Structure: The structure is logical and follows the established repository pattern. Separating verification, scripts, and references ensures scalability and clarity.

5. Security & Privacy Check

  • Sensitive Files: Clean. No .env, API keys, or IDE-specific configurations were found. The result_log.txt contains environment metadata (Windows 11, Python 3.11) but no sensitive paths.
  • Absolute Paths: None detected. All file references and commands use relative paths or environment-agnostic identifiers.

🇨🇳 中文分析

1. 摘要

  • 核心目的: 此 PR 在 MarketMaking 类别下引入了一个名为 InventoryAwareQuoting 的新基准任务。它模拟了做市商场景,要求 Agent 在管理库存风险、不利选择(Adverse Selection)和遵守自然语言“交易台指令”的同时,为合成本地资产提供流动性。
  • 修改的文件结构与变更摘要:
    • TASK_DETAILS.md & TASK_DETAILS_zh-CN.md: 在任务注册表中添加了 MarketMaking/InventoryAwareQuoting
    • benchmarks/MarketMaking/InventoryAwareQuoting/README.md (及中英版): 提供了环境配置、评测命令和任务概览。
    • benchmarks/MarketMaking/InventoryAwareQuoting/Task.md (及中英版): 详细说明了技术规范,包括市场模拟器逻辑、观察/动作模式以及评分函数。
    • benchmarks/MarketMaking/InventoryAwareQuoting/scripts/init.py: 实现了一个基础的库存偏移(Inventory Skew)策略,包含处理“交易台指令”(如毒性流警报)的逻辑。
    • benchmarks/MarketMaking/InventoryAwareQuoting/frontier_eval/: 添加了框架专用的配置文件(agent_files.txt, eval_command.txt 等)以进行集成。
    • benchmarks/MarketMaking/InventoryAwareQuoting/references/: 添加了模拟参数配置文件 config.json 和解释建模选择的 design_notes.md
    • benchmarks/MarketMaking/InventoryAwareQuoting/baseline/result_log.txt: 记录了基线性能指标。

2. AI 成分分析

  • 预估 AI 含量: 15%
  • 判断依据与证据: scripts/init.py 中的核心逻辑和 design_notes.md 中提到的模拟器设计表现出高度的领域专业性(例如基点计算、base + skew 的库存偏移公式以及对“毒性流”的处理)。文档结构严谨且专业,可能在格式编排和翻译上使用了 AI 辅助,但底层的工程要求(进程隔离、确定性伪随机分段)反映了人工的架构设计。

3. 工程与经济评估

  • 工程现实检验: 这是一个高质量、生产级别的工程问题。它通过引入以下内容超越了“玩具示例”:
    • 不利选择 (Adverse Selection): 模拟知情交易者利用滞后报价的“毒性”订单流。
    • 交易台指令 (Desk Mandates): 强制 Agent 解析并遵守自然语言约束,弥合了 LLM 推理与定量执行之间的鸿沟。
    • 进程隔离: 确保候选代码无法通过检查模拟器内部状态来“作弊”。
  • 经济价值: 。做市和库存管理是量化金融的基础。该基准测试提供了一个稳健的环境,用于测试 Agent 在严格遵守风险限制和操作指令的同时优化 PnL 的能力。

4. 质量保证

  • 验证与测试:
    • frontier_eval 集成: 是。
    • task_name: inventory_aware_quoting(见于 README.mdeval_command.txt)。
    • 运行与依赖: README.md 清晰地记录了 pip install 依赖要求,并提供了直接评测和回归测试的确切命令。
  • 文档质量: 优秀。该 PR 提供了详尽的双语文档。它清晰地定义了目标函数、硬约束以及候选程序与评分器之间的边界。未检测到明显的语法错误或格式不一致。
  • 组织结构: 文件组织逻辑清晰,遵循仓库既定模式。将 verificationscriptsreferences 分开确保了系统的可扩展性和清晰度。

5. 安全与隐私检查

  • 敏感文件: 未发现异常。未发现 .env、API 密钥或 IDE 专用配置。result_log.txt 包含环境元数据(Windows 11, Python 3.11),但无敏感路径。
  • 绝对路径: 未检测到。所有文件引用和命令均使用相对路径或与环境无关的标识符。

@luyq-hhh

Copy link
Copy Markdown
Author

感谢对 feedback 的及时响应和修改。我对最新commit中的改动逐项进行了核查,结果如下:

1. Desk Mandate 实现

_desk_mandate() 根据当前 regime 和 inventory 状态动态生成自然语言指令,_enforce_desk_mandate() 在 step_quotes 中对其进行强制校验。Quiet 和 toxic regime 下的约束互斥(分别要求 >= 2 lots 和 <= 1 lot),组合上 inventory recovery 指令后,静态数值策略无法同时满足所有场景。新增的 test_unconditional_numeric_quotes_violate_compositional_mandates 对此提供了覆盖。已通过。

2. Action 校验分层与错误分类

校验流程已重构为三级结构:schema 完整性 → 数值范围 → constraint 及 desk mandate 合规性。错误分类粒度适当(如 schema_missing_fieldrange_offsetmandate_toxic_sizerisk_position_limit),能够为 agent 调试提供有价值的反馈。test_schema_violation_feedback_is_actionable 覆盖了缺失字段的异常路径。已通过。

3. 目录命名

任务目录已从 inventory_aware_quoting 改为 InventoryAwareQuoting,与项目中其他 benchmark 的命名风格保持一致,旧目录已清理。已通过。

4. Task run config

frontier_eval/conf/task/inventory_aware_quoting.yaml 已补充,运行时框架可直接发现该任务。已通过。

以上四项确认无误。

有一个额外的建议:建议补充 baseline/result_log.txt,记录 python verification/evaluator.py scripts/init.py 的运行输出,以便 reviewer 直接确认 baseline 在 20/20 个场景中均保持可行。

上述内容补充完毕后,我没有其他问题,建议可以合并。

已补充 baseline/result_log.txt,记录了 python verification/evaluator.py scripts/init.py 的 baseline 运行输出。

本地验证结果:

  • baseline 在 20/20 个评测场景中均保持可行
  • 回归测试 27/27 通过

感谢 review!

@wrh-human

Copy link
Copy Markdown
Collaborator

Thank you for the prompt response and thorough revisions! All issues raised in the previous review have been verified as resolved:


1. Desk Mandate (Natural Language Instructions)

Natural-language desk mandates are injected into the observation and enforced by _enforce_desk_mandate(). The constraints for quiet and toxic regimes are mutually exclusive, so a static numeric policy cannot satisfy all combinations (e.g., quiet mandates ≥2 lots per side, while toxic caps at ≤1 lot, with inventory recovery adding further asymmetric limits). The test test_unconditional_numeric_quotes_violate_compositional_mandates covers this case. ✅

2. Action Validation (Schema → Range → Constraint)

Validation is now structured in three stages: a schema pre-check (symbol completeness, field completeness, type checking, bool-vs-int distinction), followed by numeric range checks (offset/size), and finally constraint and desk-mandate compliance. Violations carry stable, distinguishable categories (e.g., schema_missing_field, range_offset, mandate_toxic_size, risk_position_limit) instead of a generic violation++. The test test_schema_violation_feedback_is_actionable covers the missing-field case. ✅

3. Directory Naming

The directory has been renamed from inventory_aware_quoting to InventoryAwareQuoting, consistent with the PascalCase convention used by all other benchmarks in the project. The old lowercase directory has been removed. ✅

4. Task Run Config

frontier_eval/conf/task/inventory_aware_quoting.yaml has been added, allowing the runtime framework to discover the task directly via task.benchmark=MarketMaking/InventoryAwareQuoting. ✅

5. Test Coverage

27 tests total (evaluator: 9, simulator: 11, policy_runtime: 7), all passing as recorded in result_log.txt. The two new tests — test_unconditional_numeric_quotes_violate_compositional_mandates and test_schema_violation_feedback_is_actionable — directly address the core concerns raised in the review. ✅

6. Baseline Results

baseline/result_log.txt has been added, documenting 20/20 feasible scenarios, a combined_score of 51.6297, and the runtime environment (Windows 11, Python 3.11). ✅


All six items above have been verified. No further issues identified. The PR is ready to merge.

@github-actions

Copy link
Copy Markdown

🤖 AI Code Review (gemini-3-flash-preview)

🇬🇧 English Analysis

1. Executive Summary

  • Core Purpose: This PR introduces a new quantitative finance benchmark task titled "Competitive Market Making" under the MarketMaking category. The task requires an agent to provide bid/ask quotes for a synthetic asset (NVDA) while competing against four distinct hidden opponent strategies, managing inventory risk, and avoiding adverse selection.
  • Modified File Structure & Modifications:
    • TASK_DETAILS.md & TASK_DETAILS_zh-CN.md: Updated the master task list to include MarketMaking and the new CompetitiveMarketMaking sub-task.
    • benchmarks/MarketMaking/CompetitiveMarketMaking/README.md (English & Chinese): Provided setup instructions, execution commands, and task overview.
    • benchmarks/MarketMaking/CompetitiveMarketMaking/Task.md (English & Chinese): Detailed the objective, observation space, action space, and scoring metrics (PnL, drawdown, inventory risk).
    • benchmarks/MarketMaking/CompetitiveMarketMaking/baseline/result_log.txt: Documented baseline performance and difficulty ablation results.
    • benchmarks/MarketMaking/CompetitiveMarketMaking/frontier_eval/: Added integration files including constraints.txt, copy_files.txt, run_eval.sh, and agent_files.txt.
    • benchmarks/MarketMaking/CompetitiveMarketMaking/scripts/init.py: Provided a baseline "Inventory-Aware" policy for candidates to modify.
    • benchmarks/MarketMaking/CompetitiveMarketMaking/verification/: Implemented the core engine, including evaluator.py, simulator.py, and opponents.py.

2. AI Content Analysis

  • Estimated AI Component: 35%
  • Reasoning & Evidence:
    • Boilerplate & Config: The frontier_eval configuration files (e.g., copy_files.txt, agent_files.txt) and the run_eval.sh script follow a highly standardized template seen in other tasks, likely generated or copied via AI.
    • Baseline Logic: The init.py baseline uses very standard, textbook formulas for inventory skew (inv_frac * 0.30 * base_ticks) and toxicity bonuses, which are common patterns in AI-generated financial code.
    • Domain Nuance (Human-Authored): The AnchorPolicy in evaluator.py and the specific implementation of "pro-rata allocation" and "hidden opponent inference" in simulator.py exhibit high domain-specific nuance that suggests significant human engineering or highly expert-prompted AI.

3. Engineering & Economic Assessment

  • Engineering Reality Check: This is a high-quality, production-grade engineering problem. Unlike "toy" trading examples, it correctly implements adverse selection (being filled only when the price moves against you) and pro-rata allocation (a standard feature of electronic exchanges). The inclusion of a "Stateful vs. Snapshot" ablation test ensures the task actually requires temporal reasoning rather than simple reactive heuristics.
  • Economic Value: High. Evaluating an LLM's ability to perform online inference of hidden competitor strategies is a direct proxy for high-value applications in algorithmic trading and automated negotiation. It reduces technical debt by providing a standardized way to test "reasoning" in dynamic, adversarial environments.

4. Quality Assurance

  • Verification & Testing:
    • frontier_eval Integration: Yes.
    • task_name: competitive_market_making (also accessible via MarketMaking/CompetitiveMarketMaking).
    • Execution & Dependencies: The README.md clearly documents the pytest commands and the frontier_eval execution strings. A requirements.txt is referenced in the file list.
  • Documentation Quality: Excellent. The documentation is provided in both English and Chinese. It clearly defines the constraints (e.g., 0.30s decision limit, position limits of ±50). No significant grammatical errors or formatting inconsistencies were detected.
  • Organizational Structure: Logical and modular. The separation of verification (engine logic) from scripts (candidate code) and references (static config) is clean and scalable.

5. Security & Privacy Check

  • Sensitive Files: Clean. No .env, API keys, or __pycache__ folders were found in the diff.
  • Absolute Paths: None detected. The evaluator.py uses relative path resolution via Path(__file__).resolve().

🇨🇳 中文分析

1. 摘要

  • 核心目的: 此 PR 在 MarketMaking 类别下引入了一个名为 “竞争性做市 (Competitive Market Making)” 的新量化金融基准任务。该任务要求 Agent 为合成资产 (NVDA) 提供买卖报价,同时与四种不同的隐藏对手策略竞争,管理库存风险并规避逆向选择。
  • 修改的文件结构与变更摘要:
    • TASK_DETAILS.md & TASK_DETAILS_zh-CN.md: 更新了主任务列表,增加了 MarketMaking 类别及新的 CompetitiveMarketMaking 子任务。
    • benchmarks/MarketMaking/CompetitiveMarketMaking/README.md (中英文): 提供了环境配置、运行命令和任务概览。
    • benchmarks/MarketMaking/CompetitiveMarketMaking/Task.md (中英文): 详细说明了目标、观测空间、动作空间和评分指标(PnL、回撤、库存风险)。
    • benchmarks/MarketMaking/CompetitiveMarketMaking/baseline/result_log.txt: 记录了基准性能和难度消融实验结果。
    • benchmarks/MarketMaking/CompetitiveMarketMaking/frontier_eval/: 增加了集成文件,包括 constraints.txtcopy_files.txtrun_eval.shagent_files.txt
    • benchmarks/MarketMaking/CompetitiveMarketMaking/scripts/init.py: 提供了一个供候选人修改的“库存感知”基准策略。
    • benchmarks/MarketMaking/CompetitiveMarketMaking/verification/: 实现了核心引擎,包括 evaluator.pysimulator.pyopponents.py

2. AI 成分分析

  • 预估 AI 含量: 35%
  • 判断依据与证据:
    • 模板与配置: frontier_eval 的配置文件(如 copy_files.txt)和 run_eval.sh 脚本遵循高度标准化的模板,与仓库中其他任务一致,很可能是通过 AI 生成或复制的。
    • 基准逻辑: init.py 中的基准策略使用了非常教科书式的公式来处理库存偏置(inv_frac * 0.30 * base_ticks)和毒性补偿,这是 AI 生成金融代码的常见模式。
    • 领域深度(人工编写): evaluator.py 中的 AnchorPolicy 以及 simulator.py 中关于“比例分配 (pro-rata allocation)”和“隐藏对手推断”的具体实现表现出极高的领域专业性,表明存在显著的人工工程或高水平的专家提示词引导。

3. 工程与经济评估

  • 工程现实检验: 这是一个高质量、生产级别的工程问题。与“玩具级”交易示例不同,它正确实现了逆向选择(仅在价格对你不利时成交)和比例分配(电子交易所的标准特性)。包含“有状态 vs. 快照”消融测试确保了任务确实需要时间序列推理,而非简单的反应式启发式算法。
  • 经济价值: 。评估 LLM 在线推断隐藏竞争对手策略的能力,直接对应算法交易和自动化谈判等高价值应用场景。它通过提供一种标准化的方式来测试动态对抗环境中的“推理”能力,从而减少了技术债务。

4. 质量保证

  • 验证与测试:
    • frontier_eval 集成: 是。
    • task_name: competitive_market_making (也可通过 MarketMaking/CompetitiveMarketMaking 访问)。
    • 运行与依赖: README.md 清晰记录了 pytest 命令和 frontier_eval 运行字符串。文件列表中引用了 requirements.txt
  • 文档质量: 优秀。提供中英双语文档。清晰定义了约束条件(如 0.30 秒决策时限、±50 的仓位限制)。未检测到明显的语法错误或格式不一致。
  • 组织结构: 逻辑清晰且模块化。将 verification(引擎逻辑)与 scripts(候选代码)及 references(静态配置)分离,结构整洁且具备可扩展性。

5. 安全与隐私检查

  • 敏感文件: 未发现异常。Diff 中未发现 .env、API 密钥或 __pycache__ 文件夹。
  • 绝对路径: 未检测到evaluator.py 通过 Path(__file__).resolve() 使用相对路径解析。

@luyq-hhh luyq-hhh changed the title feat: add inventory-aware market making optimization benchmark feat: add MarketMaking benchmark suite Jul 17, 2026
@luyq-hhh
luyq-hhh force-pushed the feat/MarketMaking/suite branch from 7022f7d to 7fc76b7 Compare July 17, 2026 02:47
@luyq-hhh luyq-hhh changed the title feat: add MarketMaking benchmark suite feat: add inventory-aware market making benchmark Jul 17, 2026
@github-actions

Copy link
Copy Markdown

🤖 AI Code Review (gemini-3-flash-preview)

🇬🇧 English Analysis

1. Executive Summary

  • Core Purpose: This PR introduces a new benchmark task named InventoryAwareQuoting under the MarketMaking category. It simulates a market-making environment where an agent must provide buy/sell quotes for synthetic equities while managing inventory risk, adverse selection, and natural language "desk mandates."
  • Modified File Structure & Modifications:
    • TASK_DETAILS.md & TASK_DETAILS_zh-CN.md: Added MarketMaking/InventoryAwareQuoting to the task registry.
    • benchmarks/MarketMaking/InventoryAwareQuoting/README.md (and _zh-CN.md): Provided setup instructions, evaluation commands, and task overview.
    • benchmarks/MarketMaking/InventoryAwareQuoting/Task.md (and _zh-CN.md): Detailed technical specification of the simulator, observation/action space, and scoring logic.
    • benchmarks/MarketMaking/InventoryAwareQuoting/scripts/init.py: Implemented the baseline policy using inventory skew and mandate-parsing logic.
    • benchmarks/MarketMaking/InventoryAwareQuoting/references/: Added config.json for scenario parameters and design_notes.md for architectural justification.
    • benchmarks/MarketMaking/InventoryAwareQuoting/frontier_eval/: Added configuration files (agent_files.txt, eval_command.txt, etc.) to integrate with the frontier_eval framework.
    • benchmarks/MarketMaking/InventoryAwareQuoting/verification/: (Truncated in diff) Contains the simulator, evaluator, and regression tests.

2. AI Content Analysis

  • Estimated AI Component: 15%
  • Reasoning & Evidence: The code structure is highly professional and follows a specific framework pattern (e.g., EVOLVE-BLOCK markers). The domain-specific logic in scripts/init.py (calculating maker_bid_floor based on primary mid and dual prices) and the sophisticated scoring formula in Task.md suggest human expertise in quantitative finance. AI likely assisted in generating the bilingual documentation or boilerplate for the frontier_eval configuration files, but the core simulation logic and task design exhibit high domain-specific nuance.

3. Engineering & Economic Assessment

  • Engineering Reality Check: This is a high-fidelity engineering simulation. While it avoids the complexity of a full LOB (Limit Order Book) by using a top-of-book model, it correctly identifies and implements critical production-grade challenges: adverse selection (toxic flow), inventory-based skewing, and maker/taker fee structures. The inclusion of "desk mandates" (natural language constraints) effectively tests an agent's ability to handle multi-modal instructions, moving beyond simple numeric optimization.
  • Economic Value: High. Quantitative trading and market making are high-value domains. Providing a robust, isolated, and reproducible benchmark for these tasks allows for the rigorous evaluation of LLMs in financial engineering, potentially reducing the cost of developing automated trading strategies.

4. Quality Assurance

  • Verification & Testing:
    • frontier_eval Integration: Yes
    • task_name: inventory_aware_quoting
    • Execution & Dependencies: The README.md clearly documents the installation of dependencies via verification/requirements.txt and provides exact commands for direct evaluation, regression testing, and unified evaluation.
  • Documentation Quality: Excellent. The PR includes comprehensive bilingual documentation. The design_notes.md provides valuable context on simulator limitations and design choices. No significant grammatical errors or formatting inconsistencies were observed.
  • Organizational Structure: The file organization is logical and modular. It separates the core logic (verification/), the user-editable script (scripts/), and the evaluation metadata (frontier_eval/), ensuring scalability and ease of use.

5. Security & Privacy Check

  • Sensitive Files: Clean. No .env, API keys, or IDE-specific configurations were found.
  • Absolute Paths: None detected. The code and documentation use relative paths or module-based execution.

🇨🇳 中文分析

1. 摘要

  • 核心目的: 此 PR 在 MarketMaking 类别下引入了一个名为 InventoryAwareQuoting 的新基准任务。它模拟了一个做市环境,要求 Agent 在管理库存风险、逆向选择(不利选择)和处理自然语言“交易台指令”的同时,为合成分品种提供买卖报价。
  • 修改的文件结构与变更摘要:
    • TASK_DETAILS.md & TASK_DETAILS_zh-CN.md: 在任务注册表中添加了 MarketMaking/InventoryAwareQuoting
    • benchmarks/MarketMaking/InventoryAwareQuoting/README.md (及 _zh-CN.md): 提供了安装指南、评测命令和任务概览。
    • benchmarks/MarketMaking/InventoryAwareQuoting/Task.md (及 _zh-CN.md): 详细说明了模拟器技术规范、观测/动作空间以及评分逻辑。
    • benchmarks/MarketMaking/InventoryAwareQuoting/scripts/init.py: 实现了基于库存偏置(skew)和指令解析逻辑的基准策略。
    • benchmarks/MarketMaking/InventoryAwareQuoting/references/: 添加了场景参数配置文件 config.json 和架构说明文档 design_notes.md
    • benchmarks/MarketMaking/InventoryAwareQuoting/frontier_eval/: 添加了与 frontier_eval 框架集成所需的配置文件。
    • benchmarks/MarketMaking/InventoryAwareQuoting/verification/: (在 Diff 中被截断)包含模拟器、评分器和回归测试脚本。

2. AI 成分分析

  • 预估 AI 含量: 15%
  • 判断依据与证据: 代码结构非常专业,并遵循特定的框架模式(如 EVOLVE-BLOCK 标记)。scripts/init.py 中的领域特定逻辑(如根据主市场中价和 DUAL 价格计算 maker_bid_floor)以及 Task.md 中复杂的评分公式表明了量化金融领域的专家知识。AI 可能辅助生成了双语文档或 frontier_eval 配置文件的模板,但核心模拟逻辑和任务设计展现了高度的领域专业性。

3. 工程与经济评估

  • 工程现实检验: 这是一个高保真的工程模拟。虽然通过使用盘口最优价(top-of-book)模型避开了完整 LOB(限价订单簿)的复杂性,但它准确识别并实现了生产级别的关键挑战:逆向选择(毒性流)、基于库存的报价偏置以及 Maker/Taker 手续费结构。引入“交易台指令”(自然语言约束)有效地测试了 Agent 处理多模态指令的能力,超越了简单的数值优化。
  • 经济价值: 高。量化交易和做市是高价值领域。为这些任务提供稳健、隔离且可复现的基准测试,有助于对金融工程领域的 LLM 进行严格评估,从而可能降低开发自动化交易策略的成本。

4. 质量保证

  • 验证与测试:
    • frontier_eval 集成: 是
    • task_name: inventory_aware_quoting
    • 运行与依赖: README.md 清晰地记录了通过 verification/requirements.txt 安装依赖的方法,并提供了直接评测、回归测试和统一评测的确切命令。
  • 文档质量: 优秀。PR 包含了详尽的双语文档。design_notes.md 提供了关于模拟器局限性和设计选择的有价值背景信息。未发现明显的语法错误或格式不一致。
  • 组织结构: 文件组织逻辑清晰且模块化。它将核心逻辑 (verification/)、用户可编辑脚本 (scripts/) 和评测元数据 (frontier_eval/) 分离开来,确保了可扩展性和易用性。

5. 安全与隐私检查

  • 敏感文件: 未发现异常。未发现 .env、API 密钥或 IDE 配置文件。
  • 绝对路径: 未检测到。代码和文档均使用相对路径或基于模块的执行方式。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants