Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency backtesting to v0.6.4 #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 21, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
backtesting (source) ==0.3.3 -> ==0.6.4 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

kernc/backtesting.py (backtesting)

v0.6.4

Compare Source

(2025-03-30)

  • Bug fixes:
    • Fix optimization hanging on MS Windows under some conditions,
      primarily missing a if __name__ == '__main__' guard.
    • Restore original scale in FractionalBacktest plot (#​1247)
    • Fix "'CAGR [%]' must match a key in pd.Series result of bt.run()" error
    • Fix grid optimization on data with timezone-aware datetime index

v0.6.3

Compare Source

(2025-03-11)

  • Enhancements:
    • backtesting.lib.TrailingStrategy supports setting trailing stop-loss by percentage.
    • backtesting.lib.MultiBacktest
      multi-dataset backtesting wrapper.
    • Backtest.run() wrapped in tqdm()
    • Rename parameter lib.FractionalBacktest(fractional_unit=).
    • Add market alpha & market beta stats (#​1221)
  • Plot improvements:
    • Plot trade duration lines in the P&L plot section.
    • Simplify PL section, use circular markers.
    • Only plot trades when some trades are present.
    • Set fig.yaxis.ticker.desired_num_ticks=3 for indicator subplots.
    • Single legend item for indicators with singular/default names.
    • Make "OHLC" itself a togglable legend item.
    • Add xwheel_pan tool, conditioned on activation for now
      (upvote Bokeh issue).
    • Reduce height of indicator charts, introduce an overridable private
      global backtesting._plotting._INDICATOR_HEIGHT.
  • Bug fixes:
    • Fixed Position.pl occasionally not matching Position.pl_pct in sign.
    • SL always executes before TP when hit in the same bar.
    • Fix functools.partial objects do not always have a __module__ attr in Python 3.9 (#​1233)
    • Fix stop-market and TP hit within the same bar.
  • Documentation improvements (warnings, links, ...)

v0.6.2

Compare Source

(2025-02-19)

  • Enhancements:
  • Bugs fixed:
    • Fix remaining issues with trade_on_close=True
    • Fix trades reported in reverse chronological order when finalize_trades=True
    • Fix crosshair not linked across subplots
    • Cast datetime_arr.astype(np.int64) to avoid Windos error

v0.6.1

Compare Source

(2025-02-04)

Enhancement: Use joblib.Parallel for optimization.
This should vastly improve performance on Windows while not
affecting other platforms too much.

v0.6.0

Compare Source

(2025-02-04)

  • Enhancements:
    • Add Backtest(spread=); change Backtest(commission=) to apply twice per trade
    • Show paid "Commissions [$]" key in trade stats
    • Allow multiple names for vector indicators (#​980)
    • Add columns SL and TP to stats['trades'] (#​1039)
    • Add entry/exit indicator values to stats['trades'] (#​1116)
    • Optionally finalize trades at the end of backtest run (#​393)
  • Bug fixes, including for some long-standing bugs:
    • Fix bug in Sharpe ratio with non-zero risk-free rate (#​904)
    • Change price comparisons to lte/gte to align with TradingView
    • Reduce optimization memory footprint (#​884)
    • Fix annualized stats with weekly/monthly data
    • Fix AssertionError on for o in self.orders: o.cancel()
    • Fix plot not shown in VSCode Jupyter
    • Buy&Hold duration now matches trading duration
    • Fix bt.plot(resample=True) with categorical indicators
  • Several other small bug fixes, deprecations and docs updates.

v0.5.0

Compare Source

(2025-01-21)

  • Enhancements:
    • New Backtest.optimize(method="sambo");
      uses SAMBO:
      to replace method="skopt".
    • New 'CAGR [%]' (compound annual growth rate) statistic.
  • Bug fixes:
    • "stop-loss executed at a higher than market price".
    • Bug with buy/sell size=0.
    • Order.__repr__ issue with non-numeric Order.tag.
  • Other small fixes, deprecations and docs updates.

v0.4.0

Compare Source

(2025-01-21)

  • Enhancements:
    • 'Kelly Criterion' statistic (#​640)
    • Backtest.plot(plot_trades=) parameter
    • Order.tag for tracking orders and trades (#​200)
  • Small bug fixes, deprecation removals and documentation updates.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/backtesting-0.x branch from 787a815 to ec7d075 Compare February 4, 2025 05:10
@renovate renovate bot changed the title Update dependency backtesting to v0.5.0 Update dependency backtesting to v0.6.1 Feb 4, 2025
@renovate renovate bot force-pushed the renovate/backtesting-0.x branch from ec7d075 to 63956a6 Compare February 19, 2025 17:14
@renovate renovate bot changed the title Update dependency backtesting to v0.6.1 Update dependency backtesting to v0.6.2 Feb 19, 2025
@renovate renovate bot force-pushed the renovate/backtesting-0.x branch from 63956a6 to f5b3da4 Compare March 11, 2025 20:23
@renovate renovate bot changed the title Update dependency backtesting to v0.6.2 Update dependency backtesting to v0.6.3 Mar 11, 2025
@renovate renovate bot force-pushed the renovate/backtesting-0.x branch from f5b3da4 to 781a9fd Compare March 30, 2025 10:49
@renovate renovate bot changed the title Update dependency backtesting to v0.6.3 Update dependency backtesting to v0.6.4 Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants