initial commit — cassandra v0.1
Containerised macro-strategy dashboard: 4-panel web UI (indicators, portfolio, flash news, AI strategic log), MariaDB store, hourly ingestion jobs, OpenRouter-backed AI analysis. Ports the four prototype scripts in the parent dir (market_pulse, flash_news, trading212, strategic_log) into async services backed by a persistent DB and served via FastAPI + Jinja2 + HTMX. APScheduler runs as a separate compose service for crash-safety and easier restarts. Portfolio composition + position names come live from Trading 212; news per-ticker headlines reuse those names. Tone (NOVICE/INTERMEDIATE/ PRO) and analysis style (DRY/SPECULATIVE) are env-configurable and stored on each log row so historical entries show what produced them. Default model is deepseek/deepseek-v4-flash (overridable via env). Light/dark theme toggle, sans-serif for prose surfaces, monospace for data. Bearer-token auth, OpenRouter monthly cost cap, RSS feeds auto- disabled on consecutive failures. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
a10409c02b
61 changed files with 4890 additions and 0 deletions
38
app/templates/partials/indicators.html
Normal file
38
app/templates/partials/indicators.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{% if not quotes %}
|
||||
<div class="empty">no data yet — scheduler may not have run</div>
|
||||
{% else %}
|
||||
<table class="dense">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Symbol</th><th>Label</th>
|
||||
<th class="num">Price</th><th>Ccy</th>
|
||||
<th class="num">1d</th><th class="num">1m</th><th class="num">1y</th>
|
||||
{% if has_anchor %}<th class="num">anchor</th>{% endif %}
|
||||
<th>as-of</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for q in quotes %}
|
||||
<tr>
|
||||
<td class="label">{{ q.symbol }}</td>
|
||||
<td>{{ q.label or "" }}</td>
|
||||
<td class="num">{{ q.price | price }}</td>
|
||||
<td class="neu">{{ q.currency or "" }}</td>
|
||||
{% for k in ["1d","1m","1y"] %}
|
||||
{% set v = q.changes.get(k) if q.changes else None %}
|
||||
<td class="num {% if v is none %}neu{% elif v >= 0 %}pos{% else %}neg{% endif %}">
|
||||
{% if v is none %}—{% else %}{{ "%+.2f"|format(v) }}%{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
{% if has_anchor %}
|
||||
{% set va = q.changes.get('anchor') if q.changes else None %}
|
||||
<td class="num {% if va is none %}neu{% elif va >= 0 %}pos{% else %}neg{% endif %}">
|
||||
{% if va is none %}—{% else %}{{ "%+.2f"|format(va) }}%{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="neu">{{ q.as_of or "" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue