Compare commits

..
3 Commits
Author SHA1 Message Date
chemavx f059470fde decommission(F3): activar tarjeta Archived del bot en el portfolio
Merge de feat/portfolio-polymarket-archived con las cifras finales de
cierre (12 trades, +$247.78 realized, 239k evaluaciones, 81 días).
El widget deja de consultar la API (apagada) y pasa a tarjeta estática
con enlace al case study.
2026-07-06 12:20:48 +00:00
chemavx 8a89d0bd46 feat(portfolio): cifras finales del widget al cierre real (239k evaluaciones)
Snapshot del apagado 2026-07-06 con el bot ya detenido: 12 trades,
realized +$247.78, 239.462 evaluaciones, 81 días observados.
2026-07-06 12:16:23 +00:00
chemavxandClaude Fable 5 59bc269923 feat(portfolio): tarjeta Polymarket Bot pasa a Archived / case study
Sustituye el widget live (fetch a polymarket.chemavx.xyz/api/summary) por
una tarjeta estática con las cifras finales del paper trading y enlace al
case study en el repo. La tarjeta de servicio apunta al repo de Gitea en
lugar del dominio, que desaparecerá con el apagado.

NO MERGEAR HASTA F2/F3: mientras el bot siga vivo, main mantiene el
widget live. Aplicar esta rama cuando se apague el bot (Fase 3 del plan
de decomisión).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 07:40:09 +00:00
+270 -142
View File
@@ -1,147 +1,275 @@
apiVersion: v1 apiVersion: v1
data: data:
index.html: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\" index.html: |
/>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" <!DOCTYPE html>
/>\n <title>ChemaVX</title>\n <style>\n *, *::before, *::after { box-sizing: <html lang="en">
border-box; margin: 0; padding: 0; }\n\n :root {\n --bg: #0d1117;\n <head>
\ --surface: #161b22;\n --border: #30363d;\n --text: #e6edf3;\n <meta charset="UTF-8" />
\ --muted: #8b949e;\n --accent: #58a6ff;\n --green: #3fb950;\n <meta name="viewport" content="width=device-width, initial-scale=1.0" />
\ --red: #f85149;\n --yellow: #d29922;\n --purple: #bc8cff;\n <title>ChemaVX</title>
\ }\n\n body {\n background: var(--bg);\n color: var(--text);\n <style>
\ font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
Arial, sans-serif;\n min-height: 100vh;\n display: flex;\n flex-direction:
column;\n align-items: center;\n padding: 3rem 1.5rem 4rem;\n }\n\n :root {
\ /* ── Header ─────────────────────────────────── */\n header {\n text-align: --bg: #0d1117;
center;\n margin-bottom: 3.5rem;\n }\n .avatar {\n width: 80px; --surface: #161b22;
height: 80px;\n border-radius: 50%;\n background: linear-gradient(135deg, --border: #30363d;
#1f6feb 0%, #bc8cff 100%);\n display: flex; align-items: center; justify-content: --text: #e6edf3;
center;\n font-size: 2rem; font-weight: 700; color: #fff;\n margin: --muted: #8b949e;
0 auto 1.25rem;\n box-shadow: 0 0 0 3px var(--border);\n }\n h1 { font-size: --accent: #58a6ff;
2rem; font-weight: 700; letter-spacing: -0.5px; }\n .tagline {\n color: --green: #3fb950;
var(--muted); font-size: 0.95rem; margin-top: 0.4rem;\n }\n .dot { display: --red: #f85149;
inline-block; width: 8px; height: 8px;\n border-radius: 50%; background: --yellow: #d29922;
var(--green);\n margin-right: 6px; animation: pulse 2s infinite; }\n --purple: #bc8cff;
\ @keyframes pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: }
0.4; }\n }\n\n /* ── Section title ───────────────────────────── */\n .section-title
{\n font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;\n text-transform: body {
uppercase; color: var(--muted);\n margin-bottom: 0.875rem;\n }\n\n /* background: var(--bg);
── Services grid ───────────────────────────── */\n .services-grid {\n display: color: var(--text);
grid;\n grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));\n gap: font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
0.75rem;\n width: 100%; max-width: 720px;\n margin-bottom: 2.5rem;\n min-height: 100vh;
\ }\n .service-card {\n background: var(--surface);\n border: 1px display: flex;
solid var(--border);\n border-radius: 10px;\n padding: 1rem 1.1rem;\n flex-direction: column;
\ text-decoration: none;\n color: var(--text);\n transition: border-color align-items: center;
0.15s, transform 0.15s, box-shadow 0.15s;\n display: flex; align-items: center; padding: 3rem 1.5rem 4rem;
gap: 0.65rem;\n }\n .service-card:hover {\n border-color: var(--accent);\n }
\ transform: translateY(-2px);\n box-shadow: 0 4px 16px rgba(88,166,255,0.1);\n
\ }\n .service-icon { font-size: 1.3rem; flex-shrink: 0; }\n .service-name /* ── Header ─────────────────────────────────── */
{ font-size: 0.9rem; font-weight: 500; }\n\n /* ── Polymarket card ─────────────────────────── header {
*/\n .poly-wrapper { width: 100%; max-width: 720px; }\n .poly-card {\n background: text-align: center;
var(--surface);\n border: 1px solid var(--border);\n border-radius: margin-bottom: 3.5rem;
12px;\n padding: 1.5rem;\n margin-bottom: 2.5rem;\n }\n .poly-header }
{\n display: flex; align-items: center; justify-content: space-between;\n .avatar {
\ margin-bottom: 1.25rem;\n }\n .poly-title {\n display: flex; width: 80px; height: 80px;
align-items: center; gap: 0.5rem;\n font-size: 0.95rem; font-weight: 600;\n border-radius: 50%;
\ }\n .poly-badge {\n font-size: 0.65rem; font-weight: 600; letter-spacing: background: linear-gradient(135deg, #1f6feb 0%, #bc8cff 100%);
0.04em;\n padding: 2px 7px; border-radius: 20px;\n background: rgba(188,140,255,0.15); display: flex; align-items: center; justify-content: center;
color: var(--purple);\n border: 1px solid rgba(188,140,255,0.3);\n }\n font-size: 2rem; font-weight: 700; color: #fff;
\ #poly-updated {\n font-size: 0.72rem; color: var(--muted);\n }\n\n margin: 0 auto 1.25rem;
\ .metrics-grid {\n display: grid;\n grid-template-columns: repeat(2, box-shadow: 0 0 0 3px var(--border);
1fr);\n gap: 0.75rem;\n }\n @media (min-width: 480px) {\n .metrics-grid }
{ grid-template-columns: repeat(4, 1fr); }\n }\n .metric {\n background: h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.5px; }
var(--bg);\n border: 1px solid var(--border);\n border-radius: 8px;\n .tagline {
\ padding: 0.875rem 1rem;\n }\n .metric-label {\n font-size: 0.68rem; color: var(--muted); font-size: 0.95rem; margin-top: 0.4rem;
color: var(--muted);\n text-transform: uppercase; letter-spacing: 0.06em;\n }
\ margin-bottom: 0.35rem;\n }\n .metric-value {\n font-size: 1.35rem; .dot { display: inline-block; width: 8px; height: 8px;
font-weight: 700; font-variant-numeric: tabular-nums;\n transition: color border-radius: 50%; background: var(--green);
0.3s;\n }\n .metric-value.positive { color: var(--green); }\n .metric-value.negative margin-right: 6px; animation: pulse 2s infinite; }
{ color: var(--red); }\n .metric-value.neutral { color: var(--text); }\n .metric-value.loading @keyframes pulse {
\ { color: var(--muted); font-size: 1rem; }\n\n /* ── Footer ──────────────────────────────────── 0%, 100% { opacity: 1; }
*/\n footer {\n color: var(--muted); font-size: 0.75rem; text-align: center;\n 50% { opacity: 0.4; }
\ width: 100%; max-width: 720px;\n border-top: 1px solid var(--border);\n }
\ padding-top: 1.25rem;\n }\n footer a { color: var(--accent); text-decoration:
none; }\n footer a:hover { text-decoration: underline; }\n </style>\n</head>\n<body>\n\n /* ── Section title ───────────────────────────── */
\ <header>\n <div class=\"avatar\">C</div>\n <h1>ChemaVX</h1>\n <p class=\"tagline\">\n .section-title {
\ <span class=\"dot\"></span>Homelab · k3s · Self-hosted\n </p>\n </header>\n\n font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
\ <!-- Services -->\n <div style=\"width:100%;max-width:720px;margin-bottom:2.5rem;\">\n text-transform: uppercase; color: var(--muted);
\ <p class=\"section-title\">Services</p>\n <div class=\"services-grid\">\n margin-bottom: 0.875rem;
\ <a class=\"service-card\" href=\"https://grafana.chemavx.xyz\" target=\"_blank\" }
rel=\"noopener\">\n <span class=\"service-icon\">\U0001F4CA</span>\n <span
class=\"service-name\">Grafana</span>\n </a>\n <a class=\"service-card\" /* ── Services grid ───────────────────────────── */
href=\"https://n8n.chemavx.xyz\" target=\"_blank\" rel=\"noopener\">\n <span .services-grid {
class=\"service-icon\">⚙️</span>\n <span class=\"service-name\">n8n</span>\n display: grid;
\ </a>\n <a class=\"service-card\" href=\"https://home.chemavx.xyz\" grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
target=\"_blank\" rel=\"noopener\">\n <span class=\"service-icon\">\U0001F3E0</span>\n gap: 0.75rem;
\ <span class=\"service-name\">Homarr</span>\n </a>\n <a class=\"service-card\" width: 100%; max-width: 720px;
href=\"https://polymarket.chemavx.xyz\" target=\"_blank\" rel=\"noopener\">\n margin-bottom: 2.5rem;
\ <span class=\"service-icon\">\U0001F4C8</span>\n <span class=\"service-name\">Polymarket }
Bot</span>\n </a>\n <a class=\"service-card\" href=\"https://chat.chemavx.xyz\" .service-card {
target=\"_blank\" rel=\"noopener\">\n <span class=\"service-icon\">\U0001F916</span>\n background: var(--surface);
\ <span class=\"service-name\">Open WebUI</span>\n </a>\n <a class=\"service-card\" border: 1px solid var(--border);
href=\"https://git.chemavx.xyz\" target=\"_blank\" rel=\"noopener\">\n <span border-radius: 10px;
class=\"service-icon\">\U0001F419</span>\n <span class=\"service-name\">Gitea</span>\n padding: 1rem 1.1rem;
\ </a>\n <a class=\"service-card\" href=\"https://argocd.chemavx.xyz\" text-decoration: none;
target=\"_blank\" rel=\"noopener\">\n <span class=\"service-icon\">\U0001F504</span>\n color: var(--text);
\ <span class=\"service-name\">ArgoCD</span>\n </a>\n <a class=\"service-card\" transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
href=\"https://vaultwarden.chemavx.xyz\" target=\"_blank\" rel=\"noopener\">\n display: flex; align-items: center; gap: 0.65rem;
\ <span class=\"service-icon\">\U0001F510</span>\n <span class=\"service-name\">Vaultwarden</span>\n }
\ </a>\n </div>\n </div>\n\n <!-- Projects -->\n <div style=\"width:100%;max-width:720px;margin-bottom:2.5rem;\">\n .service-card:hover {
\ <p class=\"section-title\">Projects</p>\n <div class=\"services-grid\">\n border-color: var(--accent);
\ <a class=\"service-card\" href=\"/ze\">\n <span class=\"service-icon\">\U0001F6F8</span>\n transform: translateY(-2px);
\ <span class=\"service-name\">ze</span>\n </a>\n </div>\n </div>\n\n box-shadow: 0 4px 16px rgba(88,166,255,0.1);
\ <!-- Polymarket live metrics -->\n <div class=\"poly-wrapper\">\n <p class=\"section-title\">Polymarket }
Bot — Live</p>\n <div class=\"poly-card\">\n <div class=\"poly-header\">\n .service-icon { font-size: 1.3rem; flex-shrink: 0; }
\ <div class=\"poly-title\">\n <span>\U0001F4C8</span>\n <span>Portfolio .service-name { font-size: 0.9rem; font-weight: 500; }
Summary</span>\n <span class=\"poly-badge\" id=\"poly-mode\">PAPER</span>\n
\ </div>\n <span id=\"poly-updated\">Loading…</span>\n </div>\n /* ── Polymarket card ─────────────────────────── */
\ <div class=\"metrics-grid\">\n <div class=\"metric\">\n <div .poly-wrapper { width: 100%; max-width: 720px; }
class=\"metric-label\">P&amp;L</div>\n <div class=\"metric-value loading\" .poly-card {
id=\"m-pnl\">—</div>\n </div>\n <div class=\"metric\">\n <div background: var(--surface);
class=\"metric-label\">Win Rate</div>\n <div class=\"metric-value loading\" border: 1px solid var(--border);
id=\"m-winrate\">—</div>\n </div>\n <div class=\"metric\">\n <div border-radius: 12px;
class=\"metric-label\">Deployed</div>\n <div class=\"metric-value loading\" padding: 1.5rem;
id=\"m-deployed\">—</div>\n </div>\n <div class=\"metric\">\n <div margin-bottom: 2.5rem;
class=\"metric-label\">Trades</div>\n <div class=\"metric-value loading\" }
id=\"m-trades\">—</div>\n </div>\n <div class=\"metric\">\n <div .poly-header {
class=\"metric-label\">Bankroll</div>\n <div class=\"metric-value loading\" display: flex; align-items: center; justify-content: space-between;
id=\"m-bankroll\">—</div>\n </div>\n <div class=\"metric\">\n <div margin-bottom: 1.25rem;
class=\"metric-label\">Sharpe</div>\n <div class=\"metric-value loading\" }
id=\"m-sharpe\">—</div>\n </div>\n <div class=\"metric\">\n <div .poly-title {
class=\"metric-label\">Calibration</div>\n <div class=\"metric-value display: flex; align-items: center; gap: 0.5rem;
loading\" id=\"m-calibration\">—</div>\n </div>\n <div class=\"metric\">\n font-size: 0.95rem; font-weight: 600;
\ <div class=\"metric-label\">Status</div>\n <div class=\"metric-value }
loading\" id=\"m-status\">—</div>\n </div>\n </div>\n </div>\n .poly-badge {
\ </div>\n\n <footer>\n <p>\n Hosted on <strong>k3s</strong> &mdash;\n font-size: 0.65rem; font-weight: 600; letter-spacing: 0.04em;
\ <a href=\"https://grafana.chemavx.xyz/d/chemavx-homelab-v1/chemavx-homelab-overview\" padding: 2px 7px; border-radius: 20px;
target=\"_blank\">Cluster Dashboard</a>\n &mdash; <a href=\"https://git.chemavx.xyz\" background: rgba(188,140,255,0.15); color: var(--purple);
target=\"_blank\">Gitea</a>\n </p>\n </footer>\n\n <script>\n const API border: 1px solid rgba(188,140,255,0.3);
= 'https://polymarket.chemavx.xyz/api/summary';\n const fmt$ = v => v == null }
? '—' : '$' + v.toFixed(2);\n const fmtPct = v => v == null ? '—' : (v * 100).toFixed(1) #poly-updated {
+ '%';\n const fmtN = v => v == null ? '—' : String(v);\n const fmtF = font-size: 0.72rem; color: var(--muted);
(v, d=3) => v == null ? '—' : v.toFixed(d);\n\n function colorClass(id, val) }
{\n const el = document.getElementById(id);\n el.classList.remove('positive','negative','neutral','loading');\n
\ if (val > 0) el.classList.add('positive');\n else if (val < 0) el.classList.add('negative');\n .metrics-grid {
\ else el.classList.add('neutral');\n }\n\n async function fetchMetrics() display: grid;
{\n try {\n const r = await fetch(API, { cache: 'no-store' });\n if grid-template-columns: repeat(2, 1fr);
(!r.ok) throw new Error(r.status);\n const d = await r.json();\n\n document.getElementById('m-pnl').textContent gap: 0.75rem;
\ = fmt$(d.total_pnl);\n document.getElementById('m-winrate').textContent }
\ = fmtPct(d.win_rate);\n document.getElementById('m-deployed').textContent @media (min-width: 480px) {
\ = fmt$(d.total_deployed);\n document.getElementById('m-trades').textContent .metrics-grid { grid-template-columns: repeat(4, 1fr); }
\ = fmtN(d.total_trades);\n document.getElementById('m-bankroll').textContent }
\ = fmt$(d.paper_bankroll);\n document.getElementById('m-sharpe').textContent .metric {
\ = fmtF(d.sharpe_ratio, 2);\n document.getElementById('m-calibration').textContent background: var(--bg);
= fmtF(d.calibration_score, 3);\n document.getElementById('m-status').textContent border: 1px solid var(--border);
\ = d.promotion_ready ? '\U0001F680 Ready' : '⏳ Training';\n\n colorClass('m-pnl', border-radius: 8px;
d.total_pnl);\n colorClass('m-sharpe', d.sharpe_ratio);\n\n const padding: 0.875rem 1rem;
mode = d.paper_mode ? 'PAPER' : 'LIVE';\n const badge = document.getElementById('poly-mode');\n }
\ badge.textContent = mode;\n badge.style.background = d.paper_mode\n .metric-label {
\ ? 'rgba(188,140,255,0.15)' : 'rgba(63,185,80,0.15)';\n badge.style.color font-size: 0.68rem; color: var(--muted);
= d.paper_mode ? 'var(--purple)' : 'var(--green)';\n badge.style.borderColor text-transform: uppercase; letter-spacing: 0.06em;
= d.paper_mode\n ? 'rgba(188,140,255,0.3)' : 'rgba(63,185,80,0.3)';\n\n margin-bottom: 0.35rem;
\ const now = new Date();\n document.getElementById('poly-updated').textContent }
=\n 'Updated ' + now.toLocaleTimeString();\n } catch (e) {\n document.getElementById('poly-updated').textContent .metric-value {
= 'Error: ' + e.message;\n }\n }\n\n fetchMetrics();\n setInterval(fetchMetrics, font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums;
30000);\n </script>\n</body>\n</html>\n" transition: color 0.3s;
}
.metric-value.positive { color: var(--green); }
.metric-value.negative { color: var(--red); }
.metric-value.neutral { color: var(--text); }
.metric-value.loading { color: var(--muted); font-size: 1rem; }
/* ── Footer ──────────────────────────────────── */
footer {
color: var(--muted); font-size: 0.75rem; text-align: center;
width: 100%; max-width: 720px;
border-top: 1px solid var(--border);
padding-top: 1.25rem;
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }
</style>
</head>
<body>
<header>
<div class="avatar">C</div>
<h1>ChemaVX</h1>
<p class="tagline">
<span class="dot"></span>Homelab · k3s · Self-hosted
</p>
</header>
<!-- Services -->
<div style="width:100%;max-width:720px;margin-bottom:2.5rem;">
<p class="section-title">Services</p>
<div class="services-grid">
<a class="service-card" href="https://grafana.chemavx.xyz" target="_blank" rel="noopener">
<span class="service-icon">📊</span>
<span class="service-name">Grafana</span>
</a>
<a class="service-card" href="https://n8n.chemavx.xyz" target="_blank" rel="noopener">
<span class="service-icon">⚙️</span>
<span class="service-name">n8n</span>
</a>
<a class="service-card" href="https://home.chemavx.xyz" target="_blank" rel="noopener">
<span class="service-icon">🏠</span>
<span class="service-name">Homarr</span>
</a>
<a class="service-card" href="https://git.chemavx.xyz/chemavx/polymarket-bot" target="_blank" rel="noopener">
<span class="service-icon">📈</span>
<span class="service-name">Polymarket Bot (archived)</span>
</a>
<a class="service-card" href="https://chat.chemavx.xyz" target="_blank" rel="noopener">
<span class="service-icon">🤖</span>
<span class="service-name">Open WebUI</span>
</a>
<a class="service-card" href="https://git.chemavx.xyz" target="_blank" rel="noopener">
<span class="service-icon">🐙</span>
<span class="service-name">Gitea</span>
</a>
<a class="service-card" href="https://argocd.chemavx.xyz" target="_blank" rel="noopener">
<span class="service-icon">🔄</span>
<span class="service-name">ArgoCD</span>
</a>
<a class="service-card" href="https://vaultwarden.chemavx.xyz" target="_blank" rel="noopener">
<span class="service-icon">🔐</span>
<span class="service-name">Vaultwarden</span>
</a>
</div>
</div>
<!-- Projects -->
<div style="width:100%;max-width:720px;margin-bottom:2.5rem;">
<p class="section-title">Projects</p>
<div class="services-grid">
<a class="service-card" href="/ze">
<span class="service-icon">🛸</span>
<span class="service-name">ze</span>
</a>
</div>
</div>
<!-- Polymarket bot: archived case study (final figures, 2026-07-06) -->
<div class="poly-wrapper">
<p class="section-title">Polymarket Bot — Archived · Case study</p>
<div class="poly-card">
<div class="poly-header">
<div class="poly-title">
<span>📈</span>
<span>Paper Trading — Final Results</span>
<span class="poly-badge">ARCHIVED</span>
</div>
<span id="poly-updated">Final snapshot · 2026-07-06</span>
</div>
<div class="metrics-grid">
<div class="metric">
<div class="metric-label">Realized P&amp;L</div>
<div class="metric-value positive">+$247.78</div>
</div>
<div class="metric">
<div class="metric-label">Paper Trades</div>
<div class="metric-value neutral">12</div>
</div>
<div class="metric">
<div class="metric-label">Evaluations</div>
<div class="metric-value neutral">239k</div>
</div>
<div class="metric">
<div class="metric-label">Days Observed</div>
<div class="metric-value neutral">81</div>
</div>
</div>
<p style="font-size:0.8rem;color:var(--muted);margin-top:1rem;line-height:1.5;">
Bot bayesiano de paper trading sobre mercados de predicción, retirado en
julio de 2026 tras el bloqueo regulatorio de Polymarket en España.
Motor de replay determinista, ~239k evaluaciones archivadas y
observabilidad completa en k3s.
<a href="https://git.chemavx.xyz/chemavx/polymarket-bot" target="_blank" rel="noopener"
style="color:var(--accent);text-decoration:none;">Case study completo →</a>
</p>
</div>
</div>
<footer>
<p>
Hosted on <strong>k3s</strong> &mdash;
<a href="https://grafana.chemavx.xyz/d/chemavx-homelab-v1/chemavx-homelab-overview" target="_blank">Cluster Dashboard</a>
&mdash; <a href="https://git.chemavx.xyz" target="_blank">Gitea</a>
</p>
</footer>
</body>
</html>
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: portfolio-html name: portfolio-html