Skip to main content

Command-line access to Pattern Vista: K-line pattern win-rates and MA200 deviation rankings, built for AI agents and humans.

Project description

Pattern Vista CLI

Command-line access to Pattern Vista — K-line pattern historical win-rates and MA200 deviation rankings — built to be called by AI agents as easily as by humans.

Output is JSON by default (so an agent can parse it directly); add --table for a human-readable view.

Install

pip install pattern-vista     # or: uvx pattern-vista whoami

Authenticate

Generate a key at https://www.pattern-vista.com (Account → API keys), then:

pv config set-key pv_live_xxxxxxxx
# or, for ephemeral/agent use:
export PATTERN_VISTA_API_KEY=pv_live_xxxxxxxx

Resolution order: --api-key flag → PATTERN_VISTA_API_KEY → stored config.

Commands

pv whoami                       # validate key, show account + tier
pv deviation --over --limit 20  # stocks furthest ABOVE their 200-day average
pv deviation --under            # stocks furthest BELOW (mean-reversion longs)
pv patterns --limit 20          # latest recommended patterns + 20-day win-rate
pv ticker AAPL                  # one symbol: current deviation + recent patterns

# add --table to any command for human output:
pv deviation --under --table

Example (agent-friendly JSON)

$ pv deviation --under --limit 3
{
  "is_billed": true,
  "rows": [
    {"ticker": "XYZ", "snapshot_date": "2026-05-27", "close": 41.2, "ma200": 58.9, "deviation": -0.3005},
    ...
  ]
}

Free vs. paid

A free account sees the top 2 rows of each list and patterns without the historical win-rate. A paid subscription unlocks the full lists (up to 100) and hist_win_w20. The tier is enforced server-side from the key — see is_billed in every response.

For agents / programmatic use

from pattern_vista import PatternVistaClient

pv = PatternVistaClient(api_key="pv_live_xxxx")
under = pv.deviation("under", limit=20)   # dict: {"is_billed": ..., "rows": [...]}
aapl = pv.ticker("AAPL")

The PatternVistaClient core has no CLI dependency, so it can back an MCP server exposing the same methods as tools.

Data notes

  • Deviation = (close − MA200) / MA200, refreshed nightly over an S&P 500 + Nasdaq 100 + major-ETF universe. Split-distorted and implausible values are filtered out before ranking.
  • Win-rate (hist_win_w20) is the historical 20-trading-day hit rate of a pattern type since 2025-01-01. See the methodology post at https://www.pattern-vista.com/posts/pattern-alpha-backtest.
  • Past performance does not guarantee future results. Not investment advice.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pattern_vista-0.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pattern_vista-0.1.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file pattern_vista-0.1.0.tar.gz.

File metadata

  • Download URL: pattern_vista-0.1.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for pattern_vista-0.1.0.tar.gz
Algorithm Hash digest
SHA256 52a4dba3f20acc9e27f23a2a47474c07a647582b4731342d12860d64ddea3dfe
MD5 63898afa3ef245b855110d2f540fca66
BLAKE2b-256 9cbc42f2c3806528cc33a747c864e3f5e1da81612cbff12745672a7244d4988c

See more details on using hashes here.

File details

Details for the file pattern_vista-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pattern_vista-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for pattern_vista-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 684cc3735ab82a4f9175c16005de8d70666dc01bd904ec39abf1d76a7139083b
MD5 c24632468710ed5e26d404156f8cc2d5
BLAKE2b-256 b72a7b9f784d38128e45a173f37185836f4f1a3c3ea56b43efa67a8515aa125f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page