It is an (insidious) "Build Error" reported as a runtime exception. The issue is that the backtester performs kind of pseudo-run of the code and it can trigger errors (but logging is suppressed, so de-bugging a "Build Error" can be tricky).
Here's a fix. If cash goes to zero, there will be a problem with:
buy =(context.portfolio.cash * .025)/price
buys =(context.portfolio.cash * .025)/sp
The algebraic equivalent works:
go = sp/price
By the way, looking at the performance of the algo, this appears to be another manifestation of "avoid the 2008-2009 disaster" but it doesn't appear to be viable going forward (unless, of course, we have another similar disaster).