{# 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 %}
{% for s in open_shorts %} {% set dte = (s.expiry - today).days %} {% if dte <= 7 %}{% set dte_class = 'text-warn' %} {% elif dte <= 21 %}{% set dte_class = 'text-label-1' %} {% else %}{% set dte_class = 'text-label-2' %}{% endif %} {# Days since open as a progress bar from 0 → expiry. We don't know the exact open date when GL closures shrink the chain, so use opened_at when available; otherwise show a steady bar. #} {% if s.opened_at %} {% set total_days = (s.expiry - s.opened_at).days %} {% set elapsed = (today - s.opened_at).days %} {% if total_days > 0 %}{% set fill_pct = (elapsed / total_days * 100)|round(0, 'common') %}{% else %}{% set fill_pct = 100 %}{% endif %} {% else %} {% set fill_pct = 50 %} {% endif %}
{% 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 to expiry
{% endfor %}
{% endif %}