Skip to main content

Stock index inclusion probability prediction

Project description

jaymd96-index-inclusion

Stock index inclusion probability prediction. Screens stocks against eligibility rules for 7 major indices (S&P 500, S&P 400, S&P 600, NASDAQ-100, FTSE 100, DJIA, Russell 3000), scores candidates with heuristic signals, and optionally refines predictions with ML.

Install

pip install jaymd96-index-inclusion

Quick Start

from index_inclusion import IndexInclusion

ii = IndexInclusion(fmp_api_key="your-key")

# Check a single stock
result = ii.check("PLTR", "SP500")
print(f"{result.ticker}: {result.probability:.1%} ({result.probability_label})")

# Find top candidates for an index
candidates = ii.candidates("SP500", top_n=10)
for c in candidates:
    print(f"{c.ticker}: {c.probability:.1%}")

# Backtest prediction accuracy
report = ii.backtest("SP500", start=2016, end=2025)
print(f"Precision@3: {report.precision_at_3:.1%}")

# Train ML models
ii.train("SP500", start=2016, end=2023)
candidates = ii.candidates("SP500")  # now uses ML calibration

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

jaymd96_index_inclusion-0.1.0.tar.gz (48.8 kB view details)

Uploaded Source

Built Distribution

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

jaymd96_index_inclusion-0.1.0-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for jaymd96_index_inclusion-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f5ddda8acadba01c7ecc4ddd8ad44d5cb02df5e6c6a65d36aa62ce443ef7bc27
MD5 2a2426d4cdbcd2102418679c5047293c
BLAKE2b-256 8d93a7856ca8a2dc770d91ffe7650630097c96e783c30d045956bfbac534b376

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jaymd96_index_inclusion-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5875958158b753b52979b6879923ab93487c3e730a3d4194bcef2c49c4ad48f0
MD5 e99f11cb7f3cb3b8b9ba62cd263faca8
BLAKE2b-256 0f2c8083811e1790bcd06d3e9d1fb7ce1775ade1a2f1c17a65be0cef83e67799

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