If you use margin (as your algo does, though you may not have intended it), market value and liquidation value will differ. Suppose you have $100 in your account. You buy $200 of stock, using your $100 cash and a $100 margin loan. At this point your net liquidation value is $0 cash - $100 loan + $200 stock = $100. The market value of your positions is $200. So your leverage is $200 / $100 = 2.0.
Then suppose the stock drops 40% to $120. Your net liquidation value is $0 cash - $100 loan + $120 stock = $20. The market value of your positions is $120. So your leverage has tripled to $120 / $20 = 6.0.
Your algo starts buying stocks in October 2005, using order_target_percent. Quantopian calculates the number of shares to buy based on the price at that time and places an order. This number of shares is not adjusted later, even if the order doesn't fill right away and the price changes. Some of the stocks are illiquid, so the orders fill over a period of many weeks, ending in December 2005. By that time some of the prices have risen. So you end up using margin (spending more than 100% of your original cash). Your leverage when you finish all the buys is about 1.4.
Similarly, your 2007 buys take about two months to finish, and after that, your leverage is over 1.6. Your portfolio includes illiquid small-cap stocks. When the market crashes in 2008, those stocks go down hard, and your leverage spikes up.