Add docstring to store_backtest_stats
This commit is contained in:
parent
4eb17b4daf
commit
668d167adc
@ -16,7 +16,13 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
def store_backtest_stats(recordfilename: Path, stats: Dict[str, DataFrame]) -> None:
|
def store_backtest_stats(recordfilename: Path, stats: Dict[str, DataFrame]) -> None:
|
||||||
|
"""
|
||||||
|
Stores backtest results
|
||||||
|
:param recordfilename: Path object, which can either be a filename or a directory.
|
||||||
|
Filenames will be appended with a timestamp right before the suffix
|
||||||
|
while for diectories, <directory>/backtest-result-<datetime>.json will be used as filename
|
||||||
|
:param stats: Dataframe containing the backtesting statistics
|
||||||
|
"""
|
||||||
if recordfilename.is_dir():
|
if recordfilename.is_dir():
|
||||||
filename = (recordfilename /
|
filename = (recordfilename /
|
||||||
f'backtest-result-{datetime.now().strftime("%Y-%m-%d_%H-%M-%S")}.json')
|
f'backtest-result-{datetime.now().strftime("%Y-%m-%d_%H-%M-%S")}.json')
|
||||||
|
Loading…
Reference in New Issue
Block a user