You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an option to StrategyOptions to which logs should be written.
Motivation
If we do anything more complicated than running from command-line, the console printing doesn't make much sense. Also, there is a performance hit when we run make calls to the console, whereas writing logs to a file is much less expensive.
Implementation
Add option to StrategyOptions called logfilepath.
Add an if-else block to log that will decide how to output the statement, given the attribute in strat.options.logfilepath, then perform the desired output action.
Side thoughts
It will be worthwhile to check how costly this operation is in practice. If it severely slows down the backtest, we can add logic to batch-write the logging messages (either when the backlog gets to a certain size, or when the backtest is finished running). 😸
The text was updated successfully, but these errors were encountered:
File Logging
Interface-changing Proposal
Add an option to
StrategyOptions
to which logs should be written.Motivation
If we do anything more complicated than running from command-line, the console printing doesn't make much sense. Also, there is a performance hit when we run make calls to the console, whereas writing logs to a file is much less expensive.
Implementation
StrategyOptions
calledlogfilepath
.if-else
block tolog
that will decide how to output the statement, given the attribute instrat.options.logfilepath
, then perform the desired output action.Side thoughts
It will be worthwhile to check how costly this operation is in practice. If it severely slows down the backtest, we can add logic to batch-write the logging messages (either when the backlog gets to a certain size, or when the backtest is finished running). 😸
The text was updated successfully, but these errors were encountered: