Skip to content

test: cover adaptive spread edge cases#33

Open
Genmin wants to merge 1 commit into
kcolbchain:mainfrom
Genmin:test/adaptive-spread-edge-cases
Open

test: cover adaptive spread edge cases#33
Genmin wants to merge 1 commit into
kcolbchain:mainfrom
Genmin:test/adaptive-spread-edge-cases

Conversation

@Genmin
Copy link
Copy Markdown

@Genmin Genmin commented Apr 29, 2026

What

Add dedicated unit coverage for adaptive spread quote generation, including min/max spread clipping, neutral inventory symmetry, long/short inventory skew direction, and sampled bid-mid-ask invariants.

Why

compute_adaptive_quotes is a core quoting primitive. These edge cases make sure volatility clipping and inventory skew keep producing sane executable quotes across the cases requested in #28.

Fixes #28

How to Test

  • python3 -m venv .venv && . .venv/bin/activate && python -m pip install -r requirements.txt
  • python -m pytest tests/unit/test_adaptive_spread.py -q
  • python -m pytest tests/unit -q
  • python -m pytest -q

Checklist

  • Tests pass (116 passed, 2 skipped locally)
  • Docs updated if API changed (N/A; tests only)

@abhicris
Copy link
Copy Markdown
Contributor

Welcome to kcolbchain, @Genmin — glad you're here. 🌱

Here's what happens from this PR:

  1. Our automated review looks for obvious issues (tests, secrets, size) within a couple of hours.
  2. If it's clean and CI passes, we merge without back-and-forth.
  3. If we need changes, we'll leave a specific comment — not a generic nit. Push another commit and we re-review.

While you wait:

  • Run the repo's tests locally (see the repo README.md).
  • Keep the PR scoped to one concern — bigger PRs land slower.
  • Don't commit tokens or .env contents.

What happens after your first merge

Thanks for writing the code. We're building this to last.

@abhicris
Copy link
Copy Markdown
Contributor

🤖 Audit verdict: safe

New test file with standard pytest unit tests for adaptive spread logic; no malicious payloads, supply-chain risk, credential leakage, or logic bugs detected.

Audited by the kcolbchain PR pipeline. See pipeline docs.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[good first issue] Unit tests for adaptive_spread edge cases (zero vol, max inventory)

2 participants