Utilities
This is a list of various utility functions used in PyZipline.
Functions:
Name | Description |
---|---|
convert_datetime_to_str |
Converts a datetime object to a Zipline ( |
convert_str_to_datetime |
Converts a Zipline date string to a datetime object |
convert_datetime_to_str(datetime)
Converts a datetime object to a Zipline (ISO 8601
) date string
Parameters:
Name | Type | Description | Default |
---|---|---|---|
datetime
|
datetime
|
Datetime to convert |
required |
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
Converted date string |
Source code in pyzipline/utils.py
convert_str_to_datetime(date_string)
Converts a Zipline date string to a datetime object
Parameters:
Name | Type | Description | Default |
---|---|---|---|
date_string
|
str
|
String to convert |
required |
Returns:
Name | Type | Description |
---|---|---|
datetime |
datetime
|
Datetime object |