I am kind of new to this, so perhaps I am just missing something fairly obvious, but I have developed an algorithm that works well enough for now. There isn't too much to it, so I don't feel like anything is happening that I don't understand, but when I am doing my Backtesting, I encounter these stocks that make the algo do absolutely crazy things like buy just insane amounts of this stock (making my cash go negative) and pushing my returns to positive and negative thousands (sometimes tens of thousands of percents.) My algo works for nearly all of the stocks that get put into it, buy/selling appropriately, but when it encounters these stocks, the entire thing gets crazy. The only thing that I can think of is that, somehow, these troublesome stocks' data is corrupted in some way or another so when they come up, they do all this unexpected business. Is this a problem that anyone else has encountered? And, if so, how did you manage your way around it?
I have a large filter in pipeline to get rid of many weird things (as demonstrated in the tutorial) and I use can_trade, and once I go through and pick all of them out by hand (Equity != sid(40009)), things run smoothly, but there just seems to be sooo many of these.
Any help would be greatly appreciated!