risk-liquidity
Estimate days to liquidate each asset at a participation rate of average daily traded value, the schedule of what is still held by day, the exogenous bid-ask spread cost of liquidation, and liquidity-adjusted VaR after Bangia, Diebold, Schuermann and Stroughair (1999). Use when the user asks how long a book takes to exit, how much is still held after n days, or what the spread adds to VaR. Not for market impact of large orders and not for recommendations.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 1.6k
- Forks
- 491
01 前言 Front Matter
- name
- risk-liquidity
- description
- Estimate days to liquidate each asset at a participation rate of average daily traded value, the schedule of what is still held by day, the exogenous bid-ask spread cost of liquidation, and liquidity-adjusted VaR after Bangia, Diebold, Schuermann and Stroughair (1999). Use when the user asks how long a book takes to exit, how much is still held after n days, or what the spread adds to VaR. Not for market impact of large orders and not for recommendations.
02 资源文件 3
- 参考文档reference.md3.6 KB
- 脚本scripts/check_artifact.py3.2 KB
- 参考文档workflows/liquidity-report.md968 B
03 SKILL.md 正文
Risk Liquidity
Use risk_liquidity; the CLI equivalent is riskdesk liquidity --input PATH.
Contract
A PortfolioRequest (input contracts) plus:
participation_rate: fraction of average daily traded value the book may take each day, above 0 and at most 1.spread_multiplier: the scaling factor a on spread volatility. A user input with no default.liquidity: for exactly every portfolio asset,average_daily_value(traded value per day in the base currency, positive),mean_relative_spreadandspread_volatility(relative spread is (ask - bid) / mid, so 0.002 is 20 basis points).- Optional, all three together:
pnl,confidence,horizon_days, as in TailRequest. With them the result includes liquidity-adjusted VaR.
Report first
degradedanddegraded_reason. It names every asset that takes longer to exit than the VaR horizon.max_days_to_liquidateand the slowest assets fromby_asset.- The schedule at the days the user cares about (
held_value,held_fraction). cost_of_liquidity, and when presentvarandliquidity_adjusted_varwithconfidenceandhorizon_days.
Sign conventions
Cost of liquidity and VaR are losses and positive. Short positions cost the half spread too: values are absolute. Days are days of average traded volume, not calendar days.
What not to claim
- Horizon scaling is never done silently: VaR is at the P&L horizon, the spread cost is a one-off exit cost, and neither is rescaled to the liquidation period. When an asset takes longer to exit than the horizon, say so; the L-VaR does not cover the extra days.
- The spread add-on is exogenous: market-wide spread risk. It is not the price impact of selling a large block, which can be far larger.
- The L-VaR here adds the spread cost to historical VaR; the 1999 paper used parametric VaR. The spread cost is their equation (4); the plain sum with VaR is confirmed only from a secondary source (reference.md).
- Do not present the paper's empirical range for a as a default. Ask the user for a, and say what it was.
- Liquidity inputs must be the user's; never invent volumes or spreads.
Going deeper
reference.md: formulas, the source and page of each, and what is not verified from the primary text.workflows/liquidity-report.md.scripts/check_artifact.py RESULT.json: re-derives days, the schedule, the spread cost and L-VaR, and prints a one line verdict.
04 同仓库更多 Skills
worktable-review-with-annotations
Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.
worktable-find-and-synthesize-context
Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.
worktable-create-or-update-docs
Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.
worktable-create-or-manage-records
Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.
worktable-create-or-manage-interactive-html
Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.
worktable-collaborate-threads
Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.