kernc / kernc/backtesting.py

Optimize method fails w/o any error info

Open
#1,333 2 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Python
Stars
9k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

### Expected behavior

![Image](https://github.com/user-attachments/assets/2076a22e-6299-40ba-a0f5-3a4c00335401)

I try to optimize a set of args, it fails. But it doesn’t show what the error is. A simple backtest runs, so I know that’s fine. I’ve tried printing to console with try/except in init & super. But nothing. Dunno how to tell what exactly the issue is if I don’t get errors

### Code sample

```python

```

### Actual behavior

It just shows a failed bar. Instead of either actually working or showing the error stack

### Additional info, steps to reproduce, full crash traceback, screenshots

_No response_

### Software versions

- `backtesting.__version__`: 0.6.4
- `pandas.__version__`: 2.3.0
- `numpy.__version__`: 2.2.0
- `bokeh.__version__`: 3.7.3
- OS: Sequoia 15.6.1

Contributor guide

Open the contributing guide

Research direction

Start at the optimize entry point and reproduce the failure using the reporter's package versions; the issue provides no runnable code or traceback. Trace how optimization failures are handled and verify that the failed run exposes actionable error information instead of only showing a failed bar.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.