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

what is the function of timeframe=bt.TimeFrame.Months in feeds?

  • Dear all, I am wondering the timeframe setting in the following code. I use daily bar to test, it seems no difference between setting Months and Days. According to my understanding, backtrader uses bars to compute indicators without time concept, so it is nonrelevent to set timeframe. Could you correct me?

    data = bt.feeds.GenericCSVData(

  • bt requires to set correct time frame to have correct results of the backtest. This is written in the docs. There is nothing to discuss here or correct somebody.

Log in to reply