补充可配置过户费并纳入成交成本

This commit is contained in:
boris
2026-08-22 14:50:00 +08:00
parent b8776d7169
commit 375b8b2df1
8 changed files with 43 additions and 3 deletions
+2 -1
View File
@@ -196,7 +196,7 @@ impl BacktestResult {
quantity: fill.quantity,
price: fill.price,
gross_amount: fill.gross_amount,
transaction_cost: fill.commission + fill.stamp_tax,
transaction_cost: fill.commission + fill.stamp_tax + fill.transfer_fee,
net_cash_flow: fill.net_cash_flow,
reason: fill.reason.clone(),
})
@@ -3157,6 +3157,7 @@ where
gross_amount: reinvest_cash,
commission: 0.0,
stamp_tax: 0.0,
transfer_fee: 0.0,
net_cash_flow: -reinvest_cash,
reason: "dividend_reinvestment".to_string(),
});