CiscsoPonce commited on
Commit
040ab52
Β·
1 Parent(s): 03926bd

docs: sync README and website with latest reeval bounds, Skeptic order, and test counts

Browse files
Files changed (2) hide show
  1. README.md +7 -3
  2. docs/index.html +4 -4
README.md CHANGED
@@ -165,7 +165,7 @@ The agent (`src/core/memory.py`, `src/portfolio_tracker.py`, `src/discovery/scor
165
  ### Closed-Loop Attribution & Drawdown Re-Evaluation (`src/discovery/scoring.py`, `src/prompts/senior_broker.py`, `src/reeval_portfolio.py`)
166
  - **Attribution-weighted scoring**: Once `/portfolio/attribution` reports at least 5 priced positions, `score_candidate()` applies a bounded `-6` to `+6` score adjustment (`_attribution_adjustment()`) favoring historically strong setups and penalizing underperforming buckets.
167
  - **Prompt calibration**: `get_attribution_lessons()` appends concise recent portfolio win/loss calibration context inside `get_analyst_prompt()`.
168
- - **Drawdown-prioritized re-evaluation**: Weekday re-eval (`src/reeval_portfolio.py`) excludes `delisted` positions and sorts steep drawdowns (`gain_pct <= -25%`, then `>= +50%` gainers) via `_prioritize_trades_by_drawdown()` before applying `--limit`.
169
 
170
  ### Catalyst Polling Daemon (`vps/catalyst_poll.py`)
171
  VPS-based systemd timer that polls every 15 minutes during US market hours for intraday triggers:
@@ -277,6 +277,8 @@ python3 main.py
277
  ```bash
278
  PYTHONPATH=. python tests/test_discovery_improvements.py
279
  PYTHONPATH=. python tests/test_value_improvements.py
 
 
280
  ```
281
 
282
  ### 6. Deploying the VPS API (optional)
@@ -343,8 +345,10 @@ primogreedy/
343
  β”‚ └── prompts/
344
  β”‚ └── senior_broker.py # LangSmith Hub prompt + attribution calibration lessons
345
  β”œβ”€β”€ tests/
346
- β”‚ β”œβ”€β”€ test_discovery_improvements.py # Screener, attribution, and model filter tests (35 assertions)
347
- β”‚ └── test_value_improvements.py # Valuation, currency, and Kelly sizing tests (46 assertions)
 
 
348
  β”œβ”€β”€ docs/
349
  β”‚ └── index.html # Project showcase website (primoinvesting.com)
350
  β”œβ”€β”€ scripts/
 
165
  ### Closed-Loop Attribution & Drawdown Re-Evaluation (`src/discovery/scoring.py`, `src/prompts/senior_broker.py`, `src/reeval_portfolio.py`)
166
  - **Attribution-weighted scoring**: Once `/portfolio/attribution` reports at least 5 priced positions, `score_candidate()` applies a bounded `-6` to `+6` score adjustment (`_attribution_adjustment()`) favoring historically strong setups and penalizing underperforming buckets.
167
  - **Prompt calibration**: `get_attribution_lessons()` appends concise recent portfolio win/loss calibration context inside `get_analyst_prompt()`.
168
+ - **Drawdown-prioritized re-evaluation**: Weekday re-eval (`src/reeval_portfolio.py`) excludes `delisted` positions and tickers already re-evaluated within the last 7 days (`--cooldown-days`, via `_recent_reeval_tickers()` / `_filter_recent_reeval()`), prioritizes steep drawdowns (`gain_pct <= -25%`, then `>= +50%` gainers) via `_prioritize_trades_by_drawdown()`, skips shrunk sub-`$5M` holdings without burning `--limit` slots (`10` evaluated tickers/run in `.github/workflows/reeval.yml`), and enforces a `48m` soft wall-clock budget (`--max-minutes`) so runs finish and email cleanly before GitHub's `60m` timeout.
169
 
170
  ### Catalyst Polling Daemon (`vps/catalyst_poll.py`)
171
  VPS-based systemd timer that polls every 15 minutes during US market hours for intraday triggers:
 
277
  ```bash
278
  PYTHONPATH=. python tests/test_discovery_improvements.py
279
  PYTHONPATH=. python tests/test_value_improvements.py
280
+ PYTHONPATH=. python tests/test_online_eval.py
281
+ PYTHONPATH=. python tests/test_ops_fixes.py
282
  ```
283
 
284
  ### 6. Deploying the VPS API (optional)
 
345
  β”‚ └── prompts/
346
  β”‚ └── senior_broker.py # LangSmith Hub prompt + attribution calibration lessons
347
  β”œβ”€β”€ tests/
348
+ β”‚ β”œβ”€β”€ test_discovery_improvements.py # Screener, attribution, model filter & cooldown tests (37 assertions)
349
+ β”‚ β”œβ”€β”€ test_value_improvements.py # Valuation, currency, and Kelly sizing tests (46 assertions)
350
+ β”‚ β”œβ”€β”€ test_online_eval.py # Inline LangSmith feedback & SmithDB tests (15 assertions)
351
+ β”‚ └── test_ops_fixes.py # Finnhub 429 retry, HTTPS fallback & debate routing tests (20 assertions)
352
  β”œβ”€β”€ docs/
353
  β”‚ └── index.html # Project showcase website (primoinvesting.com)
354
  β”œβ”€β”€ scripts/
docs/index.html CHANGED
@@ -377,7 +377,7 @@
377
  <div class="hero-stat"><div class="num">4</div><div class="label">Global Markets</div></div>
378
  <div class="hero-stat"><div class="num">5-Stage</div><div class="label">Live Free Chain</div></div>
379
  <div class="hero-stat"><div class="num">7</div><div class="label">LangSmith Evaluators</div></div>
380
- <div class="hero-stat"><div class="num">152</div><div class="label">Automated Tests</div></div>
381
  </div>
382
  <div class="scroll-hint">Scroll to explore ↓</div>
383
  </section>
@@ -775,7 +775,7 @@
775
  <li><strong>Liquidity &amp; quality gates:</strong> min avg volume, min dollar volume, price floor, exchange allow-lists, short-float cap, and a pump/blow-off guard run before the expensive analyst step</li>
776
  <li><strong>Insider buying in scoring:</strong> SEC Form 4 net-buying now feeds candidate ranking (+20 large net buys, +12 otherwise, βˆ’5 net selling), cached per run</li>
777
  <li><strong>SEC EDGAR fix:</strong> tickerβ†’CIK resolution + submissions API replaces the ignored <code>tickers=</code> EFTS filter; section extraction now skips the table of contents and captures real MD&amp;A/Risk Factors prose</li>
778
- <li><strong>Reliability net:</strong> <code>tests/test_discovery_improvements.py</code> (35 assertions) and <code>tests/test_value_improvements.py</code> (46 assertions) run in CI before every hunt. Requires <code>yfinance&gt;=1.6</code>, guarded so older versions fall back to the seed pool</li>
779
  </ul>
780
  </div>
781
 
@@ -785,8 +785,8 @@
785
  <ul>
786
  <li><strong>Attribution-weighted discovery &amp; prompts:</strong> <code>/portfolio/attribution</code> tracks performance by verdict, sector, and region; once <code>β‰₯ 5</code> priced positions exist, <code>score_candidate()</code> applies a bounded <code>βˆ’6..+6</code> bias and <code>get_attribution_lessons()</code> calibrates the analyst prompt</li>
787
  <li><strong>Closed-position archive &amp; benchmarks:</strong> <code>CLOSE</code> accepts archive paper trades into <code>closed_positions</code> with realized <code>exit_price</code> and <code>gain_pct</code>; <code>/portfolio/attribution</code> and the VPS dashboard benchmark against <code>IWM</code> and <code>SPY</code></li>
788
- <li><strong>Drawdown-prioritized re-evaluation:</strong> weekday re-eval (<code>src/reeval_portfolio.py</code>) skips <code>delisted</code> tickers and inspects <code>gain_pct ≀ βˆ’25%</code> (followed by <code>β‰₯ +50%</code>) before slicing <code>--limit</code></li>
789
- <li><strong>Self-healing free model routing &amp; HF sync:</strong> replaced retired Nemotron Super with <code>google/gemma-4-31b-it:free</code>, added 1h live OpenRouter <code>/api/v1/models</code> <code>:free</code> filtering, automated Space sync via <code>.github/workflows/sync-hf.yml</code>, and expanded VPS API tests to 71 passing checks</li>
790
  </ul>
791
  </div>
792
 
 
377
  <div class="hero-stat"><div class="num">4</div><div class="label">Global Markets</div></div>
378
  <div class="hero-stat"><div class="num">5-Stage</div><div class="label">Live Free Chain</div></div>
379
  <div class="hero-stat"><div class="num">7</div><div class="label">LangSmith Evaluators</div></div>
380
+ <div class="hero-stat"><div class="num">189</div><div class="label">Automated Tests</div></div>
381
  </div>
382
  <div class="scroll-hint">Scroll to explore ↓</div>
383
  </section>
 
775
  <li><strong>Liquidity &amp; quality gates:</strong> min avg volume, min dollar volume, price floor, exchange allow-lists, short-float cap, and a pump/blow-off guard run before the expensive analyst step</li>
776
  <li><strong>Insider buying in scoring:</strong> SEC Form 4 net-buying now feeds candidate ranking (+20 large net buys, +12 otherwise, βˆ’5 net selling), cached per run</li>
777
  <li><strong>SEC EDGAR fix:</strong> tickerβ†’CIK resolution + submissions API replaces the ignored <code>tickers=</code> EFTS filter; section extraction now skips the table of contents and captures real MD&amp;A/Risk Factors prose</li>
778
+ <li><strong>Reliability net:</strong> <code>tests/test_discovery_improvements.py</code> (37 assertions), <code>test_value_improvements.py</code> (46), <code>test_online_eval.py</code> (15), and <code>test_ops_fixes.py</code> (20) run in CI before every hunt. Requires <code>yfinance&gt;=1.6</code>, guarded so older versions fall back to the seed pool</li>
779
  </ul>
780
  </div>
781
 
 
785
  <ul>
786
  <li><strong>Attribution-weighted discovery &amp; prompts:</strong> <code>/portfolio/attribution</code> tracks performance by verdict, sector, and region; once <code>β‰₯ 5</code> priced positions exist, <code>score_candidate()</code> applies a bounded <code>βˆ’6..+6</code> bias and <code>get_attribution_lessons()</code> calibrates the analyst prompt</li>
787
  <li><strong>Closed-position archive &amp; benchmarks:</strong> <code>CLOSE</code> accepts archive paper trades into <code>closed_positions</code> with realized <code>exit_price</code> and <code>gain_pct</code>; <code>/portfolio/attribution</code> and the VPS dashboard benchmark against <code>IWM</code> and <code>SPY</code></li>
788
+ <li><strong>Bounded, rotating re-evaluation:</strong> weekday re-eval (<code>src/reeval_portfolio.py</code>) skips <code>delisted</code> and 7-day cooled-down tickers, prioritizes <code>gain_pct ≀ βˆ’25%</code> (followed by <code>β‰₯ +50%</code>), filters sub-$5M gatekeeper skips without wasting <code>--limit 10</code> slots, and honors a <code>48m</code> soft time budget so summary emails always send</li>
789
+ <li><strong>Self-healing free model routing &amp; HF sync:</strong> <code>recursive/flint-v1.0:free</code> leads the 3-model Skeptic chain (with ERNIE &amp; Super VL backups), <code>_live_free_models()</code> filters OpenRouter <code>/api/v1/models</code> hourly, <code>.github/workflows/sync-hf.yml</code> auto-syncs the HF Space, and VPS API tests total 71 passing checks</li>
790
  </ul>
791
  </div>
792