OPBT SDK · 05
Scheduling & records
On this page
05
Scheduling & records
schedule#
ctx.schedule(fn, every='8h', offset='0m')
Register a recurring task in initialize. Funding strategies often use an offset to avoid the settlement instant.
python
def initialize(self, ctx):
ctx.schedule(self.rebalance, every="8h", offset="5m")
ctx.schedule(self.daily_report, every="1d")record & log#
ctx.record(key=value, ...)
Record finite scalar series. Backtest, Paper and Live dashboards use the same custom-series meaning; non-finite values are ignored with a warning.
ctx.log.info / .warning / .error(msg, *args)
Written to the run log, visible live in the “Logs” tab.