Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- README.md +9 -9
- static/index.html +3 -3
README.md
CHANGED
|
@@ -54,9 +54,9 @@ submit needs `dry=0` **and** the matching `REBALANCE_TOKEN`.
|
|
| 54 |
## Rebalance
|
| 55 |
|
| 56 |
`POST /api/rebalance?dry=1` returns the trade plan (no orders). Monthly, trigger a real
|
| 57 |
-
rebalance with `POST /api/rebalance?dry=0` and header `X-Rebalance-Token: <token>`
|
| 58 |
-
|
| 59 |
-
the Space no-ops until the first market-open day of the month.
|
| 60 |
|
| 61 |
The executor sizes the book off `(1 β CASH_BUFFER) Γ equity`, never 100%: a fully-invested
|
| 62 |
target plus the min-trade deadband (small overweights are never sold) had left the account on a
|
|
@@ -65,16 +65,16 @@ standing margin balance. Sells are placed first and **waited for** before buys g
|
|
| 65 |
## Ops
|
| 66 |
|
| 67 |
- **Supervisor** β `GET /api/supervisor` is a flag-only monitor (tracking vs SPY, guardrails,
|
| 68 |
-
freshness). `
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
- **Restarts are safe.** All fund state lives in Alpaca. `data/` caches (picks, risk screen) are
|
| 73 |
ephemeral inside the container β a restart just recomputes them (one LLM call per panel, one
|
| 74 |
for the screen), and the shipped caches serve meanwhile.
|
| 75 |
- **Public by design.** The dashboard, holdings and dry-run plan are world-readable (it's a paper
|
| 76 |
-
account).
|
| 77 |
-
|
| 78 |
|
| 79 |
## Data refresh
|
| 80 |
|
|
|
|
| 54 |
## Rebalance
|
| 55 |
|
| 56 |
`POST /api/rebalance?dry=1` returns the trade plan (no orders). Monthly, trigger a real
|
| 57 |
+
rebalance with `POST /api/rebalance?dry=0` and header `X-Rebalance-Token: <token>`. A Hugging
|
| 58 |
+
Face scheduled Job (`rebalance`, weekdays 15:00 UTC, `ops/hf_ops.py` in the Refinery Space) does this
|
| 59 |
+
every weekday, and the Space no-ops until the first market-open day of the month.
|
| 60 |
|
| 61 |
The executor sizes the book off `(1 β CASH_BUFFER) Γ equity`, never 100%: a fully-invested
|
| 62 |
target plus the min-trade deadband (small overweights are never sold) had left the account on a
|
|
|
|
| 65 |
## Ops
|
| 66 |
|
| 67 |
- **Supervisor** β `GET /api/supervisor` is a flag-only monitor (tracking vs SPY, guardrails,
|
| 68 |
+
freshness). The HF scheduled Job `supervisor` runs it **daily** (13:00 UTC). On ALERT it opens
|
| 69 |
+
a discussion on this Space, which HF notifies you about. It doubles as the keep-alive: free Spaces
|
| 70 |
+
sleep after 48 h idle, and the weekday-only rebalance ping left it asleep every weekend.
|
| 71 |
+
All schedules (refresh, rebalance, supervisor, shadow book) are HF Jobs. See the Refinery README.
|
| 72 |
- **Restarts are safe.** All fund state lives in Alpaca. `data/` caches (picks, risk screen) are
|
| 73 |
ephemeral inside the container β a restart just recomputes them (one LLM call per panel, one
|
| 74 |
for the screen), and the shipped caches serve meanwhile.
|
| 75 |
- **Public by design.** The dashboard, holdings and dry-run plan are world-readable (it's a paper
|
| 76 |
+
account). If you flip the Space to private under *Settings*, give the Jobs' requests an
|
| 77 |
+
`Authorization: Bearer` header (`ops/hf_ops.py` currently calls the public URL).
|
| 78 |
|
| 79 |
## Data refresh
|
| 80 |
|
static/index.html
CHANGED
|
@@ -171,7 +171,7 @@
|
|
| 171 |
</ul>
|
| 172 |
|
| 173 |
<h2 class="doc-h">5 Β· Operations & monitoring</h2>
|
| 174 |
-
<p>The fund runs fully automated in the cloud, with a flag-only supervisor watching it daily.
|
| 175 |
Three independent scheduled loops:</p>
|
| 176 |
<table class="doc-table">
|
| 177 |
<tbody>
|
|
@@ -182,12 +182,12 @@
|
|
| 182 |
<tr><td><b>Monthly rebalance</b> (1st)</td><td>Trades the freshest weekly signal row through the
|
| 183 |
construction rules above (ROA quality gate β AI critical-event screen β 10% name cap alternating with dynamic
|
| 184 |
sector caps). Idempotent β a re-run trades only target-minus-actual.</td></tr>
|
| 185 |
-
<tr><td><b>Daily supervisor</b> (
|
| 186 |
trades</em> β checking three things: <b>tracking</b> (trailing 4-week fund-vs-SPY gap; WATCH <β3pp,
|
| 187 |
ALERT <β6pp), <b>guardrails</b> (paper-only invariant, no margin, exposure β€100.5%, and position
|
| 188 |
drift β the 10% cap applies <em>at</em> rebalance, so intra-month drift only flags above 13%, alerts
|
| 189 |
above 17%), and <b>freshness</b> (signals β€10 days old, last rebalance β€35 days). Results appear as
|
| 190 |
-
the OK / WATCH / ALERT chips at the top of the Fund tab, and an ALERT
|
| 191 |
can't be missed.</td></tr>
|
| 192 |
</tbody>
|
| 193 |
</table>
|
|
|
|
| 171 |
</ul>
|
| 172 |
|
| 173 |
<h2 class="doc-h">5 Β· Operations & monitoring</h2>
|
| 174 |
+
<p>The fund runs fully automated in the cloud, on Hugging Face scheduled Jobs, with a flag-only supervisor watching it daily.
|
| 175 |
Three independent scheduled loops:</p>
|
| 176 |
<table class="doc-table">
|
| 177 |
<tbody>
|
|
|
|
| 182 |
<tr><td><b>Monthly rebalance</b> (1st)</td><td>Trades the freshest weekly signal row through the
|
| 183 |
construction rules above (ROA quality gate β AI critical-event screen β 10% name cap alternating with dynamic
|
| 184 |
sector caps). Idempotent β a re-run trades only target-minus-actual.</td></tr>
|
| 185 |
+
<tr><td><b>Daily supervisor</b> (every day)</td><td>A deterministic health monitor β it <em>never
|
| 186 |
trades</em> β checking three things: <b>tracking</b> (trailing 4-week fund-vs-SPY gap; WATCH <β3pp,
|
| 187 |
ALERT <β6pp), <b>guardrails</b> (paper-only invariant, no margin, exposure β€100.5%, and position
|
| 188 |
drift β the 10% cap applies <em>at</em> rebalance, so intra-month drift only flags above 13%, alerts
|
| 189 |
above 17%), and <b>freshness</b> (signals β€10 days old, last rebalance β€35 days). Results appear as
|
| 190 |
+
the OK / WATCH / ALERT chips at the top of the Fund tab, and an ALERT opens an alert on the Space so it
|
| 191 |
can't be missed.</td></tr>
|
| 192 |
</tbody>
|
| 193 |
</table>
|