{# Inputs: open_shorts: list[OpenShortOptionRow] cash_secured_total: Decimal premium_received_total: Decimal today: date #} {% set _expanded = open_shorts|length > 0 %}

Open short options

{% set _puts = open_shorts | selectattr('call_put', 'equalto', 'P') | list | length %} {% set _calls = open_shorts | selectattr('call_put', 'equalto', 'C') | list | length %} {% if _puts %}{{ _puts }} CSP{% if _puts != 1 %}s{% endif %}{% endif %} {% if _puts and _calls %} · {% endif %} {% if _calls %}{{ _calls }} CC{% if _calls != 1 %}s{% endif %}{% endif %} {% if open_shorts %} · cash secured ${{ "{:,.0f}".format(cash_secured_total) }}{% endif %} {% if premium_received_total %} · premium +${{ "%.2f"|format(premium_received_total) }}{% endif %}
{% if not open_shorts %}
No open short options.
{% else %}
{# Bar = days-to-expiry on a fixed 0–365d scale. Same expiry → same bar. Color matches the DTE-urgency bucket (red ≤7d, orange ≤21d, green >21d). #} {% set MAX_DTE = 365 %} {% for s in open_shorts %} {% set dte = (s.expiry - today).days %} {% if dte <= 7 %}{% set dte_class = 'text-warn' %}{% set bar_color = 'var(--color-neg)' %} {% elif dte <= 21 %}{% set dte_class = 'text-label-1' %}{% set bar_color = 'var(--color-warn)' %} {% else %}{% set dte_class = 'text-label-2' %}{% set bar_color = 'var(--color-pos)' %}{% endif %} {% set _capped = dte if dte > 0 else 0 %} {% if _capped > MAX_DTE %}{% set _capped = MAX_DTE %}{% endif %} {% set fill_pct = (_capped / MAX_DTE * 100)|round(0, 'common') %}
{% if s.call_put == 'C' %}CALL{% else %}PUT{% endif %} ${{ "%g"|format(s.strike) }}
{{ s.expiry.strftime('%m/%d/%y') }}
{% if s.opened_at %}opened {{ (today - s.opened_at).days }}d ago{% else %}— {% endif %}
+${{ "%.2f"|format(s.premium_received) }}
{% if s.call_put == 'P' %}
${{ "{:,.0f}".format(s.cash_secured) }} secured
{% endif %}
{{ dte }}d
{% endfor %}
{% endif %}