For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

Understanding Codebase of Backtrader and its internal working

  • I am looking to contribute to backtrader project but having a hard time understanding the code base. The most complicated part is the run() function of Cerebro, which in turn calls runstrategies() which in turn calls a bunch of other functions like _runonce(), _runnext() etc.

    Can anyone give me a high level view of the way run() executes and where does the actual backtest run with datafeed and clue me into how to understand the large code base?

    Will appreciate any help.