{% set MAPPER = {'up': '上', 'down': '下', 'stock': '股票', 'future': '期貨'} %} {% macro render_fee_setting(type, setting) %}
{{ MAPPER[type] }}

手續費: {{ "%.6f"|format(fee_settings[type]["fee"]) }}%

交易稅: {{ "%.6f"|format(fee_settings[type]["tax"]) }}%

每筆交易固定成本: {{ "{:,.0f}".format(fee_settings[type]["per_trade_cost"]) }}

滑價設定:

{% endmacro %} K-Bar Chart

KBar 圖表


沖銷明細


費用設定
{{ render_fee_setting('stock', fee_settings['stock']) }}
{{ render_fee_setting('future', fee_settings['future']) }}

損益皆已「含滑價」的價格計算

{% for row in profit_rows %} {% endfor %}
標的代號 進場時間 進場價格(不含滑價) 進場價格(含滑價) 進場額外成本 出場時間 出場價格(不含滑價) 出場價格(含滑價) 出場額外成本 交易數量(最小單位) 損益 損益率(%)
{{ row["code"] }} {{ row["entry_dt"] }} {{ "%.4f"|format(row["entry_origin_price"]) }} {{ "%.4f"|format(row["entry_price"]) }} {{ "%.4f"|format(row["trade_cost"]) }} {{ row["exit_dt"] }} {{ "%.4f"|format(row["exit_origin_price"]) }} {{ "%.4f"|format(row["exit_price"]) }} {{ "%.4f"|format(row["cover_cost"]) }} {{ "%.0f"|format(row["min_qty"]) }} {{ "%.4f"|format(row["profit"]) }} {{ "%.4f"|format(row["profit_ratio"] * 100) }}
損益統計

進場次數: {{ "{:,.0f}".format(account_info['entry_times']) }} 次

沖銷次數: {{ "{:,.0f}".format(account_info['cover_times']) }} 次

應收: {{ "{:,.0f}".format(account_info['receive_amount']) }} 元

應付: {{ "{:,.0f}".format(account_info['payable_amount']) }} 元

收益(不含其他成本): {{ "{:,.0f}".format(account_info['net_profit']) }} 元

額外費用: {{ "{:,.0f}".format(account_info['extra_fee']) }} 元

最終收益: {{ "{:,.0f}".format(account_info['profit']) }} 元