Metadata-Version: 2.4
Name: yuclaw-evidence
Version: 3.0.1
Summary: Python SDK for the YUCLAW v3.0 evidence-first financial research platform. Distribution name is `yuclaw-evidence`; import as `yuclaw_py`. Research / education only — not investment advice.
Project-URL: Homepage, https://github.com/YuClawLab/yuclaw-brain
Project-URL: Documentation, https://yuclawlab.github.io/yuclaw-brain/
Project-URL: Source, https://github.com/YuClawLab/yuclaw-brain
Author-email: YuClawLab <yuclawlab@example.com>
License: MIT License
        
        Copyright (c) 2026 YuClawLab
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: backtest,events,evidence,research,signal,yuclaw
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.10
Requires-Dist: pandas>=2.0
Requires-Dist: psycopg2-binary>=2.9
Requires-Dist: requests>=2.28
Provides-Extra: notebooks
Requires-Dist: jupyter>=1.0; extra == 'notebooks'
Requires-Dist: matplotlib>=3.5; extra == 'notebooks'
Requires-Dist: nbconvert>=7.0; extra == 'notebooks'
Requires-Dist: nbformat>=5.0; extra == 'notebooks'
Description-Content-Type: text/markdown

# yuclaw-evidence

Python SDK for the [YUCLAW](https://github.com/YuClawLab/yuclaw-brain) open-source financial intelligence platform.

> **Disclaimer.** Research and education only. Not investment advice. Signal labels are research classifications, not buy/sell recommendations. YUCLAW is not a registered investment adviser. Past results — in-sample or forward-tracked — do not predict future performance.

## Install

```bash
pip install yuclaw-evidence
# or, with notebook extras (matplotlib + jupyter for `04_validation_analysis`):
pip install "yuclaw-evidence[notebooks]"
```

## Quickstart

```python
import yuclaw_py

# Two access modes:
#   source="postgres" — direct local read (requires the v3.0 stack)
#   source="api"      — REST API (Day 11+, hosted at YuClawLab)
client = yuclaw_py.Client(source="postgres", dsn="dbname=yuclaw_events")

# Latest composite signal for a ticker
sig = client.signal("NVDA")
print(sig["label"], sig["score"])
#> NEUTRAL 0.312

# Full `why` — signal + ranked evidence events with source URLs
why = client.why("NVDA")
for ev in why["evidence"]:
    print(ev["event_type"], ev["raw_excerpt"][:60])

# Point-in-time replay (must already be materialized via `python3 -m v3.cli replay`)
hist = client.replay("AMD", date="2026-03-01")
print(hist["label"], hist["score"])

# In-Sample Validation + Forward Tracking Ledger as pandas DataFrames
panels = client.validation()
panels["in_sample"].head()
panels["forward"].head()

# Raw events for a ticker
df = client.events("AMD", since="2026-05-01")

# Universe
client.universe()  # list of 79 tickers
```

## What you get

Every signal-bearing return carries a `compliance` dict:

```python
{"not_advice": True, "research_only": True, "not_registered_adviser": True}
```

— and the public vocabulary is strictly:
`STRONG_BULLISH`, `BULLISH`, `NEUTRAL`, `WATCH`, `WEAKENING`, `NEGATIVE_EVENT`, `BEARISH_WATCH`, `RISK_ALERT`.

No `SELL`, no `SHORT`. Anywhere.

## Starter notebooks

`sdk/notebooks/` ships five self-contained notebooks:

1. `01_quickstart.ipynb` — install, connect, first signal
2. `02_evidence_layer.ipynb` — trace a signal to its SEC filings
3. `03_time_machine.ipynb` — replay across dates, verify point-in-time integrity
4. `04_validation_analysis.ipynb` — load the two panels, plot hit rates (with in-sample caveats)
5. `05_signal_radar.ipynb` — change detection + custom watchlist alert

## License

MIT — see `LICENSE`.
