5min data from yahoo
I'm currently trying to create a trading-strategy using 5-min data formatting as below in a CSV file downloaded from Yahoo:
However when I feed the data the output when running the script is:
I'm aware that a similar question have been asked on other posts, but none of the solutions provided in the other posts have solved the issue.
The code for my datafeed is as follows:
data = bt.feeds.YahooFinanceCSVData( dataname='/Users/anderslindstrom/Python/quant_1.1/algo_trader/pullback_strategy/dax_5min.csv', timeframe=bt.TimeFrame.Minutes, dtformat='%Y-%m-%d %H:%M:%S', compression=1 reverse=True)
Would really appreciate any suggestions and help! :D
This happens to every datetime??
I always use bt.feeds.PandasData , it can work on yfinance downloads as well.
@borutf WOW! Using feeds.PandasData worked, thank you so much! :D