I fixed it. Most likely, the error was in a bad strategy and in the fact that the date was presented as an index.