mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-15 11:22:18 +08:00
Merge branch 'develop' of github.com:enigmampc/catalyst into develop
This commit is contained in:
@@ -675,6 +675,7 @@ class ExchangeTradingAlgorithmLive(ExchangeTradingAlgorithmBase):
|
||||
except Exception as e:
|
||||
log.warn('unable to calculate performance: {}'.format(e))
|
||||
|
||||
# Writing the stats output
|
||||
csv_bytes = None
|
||||
try:
|
||||
csv_bytes = stats_to_algo_folder(
|
||||
|
||||
@@ -336,6 +336,20 @@ def stats_to_s3(uri, stats, algo_namespace, recorded_cols=None,
|
||||
|
||||
|
||||
def stats_to_algo_folder(stats, algo_namespace, recorded_cols=None):
|
||||
"""
|
||||
Saves the performance stats to the algo local folder.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
stats: list[Object]
|
||||
algo_namespace: str
|
||||
recorded_cols: list[str]
|
||||
|
||||
Returns
|
||||
-------
|
||||
str
|
||||
|
||||
"""
|
||||
bytes_to_write = get_csv_stats(stats, recorded_cols=recorded_cols)
|
||||
|
||||
timestr = time.strftime('%Y%m%d')
|
||||
|
||||
Reference in New Issue
Block a user