Spaces:
Running
Running
File size: 4,575 Bytes
b34c7fd 134649f b34c7fd 134649f b34c7fd d6a28c7 b34c7fd 134649f 261cef9 134649f d6a28c7 134649f d6a28c7 ea01671 e5e019b 134649f f429b7e ea01671 f429b7e d6a28c7 ea01671 f429b7e 134649f ea01671 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | ---
title: Slipstream
emoji: π
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
pinned: false
short_description: Smart-money, quality, trend-adaptive paper fund
---
# Slipstream
A quality, trend-adaptive equity **paper fund** that drafts the smart money.
**Strategy (rule v2, Oct 2026):** hold the large-caps that concentrated 13F managers are collectively
buying β every filer with 10β150 positions, $250Mβ$100B and β₯40% in its top 10 (rule-based, ~900β1,500 a
quarter); signal = 2Β·new + add β 2Β·exit conviction positions β restricted to the top-1,000 by market cap
and to companies whose ROA is in the **top 30% of their sector**; top-20 dollar-weighted (**1β10% per
name**, β€5 per sector) with a **dynamic sector cap** (each sector 30% Β± its 12-1m relative strength,
15β45%) and a **regime overlay** that rotates into large-cap momentum when SPY is in a confirmed
downtrend. An AI overlay excludes only names hit by a critical adverse event. Rebalanced monthly.
Backtest 2014-03 β 2026-10 (survivorship-free, data through *d* β 1, 20 bp/side, Sharpe net of T-bills):
CAGR 19.9% vs SPY 13.9%, Sharpe 0.85 vs 0.73, max drawdown -37.5% vs -33.7%,
alpha +3.9% (t 1.8), Ξ² 1.17. Chosen on 2016β2021 from ~210 configurations; it trailed SPY over the
never-used 2014-03 β 2016-02 window. Research and pre-registrations: `Quant Model/data/research/slipstream/`.
The page shows the live Alpaca **paper** portfolio, performance vs SPY, and the current
target book. The informational **Top AI Picks of the Month** panels moved to the
[Signalflow](https://huggingface.co/spaces/s-ttp/signalflow) Space (Nov 2026); `/picks` redirects there.
## Setup (Space secrets)
Add these under *Settings β Variables and secrets*:
| Secret | Purpose |
|---|---|
| `ALPACA_API_KEY`, `ALPACA_SECRET_KEY` | your Alpaca **paper** account (required) |
| `ALPACA_PAPER_ENDPOINT` | optional, defaults to `https://paper-api.alpaca.markets` |
| `REBALANCE_TOKEN` | enables the rebalance executor (send as `X-Rebalance-Token`) |
| `GEMINI_API_KEY` | optional β the AI event-risk overlay. Model via `GEMINI_MODEL`, default `gemini-flash-lite-latest`. Without it the overlay is off and the book is purely rule-based |
| `SLIPSTREAM_CASH_BUFFER` | optional, default `0.01` β fraction of equity the executor keeps in cash |
The fund only ever trades the **paper** endpoint. Rebalance is dry-run by default; a real
submit needs `dry=0` **and** the matching `REBALANCE_TOKEN`.
## Rebalance
`POST /api/rebalance?dry=1` returns the trade plan (no orders). Monthly, trigger a real
rebalance with `POST /api/rebalance?dry=0` and header `X-Rebalance-Token: <token>`. A Hugging
Face scheduled Job (`rebalance`, weekdays 15:00 UTC, `ops/hf_ops.py` in the Refinery Space) does this
every weekday, and the Space no-ops until the first market-open day of the month.
The executor sizes the book off `(1 β CASH_BUFFER) Γ equity`, never 100%: a fully-invested
target plus the min-trade deadband (small overweights are never sold) had left the account on a
standing margin balance. Sells are placed first and **waited for** before buys go in.
## Ops
- **Supervisor** β `GET /api/supervisor` is a flag-only monitor (tracking vs SPY, guardrails,
freshness). The HF scheduled Job `supervisor` runs it **daily** (13:00 UTC). On ALERT it opens
a discussion on this Space, which HF notifies you about. It doubles as the keep-alive: free Spaces
sleep after 48 h idle, and the weekday-only rebalance ping left it asleep every weekend.
All schedules (refresh, rebalance, supervisor, shadow book) are HF Jobs. See the Refinery README.
- **Restarts are safe.** All fund state lives in Alpaca. The `data/` risk-screen cache is
ephemeral inside the container β a restart just recomputes it (one LLM call).
- **Public by design.** The dashboard, holdings and dry-run plan are world-readable (it's a paper
account). If you flip the Space to private under *Settings*, give the Jobs' requests an
`Authorization: Bearer` header (`ops/hf_ops.py` currently calls the public URL).
## Data refresh
The smart-money signal bundle in `data/` is regenerated by `engine/export_bundle.py` (run where
the licensed Sharadar cache lives) and committed. Refresh it **weekly**: 13F is quarterly and
~45-day lagged, but `prices.parquet` feeds the sector-strength and momentum sleeves, and the
supervisor WATCHes at 10 days / ALERTs at 14. The regime test (SPY vs 200-day MA) additionally
pulls SPY **live** from Alpaca, so the fund's biggest switch never waits on the bundle.
|