MatLogica AADC: AAD, Greeks and the AADC Tracer

com.matlogica由 matlogica.com 發布v0.2.1更新於 Nov 6, 2026

AAD from your coding agent: exact Greeks with MatLogica AADC, and a price traced to its source line

概覽

AI 產生的概覽

在本機執行 MatLogica AADC 自動伴隨微分:追蹤 Python 定價腳本、計算精確 Greeks,並以新輸入重播 tape。

可以做什麼
  • 檢查本機 AADC 引擎、授權版本與自我測試結果
  • 開啟追蹤執行 Python 腳本並保留 tape,或載入、列出既有 tape
  • 以引擎自帶語法查詢 tape:統計、葉節點、分支、站點、原始碼行、尋找、來源、使用、錐
  • 以新輸入值重播 tape,並說明記錄的路徑是否仍然成立
  • 開啟即時錄製工作階段,以相同語法提問、精確重播並關閉工作階段
  • 列出、讀取並執行內建範例,包括未經修改的 QuantLib 定價器
適用情境
適合在助理協助 AADC 相關工作時使用:為 Python 定價器求精確導數與 Greeks、處理在分支或折點處跳變的導數,或把算出的價格追溯回產生它的原始碼行。
執行需求
以本機 stdio 程序執行,從 PyPI 套件 aadc-mcp 安裝,僅限桌面端。需要已安裝 AADC 引擎的 Python 解譯器;QuantLib 範例另需 aadc-quantlib-tracing,且限 Linux x86-64 或 macOS arm64。未宣告驗證、環境變數或標頭。
安裝前請注意
trace_script 與 run_example 會在使用者本機以開啟追蹤的方式執行 Python 程式碼,伺服器明確說明這不是沙箱。tape 與工作階段保存在伺服器的工作資料夾中。survives=false 的重播不帶數值,不應估算。一個 tape 只代表某一輸入點的一次執行,不代表所有可能路徑。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 MatLogica AADC: AAD, Greeks and the AADC Tracer,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

工具

15

check_environment

What this interpreter can do with AADC and the Tracer, measured: installed packages and versions, platform, licence (one sentence naming the edition the engine runs as and what it permits; tell the user), an engine self-test (record, replay, reverse: dz/dx = 6 at x = 3), a tracing self-test (one traced QuantLib call must attribute leaves to QuantLib's C++), and findings with the pip command that fixes each. Call it first; call it again after installing anything.

無需輸入參數。

trace_script

Run a Python script with tracing on and keep the record (tape) it leaves. The script needs no changes: it runs in its own directory with AADC_TRACE=1, so every calculation through aadc types or an AADC-built library such as aadc-quantlib-tracing is recorded with its source coordinates. Returns tape_id, the script's stdout and stderr, the engine's census (frozen branch sites, outputs) and stats. A script that records itself and ends with f.save_tape() writes to AADC_TRACE_OUT; mark its first line with 'mode=explicit'. outputs: optional AADC_TRACE_OUTPUTS entries, e.g. ['value=123.45'] or ['pricer.py:42'], to name the program's results on the tape. python: another interpreter to run under (the one where the user's packages live). This runs the user's own code on the user's own machine; it is not a sandbox.

輸入參數argspath必填pythonoutputsworkdirtimeout_s

inspect_tape

Ask the tape one question in the engine's own grammar and get its text answer plus the parsed header. Verbs: 'stats' | 'leaves [kind=input|constant] [by=leaf] [limit=N]' | 'branches order=margin [limit=N]' | 'sites [file=NAME] [limit=N]' | 'at FILE:LINE [context=N]' (source with the recorded values; hash=ok means the file shown is the one compiled) | 'find value=X' (where a printed number was computed) | 'origin #N' (the formula behind a value) | 'uses #N' | 'cone #N' (which leaves can move a value, by derivative or only by a branch) | 'source root=COMPILED=LOCAL' (map compiled paths to a local source tree) | 'replay ...' (prefer the replay tool). Ids are #N from earlier answers. A malformed request answers status=error in the header, never an exception.

輸入參數request必填tape_id必填max_lines

replay

Re-evaluate the tape at new inputs without re-running the model. assignments: '#12=101' or '#12=101,#15=0.21' (leaf ids from 'leaves kind=input' or 'leaves by=leaf'); out: the output id from 'find value=<printed price>'. survives=true: the recorded path holds and value is exact (equal to a fresh run to the last digit). survives=false: WITHHELD; flipped names the decision (file:line, decided true -> false) and unchecked the conversions the tape cannot check. There is no value to quote in that case. A tape read back from a file keeps no operand for a counted conversion, so on most QuantLib tapes a replay is withheld with unchecked naming the line (often errorfunction.cpp:200); say so and re-run the script at the new inputs for the price. path_recorded=true returns the recorded path's value labelled as such, for comparison only.

輸入參數out必填tape_id必填assignments必填path_recorded

set_source_root

Map the compiled source prefix recorded on the tape (for aadc-quantlib-tracing 1.41 it is /project/work/QLAADC/ql) to a local directory holding that source, so 'at FILE:LINE' and 'origin' can show the code. Later answers say hash=ok when the local file is the one the library was compiled from and hash=MISMATCH when it is not; a mismatch is reported, never silent. Remembered for this tape.

輸入參數tape_id必填local_dir必填compiled_prefix必填

load_tape

Register an existing .tape file written earlier (by trace_script, by a script's own save_tape(), or downloaded from a report) and return its tape_id and stats.

輸入參數path必填

list_tapes

The tapes this server holds: id, file, size, the script that produced each, and the source roots applied.

無需輸入參數。

open_session

Run a Python script that records itself (aadc.Functions, start_recording with marked inputs, stop_recording) and keep its process alive, so later questions are answered by the object that recorded. Returns session_id, the script's stdout, which Functions object was kept, and its stats. Why: a record read back from a file cannot re-check a counted conversion, so 'replay' on it is often withheld; in the recording process the same replay is exact (the same digits as pricing again). Use it for what-ifs and sensitivities on a script with marked inputs; for an unmodified script use trace_script. The script's save_tape() to AADC_TRACE_OUT also registers a tape. Idle sessions close themselves after AADC_MCP_SESSION_IDLE_S seconds (default 1800). This runs the user's own code on the user's own machine.

輸入參數argspath必填pythontimeout_s

ask_session

The same question grammar as inspect_tape (stats, leaves, branches, sites, at, find, origin, uses, cone, source), answered by the live recording of an open_session.

輸入參數request必填max_linessession_id必填

replay_session

Replay the live recording at new inputs. assignments: '#0=101' (leaf ids from ask_session 'leaves kind=input by=leaf'); out: the id marked OUTPUT from 'find value=<printed price>'. survives=true means the recorded path holds and value is exact to the last digit; survives=false is WITHHELD with the decision named (flipped) and no value.

輸入參數out必填session_id必填assignments必填path_recorded

close_session

End a live session and free its process.

輸入參數session_id必填

list_sessions

The live sessions this server holds: id, script, start time, questions answered.

無需輸入參數。

list_examples

Bundled scripts to start from: plain AADC (any platform), and unmodified QuantLib pricers that aadc-quantlib-tracing records (Linux x86-64, macOS arm64). mode=auto scripts are traced as they are; mode=explicit scripts record themselves and print sensitivities. Each is a starting point to copy and edit.

無需輸入參數。

get_example

The source of one bundled example, to read, copy or adapt.

輸入參數name必填

run_example

Copy one bundled example into the server's working folder, run it with tracing on and return its tape_id, its printed output and the tape's stats. Then question the tape with inspect_tape and replay.

輸入參數name必填timeout_s

版本歷史

2
  1. v0.2.1最新Nov 5, 2026
  2. v0.2.0Nov 5, 2026

評分

已滿足適用檢查項的 55%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分

    請在註冊中心條目中發布圖示。

  • 文件15 分

    請宣告包含 README 的 GitHub 儲存庫,或在 OAuth 受保護資源後設資料中提供 resource_documentation。

  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。