Skip to content

BUG: Infer units for numeric timestamp indices - #1402

Open
Hei-MaoM wants to merge 1 commit into
kernc:masterfrom
Hei-MaoM:bug-numeric-timestamp-units
Open

BUG: Infer units for numeric timestamp indices#1402
Hei-MaoM wants to merge 1 commit into
kernc:masterfrom
Hei-MaoM:bug-numeric-timestamp-units

Conversation

@Hei-MaoM

@Hei-MaoM Hei-MaoM commented Sep 1, 2026

Copy link
Copy Markdown

Addresses item 10 in #1318.

Summary

  • infer whether numeric Unix timestamp indices use seconds, milliseconds, microseconds, or nanoseconds
  • replace the removed Index.is_numeric() call with the supported dtype API
  • add regression coverage for all four timestamp resolutions

Testing

  • python -m backtesting.test — 82 tests passed, 1 skipped
  • flake8 backtesting setup.py — passed
  • mypy --no-warn-unused-ignores --follow-imports=skip backtesting/backtesting.py backtesting/test/_test.py — passed

The full-package mypy check retains two pre-existing Bokeh typing errors in backtesting/_plotting.py, unchanged from master.

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.

1 participant