feat: add Portfolio Value, Option Value, and Contracts columns to daily results
- Add option_contracts field to BacktestDailyPoint (number of contracts held) - Update engine to calculate total option contracts from positions - Update job serialization to include underlying_value, option_market_value, net_portfolio_value, option_contracts - Update both render_result and render_job_result tables to show: - Low, High, Close (from previous commit) - Portfolio value (net_portfolio_value) - Option value (option_market_value) - Contracts (option_contracts) - LTV hedged - Margin call status
This commit is contained in:
@@ -264,6 +264,7 @@ def run_backtest_job(
|
||||
"underlying_value": dp.underlying_value,
|
||||
"option_market_value": dp.option_market_value,
|
||||
"net_portfolio_value": dp.net_portfolio_value,
|
||||
"option_contracts": dp.option_contracts,
|
||||
"ltv_hedged": dp.ltv_hedged,
|
||||
"ltv_unhedged": dp.ltv_unhedged,
|
||||
"margin_call_hedged": dp.margin_call_hedged,
|
||||
|
||||
Reference in New Issue
Block a user