time#
API documentation for tradingstrategy.utils.time Python module in Trading Strategy.
Module description#
Helpers to timestamp format and value conformity.
We are operating on naive Python datetimes, all in UTC timezone
Functions#
Check we do not get in bad input timestamps. |
|
|
Get last day of the month at 23:59:59.999999 |
|
Get first day of the month at 00:00:00 |
Round Pandas timestamp to a start of a month. |
|
Round Pandas timestamp to a start of a week. |
|
|
Parse ISO format string to naive UTC datetime. |
|
Generate timestamps from the start to the end. |
|
Get the first timestamp in the index that is before the given timestamp. |
Ensure Pandas Timestamp is naive. |
|
|
Get naive UTC datetime from UNIX time. |
Get utcnow() but without timezone information. |
|
Get datetime as UTC seconds since epoch. |
|
|
Convert naive UTC datetime to ISO format string. |
Convert Python UTC datetime to UNIX seconds since epoch. |