Skip to content

Commit 2c6fcad

Browse files
committed
BUG: Plot: Increase subplots heights after 3b74729
Refs: 3b74729 "ENH: Reduce height of indicator charts, introduce an overridable global"
1 parent fa3ea11 commit 2c6fcad

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

Diff for: CHANGELOG.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,23 @@ These were the major changes contributing to each release:
55

66
### 0.x.x
77

8+
### 0.6.3
9+
(2025-02-20)
10+
11+
* Enhancements:
12+
* Plot trade duration lines in the P&L plot section.
13+
* `backtesting.lib.TrailingStrategy` supports setting trailing stop-loss by percentage.
14+
* [`backtesting.lib.MultiBacktest`](https://kernc.github.io/backtesting.py/doc/backtesting/lib.html#backtesting.lib.MultiBacktest)
15+
multi-dataset backtesting wrapper.
16+
17+
818
### 0.6.2
919
(2025-02-19)
1020

1121
* Enhancements:
1222
* Grid optimization with mp.Pool & mp.shm.SharedMemory (#1222)
13-
* `backtesting.lib.FractionalBacktest` that supports fractional trading
23+
* [`backtesting.lib.FractionalBacktest`](https://kernc.github.io/backtesting.py/doc/backtesting/lib.html#backtesting.lib.FractionalBacktest)
24+
that supports fractional trading
1425
* `backtesting.__all__` for better `from backtesting import *` and suggestions
1526
* Bugs fixed:
1627
* Fix remaining issues with `trade_on_close=True`

Diff for: backtesting/_plotting.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def _plot_equity_section(is_return=False):
362362
source.add(equity, source_key)
363363
fig = new_indicator_figure(
364364
y_axis_label=yaxis_label,
365-
**({} if plot_drawdown else dict(height=110)))
365+
**(dict(height=80) if plot_drawdown else dict(height=100)))
366366

367367
# High-watermark drawdown dents
368368
fig.patch('index', 'equity_dd',
@@ -413,7 +413,7 @@ def _plot_equity_section(is_return=False):
413413

414414
def _plot_drawdown_section():
415415
"""Drawdown section"""
416-
fig = new_indicator_figure(y_axis_label="Drawdown")
416+
fig = new_indicator_figure(y_axis_label="Drawdown", height=80)
417417
drawdown = equity_data['DrawdownPct']
418418
argmax = drawdown.idxmax()
419419
source.add(drawdown, 'drawdown')
@@ -427,7 +427,7 @@ def _plot_drawdown_section():
427427

428428
def _plot_pl_section():
429429
"""Profit/Loss markers section"""
430-
fig = new_indicator_figure(y_axis_label="Profit / Loss")
430+
fig = new_indicator_figure(y_axis_label="Profit / Loss", height=80)
431431
fig.add_layout(Span(location=0, dimension='width', line_color='#666666',
432432
line_dash='dashed', level='underlay', line_width=1))
433433
trade_source.add(trades['ReturnPct'], 'returns')

0 commit comments

Comments
 (0)