Skip to content

v0.3.0: overhaul — pricing fixes, tests, CI, docs#4

Merged
Junaid2005 merged 13 commits into
mainfrom
v0.3.0
Jun 20, 2026
Merged

v0.3.0: overhaul — pricing fixes, tests, CI, docs#4
Junaid2005 merged 13 commits into
mainfrom
v0.3.0

Conversation

@Junaid2005

Copy link
Copy Markdown
Owner

Summary

Complete overhaul of afterquote — fixes 6 bugs that prevented the package from running, adds a test suite, modernizes CI, and updates docs.

Bug fixes

  • OHLC anchoringImpl_Open and Impl_Close now both seed from the base's last close (single anchor), fixing phantom gap at t=0 and 99% of invalid candles
  • Inter-bar gaps — synthetic pricing now captures the gap between underlying's prev close and current open, fixing cumulative return error over long sessions
  • Ticker validationis_real_security() now actually rejects fake tickers instead of always returning True
  • Exchange mappings — added 7 missing mappings (PCX, NYQ, AMS, GER, HKG, NSI, TOR)
  • History fetchpricing() passes end= to yfinance, fixing 0-row returns on newer yfinance versions
  • Close-price lookup — widened window from ±5min to −30min/+5min, returns nearest bar
  • No-data caseinfo() returns base's real close when underlying has no newer data, instead of crashing
  • Leverage on High/Low — synthetic High/Low now apply the leverage factor (previously un-leveraged)

Added

  • QuoteInfo dataclass for structured quote data
  • pytest test suite (17 tests) with mocked yfinance — no network calls in CI
  • Live end-to-end tests (skipped by default, --runlive)
  • ruff (replaces black + pylint), mypy type checking
  • Pre-commit hooks (ruff format, ruff check, mypy)
  • CI tests on Python 3.10, 3.11, 3.12

Changed

  • Pinned all dependencies with lower bounds
  • CI installs from pyproject.toml (deleted stale requirements.txt)
  • PyPI workflow: split build/publish, least-privilege permissions, official action
  • Branch protection on main (requires PR + CI checks)

Commits

13 commits, one concern per commit. See commit history for details.

@Junaid2005
Junaid2005 merged commit 6c9f6e6 into main Jun 20, 2026
4 checks passed
@Junaid2005
Junaid2005 deleted the v0.3.0 branch June 20, 2026 19:34
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.

1 participant