Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Exceptions

One of the design goals was to quit as early as possible and let the users havefull transparency of what was happening with errors. With the goal to forceoneself to have code that would break on exceptions and forced revisiting theaffected part.

But the time has come and some exceptions may slowly get added to the platform.

Hierarchy

The base class for all exceptions isBacktraderError (which is a directsubclass ofException)

Location

  1. Inside the moduleerrors which can be reached as in for example:

    importbacktraderasbtclassStrategy(bt.Strategy):def__init__(self):ifsomething_goes_wrong():raisebt.errors.StrategySkipError
  2. Directly frombacktrader as in:

    importbacktraderasbtclassStrategy(bt.Strategy):def__init__(self):ifsomething_goes_wrong():raisebt.StrategySkipError

Exceptions

StrategySkipError

Requests the platform to skip this strategy for backtesting. To be raisedduring the initialization (__init__) phase of the instance


[8]ページ先頭

©2009-2025 Movatter.jp