California only has a surplus if one ignores the state's massive pension obligations, which are not getting smaller:
http://www.newgeography.com/content/006159-california-doesn-t-have-a-budget-surplus
When pension obligations are taken into account, Kansas outranks California for fiscal integrity. And a large reason for California's surplus is a healthy stock market. California's state income tax is very heavily dependent on top earners in general, and income from stock dividends and capital gains (including capital gains generated by the sale of homes), in particular.
https://californiapolicycenter.org/californias-budget-surplus-ignores-crushing-debt-burden/
To illustrate just how unusually swollen California’s current state tax revenues have gotten, compare state tax collections in FYE 6/30/2017 (our most recent available data) to seven years earlier, in 2010. Back in 2010, California was in the grip of the great recession. Total state tax revenue was $94 billion, and $44 billion of that was from personal income taxes. Skip to FYE 6/30/2017, and total state tax revenue was $148 billion, and $86 billion was from personal income taxes. This means that 80 percent of the increase in state tax revenue over the seven years through 6/30/2017 was represented by the increase is collections from individual taxpayers, which doubled.
It isn’t hard to figure out why this happened. Between 2010 and 2017 the tech heavy NASDAQ tripled in value, from 2,092 to 6,153. In that same period, Silicon Valley’s big three tech stocks all quadrupled. Adjusting for splits, Apple shares went from $35 to $144, Facebook opened in May 2012 at $38, and went up to $150, Google moved from $216 to $908.
While California’s tech industry was booming over the past decade, California real estate boomed in parallel. In June 2010 the median home price in California was $335,000; by June 2017 it had jumped to $502,000. Along the California coast, median home prices have gone much higher. Santa Clara County now has a median home price of $1.3 million, double what it was less than a decade ago.
As people sell their overpriced homes to move inland or out-of-state, and as tech workers cash out their burgeoning stock options, hundreds of billions of capital gains generate tens of billions in state tax revenue. But can homes continue to double in value every six or seven years? Can tech stocks continue to quadruple in value every six or seven years? Apparently Gavin Newsom thinks they can. Reality may beg to differ.