time#

tradingstrategy.utils.time Python module in Trading Strategy framework.

Module description#

Helpers to timestamp format and value conformity.

  • We are operating on naive Python datetimes, all in UTC timezone

Functions#

assert_compatible_timestamp(ts)

Check we do not get in bad input timestamps.

is_compatible_timestamp(ts)

Ensure Pandas Timestamp is naive.

to_int_unix_timestamp(dt)

Get datetime as UTC seconds since epoch.