A good year on Wall Street is good news for California's treasury. And, as anyone who with mutual funds or a 401(k) account can tell you, 2013 was a very good year for investors.

In turn, 2014 is shaping up nicely for Gov. Jerry Brown, who delivered something for almost everyone in his budget for the coming fiscal year.

Brown's $155 billion spending plan, unveiled Thursday, benefits from robust growth in tax revenue, most notably capital gains taxes, which have tripled since 2010. Operating from a position of fiscal strength, he is proposing an 8 percent increase in general fund spending while still projecting a year-end surplus of $1.9 billion.

With fellow Democrats eager to restore programs cut during the recession, Brown offered a $4 billion boost for K-12 education, which would raise per-pupil spending to $12,833. At UC and CSU, tuition would be unchanged for a second year.

Medi-Cal would get a $670 million increase for expanded mental health, substance abuse and adult dental services for the poor. Brown also wants to make an $815 million downpayment on deferred maintenance for parks, schools, roads and other crumbling facilities.

Republicans have little influence in Sacramento, where Democratic supermajorities control the Legislature. The governor nevertheless addressed a major GOP concern in his budget -#8212; the state's wall of debt.

In the fiscal year that begins July 1, Brown proposes to pay off $11 billion. By 2018, he wants to retire $34.7 billion in debt to local government and bondholders, most of it accumulated during the recession.

Brown also wants to funnel $1.6 billion into a rain-day fund for state programs and to expand a separate reserve fund for public schools.

Brown, of course, isn't the first governor to champion a rainy-day fund. But the temptations of spending more and taxing less -#8212; often in combinations that exceeded any surplus -#8212; have proven too strong. We hope this time will be different.

This budget reflects economic strength in parts of California, including the Bay Area. It's also a product of temporary tax increases that begin to expire in 2016 and a capital gains windfall that could end anytime.

To extend the recovery to struggling inland and North Coast regions will require investments in education and infrastructure. But the state's volatile tax system and recent history must not be ignored.

California relies heavily on income taxes; they account for about two-thirds of the 2014-15 budget. Because of the progressive tax structure, this is a volatile source of revenue, driven largely by capital gains. They're rising now, but twice since 2000, revenue plunged 40 percent in two years following sharp reversals on Wall Street.

Even if the market keeps climbing, California faces $217 billion in unfunded pension and retiree health liabilities. Other debts include $8.8 billion owed to the federal government for bailing out the state's unemployment insurance program.

In the nearer term, as the governor acknowledged Thursday, the state could face higher prison costs unless a panel of federal judges postpones the deadline for reducing the inmate population.

As he manages the state's windfall, its unmet needs and its looming challenges, Brown should heed his own words from Thursday's budget announcement: "Wisdom and prudence is the order of the day."