In this recipe, you will perform backtesting on the MACD-Bracket-Order strategy. You must have fetched this strategy from your account on the AlgoBulls platform in the previous recipe of this chapter. You will leverage the backtesting functionality facilitated by pyalgotrading for this recipe, which, in turn, submits a backtesting job on the AlgoBulls platform.
Once submitted, backtesting will be run by the AlgoBulls backtesting engine. You can query the status at any time to find out the state of the backtesting job. The job goes through the following states, in the given order:
- STARTING (Intermediate state)
- STARTED (Stable state)
- STOPPING (Intermediate state)
- STOPPED (Stable state)
On submitting a job, it starts with an intermediate state, 'STARTING'. In this state, the AlgoBulls backtesting engine fetches the strategy and get the execution environment ready, which may take a couple of minutes. Once done,...