feat: add candlestick chart with portfolio value line (BT-004)
- Add spot_open field to BacktestDailyPoint for complete OHLC data - Replace line chart with candlestick chart showing price OHLC - Add portfolio value line on secondary Y-axis - Add _chart_options_from_dict for rendering job results - Update both render_result and render_job_result to use new chart
This commit is contained in:
@@ -259,6 +259,7 @@ def run_backtest_job(
|
||||
{
|
||||
"date": dp.date.isoformat(),
|
||||
"spot_close": dp.spot_close,
|
||||
"spot_open": dp.spot_open if dp.spot_open is not None else dp.spot_close,
|
||||
"spot_low": dp.spot_low if dp.spot_low is not None else dp.spot_close,
|
||||
"spot_high": dp.spot_high if dp.spot_high is not None else dp.spot_close,
|
||||
"underlying_value": dp.underlying_value,
|
||||
|
||||
Reference in New Issue
Block a user