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


  • How does backtrader manage stocks which have delisted (i.e. their data stops at a specific point in time in the past). Does it assume zero return? or take the last value of trading as the completion of trading and return?

    If not, how should I manage these stops? fill all data forward (so that its final price is the same every day into the future?


  • @cwse I am not an author, but based on the bt description - doesn't manage at all, which is usual for back testing and trading software. Such events are managed by data providers or by trader's database.

    If the stock is delisted, than the price is 0.

  • administrators

    Easy. If not data comes in, no data is delivered.

Log in to reply