s-ttp commited on
Commit
f429b7e
Β·
verified Β·
1 Parent(s): 739b89d

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +9 -9
  2. 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>` β€” the
58
- shipped GitHub Action (`.github/workflows/monthly-rebalance.yml`) does this every weekday and
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). `.github/workflows/slipstream-supervisor.yml` runs it **daily** and fails the run
69
- on ALERT (that's the alarm; the detail is in the job summary). It doubles as the keep-alive:
70
- free Spaces sleep after 48 h idle, and the weekday-only rebalance ping left it asleep every
71
- weekend.
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). Flip the Space to private under *Settings* if you'd rather not; the Actions already
77
- send `HF_TOKEN` so they keep working.
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 &amp; 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> (weekdays)</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 &lt;βˆ’3pp,
187
  ALERT &lt;βˆ’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 fails the scheduled run so it
191
  can't be missed.</td></tr>
192
  </tbody>
193
  </table>
 
171
  </ul>
172
 
173
  <h2 class="doc-h">5 Β· Operations &amp; 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 &lt;βˆ’3pp,
187
  ALERT &lt;βˆ’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>