Welcome to TiddlyWiki created by Jeremy Ruston; Copyright © 2004-2007 Jeremy Ruston, Copyright © 2007-2011 UnaMesa Association
How did Paul Krugman get it so Wrong?
John H. Cochrane[1]
@@Many friends and colleagues have asked me what I think of Paul Krugman’s New York Times Magazine article, “How did Economists get it so wrong?”
Most of all, it’s sad. Imagine this weren’t economics for a moment. Imagine this were a respected scientist turned popular writer, who says, most basically, that everything everyone has done in his field since the mid 1960s is a complete waste of time. Everything that fills its academic journals, is taught in its ~PhD programs, presented at its conferences, summarized in its graduate textbooks, and rewarded with the accolades a profession can bestow, including multiple Nobel prizes, is totally wrong. Instead, he calls for a return to the eternal verities of a rather convoluted book written in the 1930s, as taught to our author in his undergraduate introductory courses.@@ If a scientist, he might be a global-warming skeptic, an ~AIDS-HIV disbeliever, a stalwart that maybe continents don’t move after all, or that smoking isn’t that bad for you really.
It gets worse. Krugman hints at dark conspiracies, claiming “dissenters are marginalized.” Most of the article is just a calumnious personal attack on an ever-growing enemies list, which now includes “new Keyenesians” such as Olivier Blanchard and Greg Mankiw. Rather than source professional writing, he plays gotcha with out-of-context second-hand quotes from media interviews. He makes stuff up, boldly putting words in people’s mouths that run contrary to their written opinions. Even this isn’t enough: he adds cartoons to try to make his “enemies” look silly, and puts them in false and embarrassing situations. He accuses us literally of adopting ideas for pay, selling out for “sabbaticals at the Hoover institution” and fat “Wall street paychecks.” It sounds a bit paranoid.
It’s annoying to the victims, but we’re big boys and girls. It’s a disservice to New York Times readers. They depend on Krugman to read real academic literature and digest it, and they get this schlock instead. And it’s ineffective. Any astute reader knows that personal attacks and innuendo mean the author has run out of ideas.
And that’s the biggest and saddest news of this piece: Paul Krugman has no interesting ideas whatsoever about what caused our current financial and economic problems, what policies might have prevented it, or what might help us in the future, and he has no contact with people who do. “Irrationality” and “spend like a drunken sailor” are pretty superficial compared to all the fascinating things economists are writing about it these days.
What do I think? How sad.
That’s what I think, but I don’t expect you the reader to be convinced by my opinion or my reference to professional consensus. Maybe he is right. Occasionally sciences, especially social sciences, do take a wrong turn for a decade or two. I thought Keynesian economics was such a wrong turn. So let’s take a quick look at the ideas.
Krugman’s attack has two goals. First, he thinks financial markets are “inefficient,” fundamentally due to “irrational” investors, and thus prey to excessive volatility which needs government control. Second, he likes the huge “fiscal stimulus” provided by multi-trillion dollar deficits.
Efficiency.
It’s fun to say we didn’t see the crisis coming, but the central empirical prediction of the efficient markets hypothesis is precisely that nobody can tell where markets are going – neither benevolent government bureaucrats, nor crafty hedge-fund managers, nor ivory-tower academics. This is probably the best-tested proposition in all the social sciences. Krugman knows this, so all he can do is huff and puff about his dislike for a theory whose central prediction is that nobody can be a reliable soothsayer.
@@Krugman writes as if the volatility of stock prices alone disproves market efficiency, and efficient marketers just ignored it all these years. This is a canard that Paul knows better than to pass on, no matter how rhetorically convenient. (I can overlook his mixing up the CAPM and ~Black-Scholes model, but not this.) There is nothing about “efficiency” that promises “stability.” “Stable” growth would in fact be a major violation of efficiency. Efficient markets did not need to wait for “the memory of 1929 … gradually receding,” nor did we fail to read the newspapers in 1987. Data from the great depression has been included in practically all the tests. In fact, the great “equity premium puzzle” is that if efficient, stock markets don’t seem risky enough to deter more people from investing! Gene Fama’s ~PhD thesis was on “fat tails” in stock returns.@@
It is true and very well documented that asset prices move more than reasonable expectations of future cashflows. This might be because people are prey to bursts of irrational optimism and pessimism. It might also be because people’s willingness to take on risk varies over time, and is sharply lower in bad economic times. As Gene Fama pointed out in 1972, these are observationally equivalent explanations at the superficial level of staring at prices and writing magazine articles and opeds. Unless you are willing to elaborate your theory to the point that it can quantitatively describe how much and when risk premiums, or waves of “optimism” and “pessimism,” can vary, you know nothing. No theory is particularly good at that right now. Crying “bubble” is no good unless you have an operational procedure for identifying bubbles, distinguishing them from rationally low risk premiums, and not crying wolf too many years in a row.
But this difficulty is really no surprise. It’s also the central prediction of free-market economics, as crystallized by Hayek, that no academic, bureaucrat or regulator will ever be able to fully explain market price movements. Nobody knows what “fundamental” or “hold to maturity value” is. If anyone could tell what the price of tomatoes should be, let alone the price of Microsoft stock, communism would have worked.
More deeply, the economist’s job is not to “explain” market fluctuations after the fact, to give a pleasant story on the evening news about why markets went up or down. Markets up? “A wave of positive sentiment.” Markets went down? “Irrational pessimism.” (And “the risk premium must have increased” is just as empty.) Our ancestors could do that. Really, is that an improvement on “Zeus had a fight with Apollo?” Good serious behavioral economists know this, and they are circumspect in their explanatory claims so far.
But this argument takes us away from the main point. The case for free markets never was that markets are perfect. The case for free markets is that government control of markets, especially asset markets, has always been much worse. Free markets are the worst system ever devised – except for all of the others.
Krugman at bottom is arguing that the government should massively intervene in financial markets, and take charge of the allocation of capital. He can’t quite come out and say this, but he does say “Keynes considered it a very bad idea to let such markets…dictate important business decisions,” and “finance economists believed that we should put the capital development of the nation in the hands of what Keynes had called a `casino.’” Well, if markets can’t be trusted to allocate capital, we don’t have to connect too many dots to imagine who Paul has in mind.
To reach this conclusion, you need theory, evidence, experience, or any realistic hope that the alternative will be better. Remember, the SEC couldn’t even find Bernie Madoff when he was handed to them on a silver platter. Think of the great job Fannie, Freddie, and Congress did in the mortgage market. Is this system going to regulate Citigroup, guide financial markets to the right price, replace the stock market, and tell our society which new products are worth investment? As David Wessel’s excellent In Fed We Trust makes perfectly clear, government regulators failed just as abysmally as private investors and economists to see the storm coming. And not from any lack of smarts.
In fact, the behavioral view gives us a new and stronger argument against regulation and control. Regulators are just as human and irrational as market participants. If bankers are, in Krugman’s words, “idiots,” then so must be the typical treasury secretary, fed chairman, and regulatory staff. They act alone or in committees, where behavioral biases are much better documented than in market settings. They are still easily captured by industries, and face horrendously distorted incentives.
Careful behavioralists know this, and do not quickly run from “the market got it wrong” to “the government can put it all right.” Even my most behavioral colleagues Richard Thaler and Cass Sunstein in their book “Nudge” go only so far as a light libertarian paternalism, suggesting good default options on our 401(k) accounts. (And even here they’re not very clear on how the Federal Nudging Agency is going to steer clear of industry capture.) They don’t even think of jumping from irrational markets, which they believe in deeply, to Federal control of stock and house prices and allocation of capital.
Stimulus
Most of all, Krugman likes fiscal stimulus. In this quest, he accuses us and the rest of the economics profession of “mistaking beauty for truth.” He’s not that clear on what the “beauty” is that we all fell in love with, and why one should shun it. And for good reason. The first siren of beauty is simple logical consistency. Paul’s Keynesian economics requires that people make plans to consume more, invest more, and pay more taxes with the same income. The second siren is even vaguely plausible assumptions about how people behave. Keynesian economics requires that the government is able to systematically fool people again and again. It presumes that people don’t think about the future in making decisions today. Logical consistency and vaguely plausible foundations are indeed “beautiful” but to me they are also basic preconditions for “truth.”
In economics, stimulus spending ran aground on Robert Barro’s Ricardian equivalence theorem. This theorem says that debt-financed spending can’t have any effect because people, seeing the higher future taxes that must pay off the debt, will simply save more. They will buy the new government debt and leave all spending decisions unaltered. Is this theorem true? It’s a logical connection from a set of “if” to a set of “therefore.” Not even Paul can object to the connection.
Therefore, we have to examine the “ifs.” And those ifs are, as usual, obviously not true. For example, the theorem presumes lump-sum taxes, not proportional income taxes. Alas, when you take this into account we are all made poorer by deficit spending, so the multiplier is most likely negative. The theorem (like most Keynesian economics) ignores the composition of output; but surely spending money on roads rather than cars can affect the overall level.
Economists have spent a generation tossing and turning the Ricardian equivalence theorem, and assessing the likely effects of fiscal stimulus in its light, generalizing the “ifs” and figuring out the likely “therefores.” This is exactly the right way to do things. The impact of Ricardian equivalence is not that this simple abstract benchmark is literally true. The impact is that in its wake, if you want to understand the effects of government spending, you have to specify why it is false. Doing so does not lead you anywhere near old-fashioned Keynesian economics. It leads you to consider distorting taxes, estate taxes, how much people care about their children, how many people would like to borrow more to finance today’s consumption and so on. And when you find “market failures” that might justify a multiplier, that analysis quickly suggests direct fixes for the market failures, not their exploitation along the lines Keynes suggested. Most “New Keynesian” analysis that add frictions don’t produce big multipliers.
This is how real thinking about stimulus actually proceeds. Nobody ever “asserted that an increase in government spending cannot, under any circumstances, increase employment.” This is unsupportable by any serious review of professional writings, and Krugman knows it. (My own are perfectly clear on lots of possibilities for an answer that is not zero.) But thinking through this sort of thing and explaining it is so much harder than just tarring your enemies with out-of-context quotes, ethical innuendo, or silly cartoons.
In fact, I propose that Krugman himself doesn’t really believe the Keynesian logic for that stimulus. I doubt he would follow that logic to its inevitable conclusions. Stimulus must have some other attraction to him.
If you believe the Keynesian argument for stimulus, you should think Bernie Madoff is a hero. Seriously. He took money from people who were saving it, and gave it to people who most assuredly were going to spend it. Each dollar so transferred, in Krugman’s world, generates an additional dollar and a half of national income. The analogy is even closer. Madoff didn’t just take money from his savers, he really borrowed it from them, giving them phony accounts with promises of great profits to come. This looks a lot like government debt.
If you believe the Keynesian argument for stimulus, you don’t care how the money is spent. All this puffery about “infrastructure,” monitoring, wise investment, jobs “created” and so on is pointless. Keynes thought the government should pay people to dig ditches and fill them up.
If believe in Keynesian stimulus, you don’t even care if the government spending money is stolen. Actually, that would be better. Thieves have notoriously high propensities to consume.
The crash.
Krugman’s article is supposedly about how the crash and recession changed our thinking, and what economics has to say about it. The most amazing piece of news in the whole article is that Paul Krugman has absolutely no idea about what caused the crash, what policies might have prevented it, and what policies we should adopt going forward. Furthermore, he seems completely unaware of the large body of work by economists who actually do know something about the banking and financial system, and have been thinking about it productively for a generation.
Here’s all he has to say: “Irrationality” caused markets to go up and then down. “Spending” then declined, for unclear reasons, possibly “irrational” as well. The sum total of his policy recommendations is for the Federal Government to spend like a drunken sailor after the fact.
Paul, there was a financial crisis, a classic near-run on banks. The centerpiece of our crash was not the relatively free stock or real estate markets, it was the highly regulated commercial banks. A generation of economists has thought really hard about these kinds of events. Look up Diamond, Rajan, Gorton, Kashyap, Stein, and so on. They’ve thought about why there is so much short term debt, why banks run, how deposit insurance and credit guarantees help, but how they give incentives for excessive risk taking.
If we want to think about events and policies, this seems like more than a minor detail. The hard and central policy debate over the last year was how to manage this financial crisis. Now it is how to set up the incentives of banks and other financial institutions so this mess doesn’t happen again. There’s lots of good and subtle economics here that New York Times readers might like to know about. What does Krugman have to say? Zero.
Krugman doesn’t even have anything to say about the Fed. Ben Bernanke did a lot more last year than set the funds rate to zero and then go off on vacation and wait for fiscal policy to do its magic. Leaving aside the string of bailouts, the Fed started term lending to securities dealers. Then, rather than buy treasuries in exchange for reserves, it essentially sold treasuries in exchange for private debt. Though the funds rate was near zero, the Fed noticed huge commercial paper and securitized debt spreads, and intervened in those markets. There is no “the” interest rate anymore, the Fed is managing them all. Recently the Fed has started buying massive quantities of mortgage-backed securities and long-term treasury debt.
Monetary policy now has little to do with “money” vs. “bonds” with all the latter lumped together. Monetary policy has become financial policy. Does any of this work? What are the dangers? Can the Fed stay independent in this new role? These are the questions of our time. What does Krugman have to say? Nothing.
Or perhaps Krugman’s point is that a cabal of obvious crackpots bedazzled all of macroeconomics with the beauty of their mathematics, to the point of inducing policy paralysis. Alas, that won’t stick. The sad fact is that few in Washington pay the slightest attention to neo-classical or intertemporal ideas. Paul’s simple Keynesianism has dominated policy analysis for decades and continues to do so. From the CEA to the Fed to the OMB and CBO, everyone just adds up consumer, investment and government “demand” to forecast output and uses simple Phillips curves to think about inflation. If a failure of ideas caused bad policy, it’s Keynes’ ideas that failed.
The future of economics.
How should economics change? Krugman argues for three incompatible changes.
@@First, Krugman argues for a future of economics that “recognizes flaws and frictions,” and incorporates alternative assumptions about behavior, especially towards risk-taking. To which I say, “Hello, Paul, where have you been for the last 30 years?” Macroeconomists have not spent 30 years admiring the eternal verities of Kydland and Prescott’s 1982 paper. Pretty much all we have been doing for 30 years is introducing flaws, frictions and new behaviors, especially new models of attitudes to risk, and comparing the resulting models, quantitatively, to data. The long literature on financial crises and banking which Krugman does not mention has been doing exactly this bidding for the same time.@@
Second, Krugman argues that “a more or less Keynesian view is the only plausible game in town,” and “Keynesian economics remains the best framework we have for making sense of recessions and depressions.” One thing is pretty clear by now, that when economics incorporates flaws and frictions, the result will not be to rehabilitate an 80-year-old book. As Paul bemoans, the “new Keynesians” who did just what he asks, putting Keynes inspired price-stickiness into logically coherent models, ended up with something that looked a lot more like monetarism. (Actually, though this is the consensus, my own work finds that new-Keynesian economics ended up with something much different and more radical than monetarism.) A science that moves forward almost never ends up back where it started. Einstein revises Newton, but does not send you back to Aristotle. At best you can play the fun game of hunting for inspirational quotes, but that doesn’t mean much.
Third, and most surprising, is Krugman’s Luddite attack on mathematics; “economists as a group, mistook beauty, clad in impressive-looking mathematics, for truth.” Models are “gussied up with fancy equations.” I’m old enough to remember when Krugman was young, working out the interactions of game theory and increasing returns in international trade, and the old guard tut-tutted “nice recreational mathematics, but not real-world at all.” How quickly time passes.
Again, what is the alternative? Does Krugman really think we can make progress on his – and my – agenda for economic and financial research — understanding frictions, imperfect markets, complex human behavior, institutional rigidities – by reverting to a literary style of exposition, and abandoning the attempt to compare theories quantitatively against data? Against the worldwide tide of quantification in all fields of human endeavor (read “Moneyball”) is there any real hope that this will work in economics?
No, the problem is that we don’t have enough math. Math in economics serves to keep the logic straight, to make sure that the “then” really does follow the “if,” which it so frequently does not if you just write prose. The challenge is how hard it is to write down explicit artificial economies with these ingredients, actually solve them, in order to see what makes them tick. Frictions are just bloody hard with the mathematical tools we have now.
The insults.
The level of personal attack in this article, and fudging of the facts to achieve it, is simply amazing.
As one little example (ok, I’m a bit sensitive), take my quotation about carpenters in Nevada. I didn’t write this. It’s a quote, taken out of context, from a bloomberg.com article written by a rather dense reporter who I spent about 10 hours with patiently trying to explain some basics. (It’s the last time I’ll do that!) I was trying to explain how sectoral shifts contribute to unemployment. Krugman follows it by a lie — I never asserted that “it take mass unemployment across the whole nation to get carpenters to move out of Nevada.” You can’t even dredge up a quote for that monstrosity.
What’s the point? I don’t think Paul disagrees that sectoral shifts result in some unemployment, so the quote actually makes sense as economics. The only point is to make me, personally, seem heartless — a pure, personal, calumnious attack, having nothing to do with economics.
Bob Lucas has written extensively on Keynesian and monetarist economics, sensibly and even-handedly. Krugman chooses to quote a joke, made back in 1980 at a lunch talk to some business school alumni. Really, this is on the level of the picture of Barack Obama with Bill Ayres that Sean Hannity likes to show on Fox News.
It goes on. Krugman asserts that I and others “believe” “that an increase in government spending cannot, under any circumstances, increase employment,” or that we “argued that price fluctuations and shocks to demand actually had nothing to do with the business cycle.” These are just gross distortions, unsupported by any documentation, let alone professional writing. And Krugman knows better. All economic models are simplified to exhibit one point; we all understand the real world is more complicated; and his job is supposed to be to explain that to lay readers. It would be no different than if we were to look up Paul’s early work which assumed away transport costs and claim “Paul Krugman believes ocean shipping is free, how stupid” in the Wall Street Journal.
Of course the idea that any of us do what we do because we’re paid off by fancy Wall Street salaries or cushy sabbaticals at Hoover is just ridiculous. (If Krugman knew anything about hedge funds he’d know that believing in efficient markets disqualifies you for employment. Nobody wants a guy who thinks you can’t make any money trading!) And given Krugman’s speaking fees and how much the looney right likes him, it’s a surprising first stone for him to cast.
Apparently, salacious prose, ethical innuendo, calumny, and selective quotation from media aren’t enough: Krugman added cartoons to try to make opponents look silly. The Lucas-Blanchard-Bernanke conspiratorial cocktail party celebrating the end of recessions is a fiction. So is their despondent gloom on reading “recession” in the paper. Nobody at a conference looks like Dr. Pangloss with wild hair and a suit from the 1800s. (OK, Randy Wright has the hair, but not the suit.) Keynes did not reappear at the NBER to be booed as an “outsider.” Why are you allowed to make things up in pictures that wouldn’t pass even the Times’ weak fact-checking in words?
Well, perhaps we got off easy. This all was mild compared to Krugman’s vicious obituary of Milton Friedman in the New York Review of Books. But most of all, Paul isn’t doing his job. He’s supposed to read, explain, and criticize things economists write, and preferably real professional writing, not interviews, opeds and blog posts. At a minimum, this leads to the unavoidable conclusion that Krugman simply isn’t reading real economics anymore. Well, the equations are hard. But most of all, who cares about Paul’s character assassination attempts of us boring and politically unimportant academics?
How did Krugman get it so wrong?
So what is Krugman up to? Why become a denier, a skeptic, an apologist for 70 year old ideas, replete with well-known logical fallacies, a pariah? Why publish an essentially personal attack on an ever-growing enemies list that now includes practically every professional economist? Why publish an incoherent vision for the future of economics?
The only explanation that makes sense to me is that Krugman isn’t trying to be an economist, he is trying to be a partisan, political opinion writer. This is not an insult. I read George Will, Charles Krauthnammer and Frank Rich with equal pleasure even when I disagree with them. Krugman wants to be Rush Limbaugh of the Left. I still want to be Milton Friedman, but each is a worthy calling.
Alas, to Krugman, as to far too many ex-economists in partisan debates, economics is not a quest for understanding. It is a set of debating points to argue for policies that one has adopted for partisan political purposes. “Stimulus” is just marketing with which to sell voters on a package of government spending priorities that you want for political reasons. It’s not a proposition to be explained, understood, taken seriously to its logical limits, or reflective of market failures that should be addressed directly. To my mind, Krugman left the world of economics when, in the California electricity crisis, he argued that supply curves slope down; that a price cap, desired by his political constituency, would increase electricity supplies. That position served the political goal no matter how tortured the economics. This is more of the same.
Why argue for a nonsensical future for economics? Well, again, if you don’t regard economics as a science, a discipline that ought to result in quantitative matches to data, a discipline that requires crystal-clear logical connections between the “if” and the “then,” if the point of economics is merely to provide marketing and propaganda for politically-motivated policy, then it all does make sense. It makes sense to appeal to some future economics – not yet worked out, even verbally –disdain quantification and comparison to data, and to appeal to the authority of ancient books as interpreted you, their lone remaining apostle.
Most of all, this is the only reason I can come up with to understand why Krugman wants to write personal attacks on those who disagree with him. I like it when people disagree with me, and take time to read my work and criticize it. At worst I learn how to position it better. At best, I discover I was wrong and learn something. I send a polite thank you note.
Krugman wants people to swallow his arguments whole from his authority, without demanding logic, or evidence. Those who disagree with him, alas, are pretty smart and have pretty good arguments if you bother to read them. So, he tries to discredit them with personal attacks.
This is the political sphere, not the intellectual one. Don’t argue with them, swift-boat them. Find some embarrassing quote from an old interview. Well, good luck, Paul. Let’s just not pretend this has anything to do with economics, or actual truth about how the world works or could be made a better place.
[1] University of Chicago Booth School of Business. Many colleagues and friends helped, but I don’t want to name them for obvious reasons. Please don’t bother emailing me to tell me what a jerk I am.
!General
#[[Weekly Calendar|https://wallstreetcn.com/calendar]]
#[[中国月度数据|http://data.eastmoney.com/cjsj/xfp.html]]
#[[US Economic Statistics Monthly|https://home.treasury.gov/system/files/226/monthly_ECONOMIC_DATA_TABLES.PDF]]
#[[Federal Reserve Beige Book (8 Publications/Year)|https://www.federalreserve.gov/monetarypolicy/beige-book-default.htm]]
#[[Tradingeconomics|https://tradingeconomics.com/]]
!Fiscal
#[[USA: Fiscal Expenditures|https://www.usaspending.gov/#/explorer/budget_function]]
#[[USA: Major Foreign Holders of Treasury Securities|http://ticdata.treasury.gov/Publish/mfh.txt]]
!Housing
#[[USA New Home Sales|https://www.census.gov/econ/currentdata/dbsearch?program=RESSALES&startYear=1963&endYear=2018&categories=SOLD&dataType=TOTAL&geoLevel=US¬Adjusted=1&submit=GET+DATA&releaseScheduleId=#line]]
#[[Hong Kong Property Market Data|https://data.gov.hk/en-data/dataset/hk-rvd-tsinfo_rvd-property-market-statistics]]
!Money
#[[Historical Federal Funds Rate Target|http://www.fedprimerate.com/fedfundsrate/federal_funds_rate_history.htm#current]]
#[[Libor USA and others|http://www.economagic.com/libor.htm#US]]
#[[USA: Treasury Yield Curve|https://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/TextView.aspx?data=yield]]
#[[St. Louis Fed Real Interest Rate|https://fred.stlouisfed.org/series/DFII5]]
!Capital Flow
#[[USA Treasury International Capital Monthly Data|https://www.treasury.gov/resource-center/data-chart-center/tic/Pages/ticpress.aspx#1]]
!Leading Indicators
#[[Economic Cycle Research Institute Weekly Leading Index|https://www.businesscycle.com/ecri-reports-indexes/all-indexes#]]
#[[Philadelphia Fed Business Outlook Survey|https://www.phil.frb.org/research-and-data/regional-economy/business-outlook-survey/]]
!Currencies
#[[USDCNY|https://tradingeconomics.com/china/currency]]
!Commodities
#[[Brent Crude Oil|https://tradingeconomics.com/commodity/brent-crude-oil]]
#[[Copper Cash Market|https://www.marketscreener.com/LME-COPPER-CASH-16161/charts-historical/]]
#[[Gold|https://tradingeconomics.com/commodity/gold]]
September 6, 2009
How Did Economists Get It So Wrong?
By PAUL KRUGMAN
I. MISTAKING BEAUTY FOR TRUTH
It’s hard to believe now, but not long ago economists were congratulating themselves over the success of their field. Those @@successes@@ — or so they believed — were both theoretical and practical, leading to a golden era for the profession. On the theoretical side, they thought that they had resolved their internal disputes. Thus, in a 2008 paper titled “The State of Macro” (that is, macroeconomics, the study of big-picture issues like recessions), Olivier Blanchard of M.I.T., now the chief economist at the International Monetary Fund, declared that “the state of macro is good.” The battles of yesteryear, he said, were over, and there had been a “broad convergence of vision.” And in the real world, economists believed they had things under control: the “central problem of depression-prevention has been solved,” declared Robert Lucas of the University of Chicago in his 2003 presidential address to the American Economic Association. In 2004, Ben Bernanke, a former Princeton professor who is now the chairman of the Federal Reserve Board, celebrated the Great Moderation in economic performance over the previous two decades, which he attributed in part to improved economic policy making.
@@Last year, everything came apart.@@
Few economists saw our current crisis coming, but this predictive failure was the least of the field’s problems. More important was the profession’s blindness to the very possibility of catastrophic failures in a market economy. During the golden years, financial economists came to believe that markets were inherently stable — indeed, that stocks and other assets were always priced just right. There was nothing in the prevailing models suggesting the possibility of the kind of collapse that happened last year. Meanwhile, macroeconomists were divided in their views. But the main division was between those who insisted that free-market economies never go astray and those who believed that economies may stray now and then but that any major deviations from the path of prosperity could and would be corrected by the all-powerful Fed. Neither side was prepared to cope with an economy that went off the rails despite the Fed’s best efforts.
@@And in the wake of the crisis, the fault lines in the economics profession have yawned wider than ever. Lucas says the Obama administration’s stimulus plans are “schlock economics,” and his Chicago colleague John Cochrane says they’re based on discredited “fairy tales.” In response, Brad DeLong of the University of California, Berkeley, writes of the “intellectual collapse” of the Chicago School, and I myself have written that comments from Chicago economists are the product of a Dark Age of macroeconomics in which hard-won knowledge has been forgotten.@@
What happened to the economics profession? And where does it go from here?
As I see it, the economics profession went astray because economists, as a group, mistook beauty, clad in impressive-looking mathematics, for truth. Until the Great Depression, most economists clung to a vision of capitalism as a perfect or nearly perfect system. That vision wasn’t sustainable in the face of mass unemployment, but as memories of the Depression faded, economists fell back in love with the old, idealized vision of an economy in which rational individuals interact in perfect markets, this time gussied up with fancy equations. The renewed romance with the idealized market was, to be sure, partly a response to shifting political winds, partly a response to financial incentives. But while sabbaticals at the Hoover Institution and job opportunities on Wall Street are nothing to sneeze at, the central cause of the profession’s failure was the desire for an all-encompassing, intellectually elegant approach that also gave economists a chance to show off their mathematical prowess.
Unfortunately, this romanticized and sanitized vision of the economy led most economists to ignore all the things that can go wrong. They turned a blind eye to the limitations of human rationality that often lead to bubbles and busts; to the problems of institutions that run amok; to the imperfections of markets — especially financial markets — that can cause the economy’s operating system to undergo sudden, unpredictable crashes; and to the dangers created when regulators don’t believe in regulation.
It’s much harder to say where the economics profession goes from here. But what’s almost certain is that economists will have to learn to live with messiness. That is, they will have to acknowledge the importance of irrational and often unpredictable behavior, face up to the often idiosyncratic imperfections of markets and accept that an elegant economic “theory of everything” is a long way off. In practical terms, this will translate into more cautious policy advice — and a reduced willingness to dismantle economic safeguards in the faith that markets will solve all problems.
II. FROM SMITH TO KEYNES AND BACK
The birth of economics as a discipline is usually credited to Adam Smith, who published “The Wealth of Nations” in 1776. Over the next 160 years an extensive body of economic theory was developed, whose central message was: Trust the market. Yes, economists admitted that there were cases in which markets might fail, of which the most important was the case of “externalities” — costs that people impose on others without paying the price, like traffic congestion or pollution. But the basic presumption of “neoclassical” economics (named after the late-19th-century theorists who elaborated on the concepts of their “classical” predecessors) was that we should have faith in the market system.
This faith was, however, shattered by the Great Depression. Actually, even in the face of total collapse some economists insisted that whatever happens in a market economy must be right: “Depressions are not simply evils,” declared Joseph Schumpeter in 1934 — 1934! They are, he added, “forms of something which has to be done.” But many, and eventually most, economists turned to the insights of John Maynard Keynes for both an explanation of what had happened and a solution to future depressions.
Keynes did not, despite what you may have heard, want the government to run the economy. He described his analysis in his 1936 masterwork, “The General Theory of Employment, Interest and Money,” as “moderately conservative in its implications.” He wanted to fix capitalism, not replace it. But he did challenge the notion that free-market economies can function without a minder, expressing particular contempt for financial markets, which he viewed as being dominated by short-term speculation with little regard for fundamentals. And he called for active government intervention — printing more money and, if necessary, spending heavily on public works — to fight unemployment during slumps.
It’s important to understand that Keynes did much more than make bold assertions. “The General Theory” is a work of profound, deep analysis — analysis that persuaded the best young economists of the day. Yet the story of economics over the past half century is, to a large degree, the story of a retreat from Keynesianism and a return to neoclassicism. The neoclassical revival was initially led by Milton Friedman of the University of Chicago, who asserted as early as 1953 that neoclassical economics works well enough as a description of the way the economy actually functions to be “both extremely fruitful and deserving of much confidence.” But what about depressions?
Friedman’s counterattack against Keynes began with the doctrine known as monetarism. Monetarists didn’t disagree in principle with the idea that a market economy needs deliberate stabilization. “We are all Keynesians now,” Friedman once said, although he later claimed he was quoted out of context. Monetarists asserted, however, that a very limited, circumscribed form of government intervention — namely, instructing central banks to keep the nation’s money supply, the sum of cash in circulation and bank deposits, growing on a steady path — is all that’s required to prevent depressions. Famously, Friedman and his collaborator, Anna Schwartz, argued that if the Federal Reserve had done its job properly, the Great Depression would not have happened. Later, Friedman made a compelling case against any deliberate effort by government to push unemployment below its “natural” level (currently thought to be about 4.8 percent in the United States): excessively expansionary policies, he predicted, would lead to a combination of inflation and high unemployment — a prediction that was borne out by the stagflation of the 1970s, which greatly advanced the credibility of the anti-Keynesian movement.
Eventually, however, the anti-Keynesian counterrevolution went far beyond Friedman’s position, which came to seem relatively moderate compared with what his successors were saying. Among financial economists, Keynes’s disparaging vision of financial markets as a “casino” was replaced by “efficient market” theory, which asserted that financial markets always get asset prices right given the available information. Meanwhile, many macroeconomists completely rejected Keynes’s framework for understanding economic slumps. Some returned to the view of Schumpeter and other apologists for the Great Depression, viewing recessions as a good thing, part of the economy’s adjustment to change. And even those not willing to go that far argued that any attempt to fight an economic slump would do more harm than good.
Not all macroeconomists were willing to go down this road: many became self-described New Keynesians, who continued to believe in an active role for the government. Yet even they mostly accepted the notion that investors and consumers are rational and that markets generally get it right.
Of course, there were exceptions to these trends: a few economists challenged the assumption of rational behavior, questioned the belief that financial markets can be trusted and pointed to the long history of financial crises that had devastating economic consequences. But they were swimming against the tide, unable to make much headway against a pervasive and, in retrospect, foolish complacency.
III. PANGLOSSIAN FINANCE
In the 1930s, financial markets, for obvious reasons, didn’t get much respect. Keynes compared them to “those newspaper competitions in which the competitors have to pick out the six prettiest faces from a hundred photographs, the prize being awarded to the competitor whose choice most nearly corresponds to the average preferences of the competitors as a whole; so that each competitor has to pick, not those faces which he himself finds prettiest, but those that he thinks likeliest to catch the fancy of the other competitors.”
And Keynes considered it a very bad idea to let such markets, in which speculators spent their time chasing one another’s tails, dictate important business decisions: “When the capital development of a country becomes a by-product of the activities of a casino, the job is likely to be ill-done.”
@@By 1970 or so, however, the study of financial markets seemed to have been taken over by Voltaire’s Dr. Pangloss, who insisted that we live in the best of all possible worlds. Discussion of investor irrationality, of bubbles, of destructive speculation had virtually disappeared from academic discourse. The field was dominated by the “efficient-market hypothesis,” promulgated by Eugene Fama of the University of Chicago, which claims that financial markets price assets precisely at their intrinsic worth given all publicly available information. (The price of a company’s stock, for example, always accurately reflects the company’s value given the information available on the company’s earnings, its business prospects and so on.) And by the 1980s, finance economists, notably Michael Jensen of the Harvard Business School, were arguing that because financial markets always get prices right, the best thing corporate chieftains can do, not just for themselves but for the sake of the economy, is to maximize their stock prices. In other words, finance economists believed that we should put the capital development of the nation in the hands of what Keynes had called a “casino.”@@
It’s hard to argue that this transformation in the profession was driven by events. True, the memory of 1929 was gradually receding, but there continued to be bull markets, with widespread tales of speculative excess, followed by bear markets. In 1973-4, for example, stocks lost 48 percent of their value. And the 1987 stock crash, in which the Dow plunged nearly 23 percent in a day for no clear reason, should have raised at least a few doubts about market rationality.
These events, however, which Keynes would have considered evidence of the unreliability of markets, did little to blunt the force of a beautiful idea. @@The theoretical model that finance economists developed by assuming that every investor rationally balances risk against reward — the so-called Capital Asset Pricing Model, or CAPM (pronounced cap-em) — is wonderfully elegant. And if you accept its premises it’s also extremely useful. CAPM not only tells you how to choose your portfolio — even more important from the financial industry’s point of view, it tells you how to put a price on financial derivatives, claims on claims.@@ The elegance and apparent usefulness of the new theory led to a string of Nobel prizes for its creators, and many of the theory’s adepts also received more mundane rewards: @@Armed with their new models and formidable math skills — the more arcane uses of CAPM require physicist-level computations — mild-mannered business-school professors could and did become Wall Street rocket scientists, earning Wall Street paychecks.@@
To be fair, finance theorists didn’t accept the efficient-market hypothesis merely because it was elegant, convenient and lucrative. They also produced a great deal of statistical evidence, which at first seemed strongly supportive. But this evidence was of an oddly limited form. Finance economists rarely asked the seemingly obvious (though not easily answered) question of whether asset prices made sense given real-world fundamentals like earnings. Instead, they asked only whether asset prices made sense given other asset prices. Larry Summers, now the top economic adviser in the Obama administration, once mocked finance professors with a parable about “ketchup economists” who “have shown that two-quart bottles of ketchup invariably sell for exactly twice as much as one-quart bottles of ketchup,” and conclude from this that the ketchup market is perfectly efficient.
But neither this mockery nor more polite critiques from economists like Robert Shiller of Yale had much effect. Finance theorists continued to believe that their models were essentially right, and so did many people making real-world decisions. Not least among these was Alan Greenspan, who was then the Fed chairman and a long-time supporter of financial deregulation whose rejection of calls to rein in subprime lending or address the ever-inflating housing bubble rested in large part on the belief that modern financial economics had everything under control. There was a telling moment in 2005, at a conference held to honor Greenspan’s tenure at the Fed. One brave attendee, Raghuram Rajan (of the University of Chicago, surprisingly), presented a paper warning that the financial system was taking on potentially dangerous levels of risk. He was mocked by almost all present — including, by the way, Larry Summers, who dismissed his warnings as “misguided.”
By October of last year, however, Greenspan was admitting that he was in a state of “shocked disbelief,” because “the whole intellectual edifice” had “collapsed.” Since this collapse of the intellectual edifice was also a collapse of real-world markets, the result was a severe recession — the worst, by many measures, since the Great Depression. What should policy makers do? Unfortunately, macroeconomics, which should have been providing clear guidance about how to address the slumping economy, was in its own state of disarray.
IV. THE TROUBLE WITH MACRO
“We have involved ourselves in a colossal muddle, having blundered in the control of a delicate machine, the working of which we do not understand. The result is that our possibilities of wealth may run to waste for a time — perhaps for a long time.” So wrote John Maynard Keynes in an essay titled “The Great Slump of 1930,” in which he tried to explain the catastrophe then overtaking the world. And the world’s possibilities of wealth did indeed run to waste for a long time; it took World War II to bring the Great Depression to a definitive end.
Why was Keynes’s diagnosis of the Great Depression as a “colossal muddle” so compelling at first? And why did economics, circa 1975, divide into opposing camps over the value of Keynes’s views?
I like to explain the essence of Keynesian economics with a true story that also serves as a parable, a small-scale version of the messes that can afflict entire economies. Consider the travails of the Capitol Hill Baby-Sitting Co-op.
This co-op, whose problems were recounted in a 1977 article in The Journal of Money, Credit and Banking, was an association of about 150 young couples who agreed to help one another by baby-sitting for one another’s children when parents wanted a night out. To ensure that every couple did its fair share of baby-sitting, the co-op introduced a form of scrip: coupons made out of heavy pieces of paper, each entitling the bearer to one half-hour of sitting time. Initially, members received 20 coupons on joining and were required to return the same amount on departing the group.
Unfortunately, it turned out that the co-op’s members, on average, wanted to hold a reserve of more than 20 coupons, perhaps, in case they should want to go out several times in a row. As a result, relatively few people wanted to spend their scrip and go out, while many wanted to baby-sit so they could add to their hoard. But since baby-sitting opportunities arise only when someone goes out for the night, this meant that baby-sitting jobs were hard to find, which made members of the co-op even more reluctant to go out, making baby-sitting jobs even scarcer. . . .
In short, the co-op fell into a recession.
O.K., what do you think of this story? Don’t dismiss it as silly and trivial: economists have used small-scale examples to shed light on big questions ever since Adam Smith saw the roots of economic progress in a pin factory, and they’re right to do so. The question is whether this particular example, in which a recession is a problem of inadequate demand — there isn’t enough demand for baby-sitting to provide jobs for everyone who wants one — gets at the essence of what happens in a recession.
Forty years ago most economists would have agreed with this interpretation. But since then macroeconomics has divided into two great factions: “saltwater” economists (mainly in coastal U.S. universities), who have a more or less Keynesian vision of what recessions are all about; and “freshwater” economists (mainly at inland schools), who consider that vision nonsense.
Freshwater economists are, essentially, neoclassical purists. They believe that all worthwhile economic analysis starts from the premise that people are rational and markets work, a premise violated by the story of the baby-sitting co-op. As they see it, a general lack of sufficient demand isn’t possible, because prices always move to match supply with demand. If people want more baby-sitting coupons, the value of those coupons will rise, so that they’re worth, say, 40 minutes of baby-sitting rather than half an hour — or, equivalently, the cost of an hours’ baby-sitting would fall from 2 coupons to 1.5. And that would solve the problem: the purchasing power of the coupons in circulation would have risen, so that people would feel no need to hoard more, and there would be no recession.
@@But don’t recessions look like periods in which there just isn’t enough demand to employ everyone willing to work? Appearances can be deceiving, say the freshwater theorists. Sound economics, in their view, says that overall failures of demand can’t happen — and that means that they don’t. Keynesian economics has been “proved false,” Cochrane, of the University of Chicago, says.@@
Yet recessions do happen. Why? In the 1970s the leading freshwater macroeconomist, the Nobel laureate Robert Lucas, argued that recessions were caused by temporary confusion: workers and companies had trouble distinguishing overall changes in the level of prices because of inflation or deflation from changes in their own particular business situation. And Lucas warned that any attempt to fight the business cycle would be counterproductive: activist policies, he argued, would just add to the confusion.
By the 1980s, however, even this severely limited acceptance of the idea that recessions are bad things had been rejected by many freshwater economists. Instead, the new leaders of the movement, especially Edward Prescott, who was then at the University of Minnesota (you can see where the freshwater moniker comes from), argued that price fluctuations and changes in demand actually had nothing to do with the business cycle. Rather, the business cycle reflects fluctuations in the rate of technological progress, which are amplified by the rational response of workers, who voluntarily work more when the environment is favorable and less when it’s unfavorable. Unemployment is a deliberate decision by workers to take time off.
Put baldly like that, this theory sounds foolish — was the Great Depression really the Great Vacation? And to be honest, I think it really is silly. But the basic premise of Prescott’s “real business cycle” theory was embedded in ingeniously constructed mathematical models, which were mapped onto real data using sophisticated statistical techniques, and the theory came to dominate the teaching of macroeconomics in many university departments. In 2004, reflecting the theory’s influence, Prescott shared a Nobel with Finn Kydland of Carnegie Mellon University.
Meanwhile, saltwater economists balked. Where the freshwater economists were purists, saltwater economists were pragmatists. While economists like N. Gregory Mankiw at Harvard, Olivier Blanchard at M.I.T. and David Romer at the University of California, Berkeley, acknowledged that it was hard to reconcile a Keynesian demand-side view of recessions with neoclassical theory, they found the evidence that recessions are, in fact, demand-driven too compelling to reject. So they were willing to deviate from the assumption of perfect markets or perfect rationality, or both, adding enough imperfections to accommodate a more or less Keynesian view of recessions. And in the saltwater view, active policy to fight recessions remained desirable.
But the self-described New Keynesian economists weren’t immune to the charms of rational individuals and perfect markets. They tried to keep their deviations from neoclassical orthodoxy as limited as possible. This meant that there was no room in the prevailing models for such things as bubbles and banking-system collapse. The fact that such things continued to happen in the real world — there was a terrible financial and macroeconomic crisis in much of Asia in 1997-8 and a depression-level slump in Argentina in 2002 — wasn’t reflected in the mainstream of New Keynesian thinking.
Even so, you might have thought that the differing worldviews of freshwater and saltwater economists would have put them constantly at loggerheads over economic policy. Somewhat surprisingly, however, between around 1985 and 2007 the disputes between freshwater and saltwater economists were mainly about theory, not action. The reason, I believe, is that New Keynesians, unlike the original Keynesians, didn’t think fiscal policy — changes in government spending or taxes — was needed to fight recessions. They believed that monetary policy, administered by the technocrats at the Fed, could provide whatever remedies the economy needed. At a 90th birthday celebration for Milton Friedman, Ben Bernanke, formerly a more or less New Keynesian professor at Princeton, and by then a member of the Fed’s governing board, declared of the Great Depression: “You’re right. We did it. We’re very sorry. But thanks to you, it won’t happen again.” The clear message was that all you need to avoid depressions is a smarter Fed.
And as long as macroeconomic policy was left in the hands of the maestro Greenspan, without Keynesian-type stimulus programs, freshwater economists found little to complain about. (They didn’t believe that monetary policy did any good, but they didn’t believe it did any harm, either.)
It would take a crisis to reveal both how little common ground there was and how Panglossian even New Keynesian economics had become.
V. NOBODY COULD HAVE PREDICTED . . .
In recent, rueful economics discussions, an all-purpose punch line has become “nobody could have predicted. . . .” It’s what you say with regard to disasters that could have been predicted, should have been predicted and actually were predicted by a few economists who were scoffed at for their pains.
Take, for example, the precipitous rise and fall of housing prices. Some economists, notably Robert Shiller, did identify the bubble and warn of painful consequences if it were to burst. Yet key policy makers failed to see the obvious. In 2004, Alan Greenspan dismissed talk of a housing bubble: “a national severe price distortion,” he declared, was “most unlikely.” Home-price increases, Ben Bernanke said in 2005, “largely reflect strong economic fundamentals.”
How did they miss the bubble? To be fair, interest rates were unusually low, possibly explaining part of the price rise. It may be that Greenspan and Bernanke also wanted to celebrate the Fed’s success in pulling the economy out of the 2001 recession; conceding that much of that success rested on the creation of a monstrous bubble would have placed a damper on the festivities.
@@But there was something else going on: a general belief that bubbles just don’t happen. What’s striking, when you reread Greenspan’s assurances, is that they weren’t based on evidence — they were based on the a priori assertion that there simply can’t be a bubble in housing. And the finance theorists were even more adamant on this point. In a 2007 interview, Eugene Fama, the father of the efficient-market hypothesis, declared that “the word ‘bubble’ drives me nuts,” and went on to explain why we can trust the housing market: “Housing markets are less liquid, but people are very careful when they buy houses. It’s typically the biggest investment they’re going to make, so they look around very carefully and they compare prices. The bidding process is very detailed.”@@
Indeed, home buyers generally do carefully compare prices — that is, they compare the price of their potential purchase with the prices of other houses. But this says nothing about whether the overall price of houses is justified. It’s ketchup economics, again: because a two-quart bottle of ketchup costs twice as much as a one-quart bottle, finance theorists declare that the price of ketchup must be right.
In short, the belief in efficient financial markets blinded many if not most economists to the emergence of the biggest financial bubble in history. And efficient-market theory also played a significant role in inflating that bubble in the first place.
Now that the undiagnosed bubble has burst, the true riskiness of supposedly safe assets has been revealed and the financial system has demonstrated its fragility. U.S. households have seen $13 trillion in wealth evaporate. More than six million jobs have been lost, and the unemployment rate appears headed for its highest level since 1940. So what guidance does modern economics have to offer in our current predicament? And should we trust it?
VI. THE STIMULUS SQUABBLE
Between 1985 and 2007 a false peace settled over the field of macroeconomics. There hadn’t been any real convergence of views between the saltwater and freshwater factions. But these were the years of the Great Moderation — an extended period during which inflation was subdued and recessions were relatively mild. Saltwater economists believed that the Federal Reserve had everything under control. Fresh­water economists didn’t think the Fed’s actions were actually beneficial, but they were willing to let matters lie.
But the crisis ended the phony peace. Suddenly the narrow, technocratic policies both sides were willing to accept were no longer sufficient — and the need for a broader policy response brought the old conflicts out into the open, fiercer than ever.
Why weren’t those narrow, technocratic policies sufficient? The answer, in a word, is zero.
During a normal recession, the Fed responds by buying Treasury bills — short-term government debt — from banks. This drives interest rates on government debt down; investors seeking a higher rate of return move into other assets, driving other interest rates down as well; and normally these lower interest rates eventually lead to an economic bounceback. The Fed dealt with the recession that began in 1990 by driving short-term interest rates from 9 percent down to 3 percent. It dealt with the recession that began in 2001 by driving rates from 6.5 percent to 1 percent. And it tried to deal with the current recession by driving rates down from 5.25 percent to zero.
But zero, it turned out, isn’t low enough to end this recession. And the Fed can’t push rates below zero, since at near-zero rates investors simply hoard cash rather than lending it out. So by late 2008, with interest rates basically at what macroeconomists call the “zero lower bound” even as the recession continued to deepen, conventional monetary policy had lost all traction.
Now what? This is the second time America has been up against the zero lower bound, the previous occasion being the Great Depression. And it was precisely the observation that there’s a lower bound to interest rates that led Keynes to advocate higher government spending: when monetary policy is ineffective and the private sector can’t be persuaded to spend more, the public sector must take its place in supporting the economy. Fiscal stimulus is the Keynesian answer to the kind of depression-type economic situation we’re currently in.
Such Keynesian thinking underlies the Obama administration’s economic policies — and the freshwater economists are furious. For 25 or so years they tolerated the Fed’s efforts to manage the economy, but a full-blown Keynesian resurgence was something entirely different. Back in 1980, Lucas, of the University of Chicago, wrote that Keynesian economics was so ludicrous that “at research seminars, people don’t take Keynesian theorizing seriously anymore; the audience starts to whisper and giggle to one another.” Admitting that Keynes was largely right, after all, would be too humiliating a comedown.
And so Chicago’s Cochrane, outraged at the idea that government spending could mitigate the latest recession, declared: “It’s not part of what anybody has taught graduate students since the 1960s. They [Keynesian ideas] are fairy tales that have been proved false. It is very comforting in times of stress to go back to the fairy tales we heard as children, but it doesn’t make them less false.” (It’s a mark of how deep the division between saltwater and freshwater runs that Cochrane doesn’t believe that “anybody” teaches ideas that are, in fact, taught in places like Princeton, M.I.T. and Harvard.)
Meanwhile, saltwater economists, who had comforted themselves with the belief that the great divide in macroeconomics was narrowing, were shocked to realize that freshwater economists hadn’t been listening at all. Freshwater economists who inveighed against the stimulus didn’t sound like scholars who had weighed Keynesian arguments and found them wanting. Rather, they sounded like people who had no idea what Keynesian economics was about, who were resurrecting pre-1930 fallacies in the belief that they were saying something new and profound.
And it wasn’t just Keynes whose ideas seemed to have been forgotten. As Brad DeLong of the University of California, Berkeley, has pointed out in his laments about the Chicago school’s “intellectual collapse,” the school’s current stance amounts to a wholesale rejection of Milton Friedman’s ideas, as well. Friedman believed that Fed policy rather than changes in government spending should be used to stabilize the economy, but he never asserted that an increase in government spending cannot, under any circumstances, increase employment. In fact, rereading Friedman’s 1970 summary of his ideas, “A Theoretical Framework for Monetary Analysis,” what’s striking is how Keynesian it seems.
And Friedman certainly never bought into the idea that mass unemployment represents a voluntary reduction in work effort or the idea that recessions are actually good for the economy. Yet the current generation of freshwater economists has been making both arguments. Thus Chicago’s Casey Mulligan suggests that unemployment is so high because many workers are choosing not to take jobs: “Employees face financial incentives that encourage them not to work . . . decreased employment is explained more by reductions in the supply of labor (the willingness of people to work) and less by the demand for labor (the number of workers that employers need to hire).” Mulligan has suggested, in particular, that workers are choosing to remain unemployed because that improves their odds of receiving mortgage relief. And Cochrane declares that high unemployment is actually good: “We should have a recession. People who spend their lives pounding nails in Nevada need something else to do.”
Personally, I think this is crazy. Why should it take mass unemployment across the whole nation to get carpenters to move out of Nevada? Can anyone seriously claim that we’ve lost 6.7 million jobs because fewer Americans want to work? But it was inevitable that freshwater economists would find themselves trapped in this cul-de-sac: if you start from the assumption that people are perfectly rational and markets are perfectly efficient, you have to conclude that unemployment is voluntary and recessions are desirable.
Yet if the crisis has pushed freshwater economists into absurdity, it has also created a lot of soul-searching among saltwater economists. Their framework, unlike that of the Chicago School, both allows for the possibility of involuntary unemployment and considers it a bad thing. But the New Keynesian models that have come to dominate teaching and research assume that people are perfectly rational and financial markets are perfectly efficient. To get anything like the current slump into their models, New Keynesians are forced to introduce some kind of fudge factor that for reasons unspecified temporarily depresses private spending. (I’ve done exactly that in some of my own work.) And if the analysis of where we are now rests on this fudge factor, how much confidence can we have in the models’ predictions about where we are going?
The state of macro, in short, is not good. So where does the profession go from here?
VII. FLAWS AND FRICTIONS
Economics, as a field, got in trouble because economists were seduced by the vision of a perfect, frictionless market system. If the profession is to redeem itself, it will have to reconcile itself to a less alluring vision — that of a market economy that has many virtues but that is also shot through with flaws and frictions. The good news is that we don’t have to start from scratch. Even during the heyday of perfect-market economics, there was a lot of work done on the ways in which the real economy deviated from the theoretical ideal. What’s probably going to happen now — in fact, it’s already happening — is that flaws-and-frictions economics will move from the periphery of economic analysis to its center.
There’s already a fairly well developed example of the kind of economics I have in mind: the school of thought known as behavioral finance. Practitioners of this approach emphasize two things. First, many real-world investors bear little resemblance to the cool calculators of efficient-market theory: they’re all too subject to herd behavior, to bouts of irrational exuberance and unwarranted panic. Second, even those who try to base their decisions on cool calculation often find that they can’t, that problems of trust, credibility and limited collateral force them to run with the herd.
On the first point: even during the heyday of the efficient-market hypothesis, it seemed obvious that many real-world investors aren’t as rational as the prevailing models assumed. Larry Summers once began a paper on finance by declaring: “THERE ARE IDIOTS. Look around.” But what kind of idiots (the preferred term in the academic literature, actually, is “noise traders”) are we talking about? Behavioral finance, drawing on the broader movement known as behavioral economics, tries to answer that question by relating the apparent irrationality of investors to known biases in human cognition, like the tendency to care more about small losses than small gains or the tendency to extrapolate too readily from small samples (e.g., assuming that because home prices rose in the past few years, they’ll keep on rising).
Until the crisis, efficient-market advocates like Eugene Fama dismissed the evidence produced on behalf of behavioral finance as a collection of “curiosity items” of no real importance. That’s a much harder position to maintain now that the collapse of a vast bubble — a bubble correctly diagnosed by behavioral economists like Robert Shiller of Yale, who related it to past episodes of “irrational exuberance” — has brought the world economy to its knees.
On the second point: suppose that there are, indeed, idiots. How much do they matter? Not much, argued Milton Friedman in an influential 1953 paper: smart investors will make money by buying when the idiots sell and selling when they buy and will stabilize markets in the process. But the second strand of behavioral finance says that Friedman was wrong, that financial markets are sometimes highly unstable, and right now that view seems hard to reject.
Probably the most influential paper in this vein was a 1997 publication by Andrei Shleifer of Harvard and Robert Vishny of Chicago, which amounted to a formalization of the old line that “the market can stay irrational longer than you can stay solvent.” As they pointed out, arbitrageurs — the people who are supposed to buy low and sell high — need capital to do their jobs. And a severe plunge in asset prices, even if it makes no sense in terms of fundamentals, tends to deplete that capital. As a result, the smart money is forced out of the market, and prices may go into a downward spiral.
The spread of the current financial crisis seemed almost like an object lesson in the perils of financial instability. And the general ideas underlying models of financial instability have proved highly relevant to economic policy: a focus on the depleted capital of financial institutions helped guide policy actions taken after the fall of Lehman, and it looks (cross your fingers) as if these actions successfully headed off an even bigger financial collapse.
Meanwhile, what about macroeconomics? Recent events have pretty decisively refuted the idea that recessions are an optimal response to fluctuations in the rate of technological progress; a more or less Keynesian view is the only plausible game in town. Yet standard New Keynesian models left no room for a crisis like the one we’re having, because those models generally accepted the efficient-market view of the financial sector.
There were some exceptions. One line of work, pioneered by none other than Ben Bernanke working with Mark Gertler of New York University, emphasized the way the lack of sufficient collateral can hinder the ability of businesses to raise funds and pursue investment opportunities. A related line of work, largely established by my Princeton colleague Nobuhiro Kiyotaki and John Moore of the London School of Economics, argued that prices of assets such as real estate can suffer self-reinforcing plunges that in turn depress the economy as a whole. But until now the impact of dysfunctional finance hasn’t been at the core even of Keynesian economics. Clearly, that has to change.
@@VIII. ~RE-EMBRACING KEYNES
So here’s what I think economists have to do. First, they have to face up to the inconvenient reality that financial markets fall far short of perfection, that they are subject to extraordinary delusions and the madness of crowds. Second, they have to admit — and this will be very hard for the people who giggled and whispered over Keynes — that Keynesian economics remains the best framework we have for making sense of recessions and depressions. Third, they’ll have to do their best to incorporate the realities of finance into macroeconomics.@@
Many economists will find these changes deeply disturbing. It will be a long time, if ever, before the new, more realistic approaches to finance and macroeconomics offer the same kind of clarity, completeness and sheer beauty that characterizes the full neoclassical approach. To some economists that will be a reason to cling to neoclassicism, despite its utter failure to make sense of the greatest economic crisis in three generations. This seems, however, like a good time to recall the words of H. L. Mencken: “There is always an easy solution to every human problem — neat, plausible and wrong.”
When it comes to the all-too-human problem of recessions and depressions, economists need to abandon the neat but wrong solution of assuming that everyone is rational and markets work perfectly. The vision that emerges as the profession rethinks its foundations may not be all that clear; it certainly won’t be neat; but we can hope that it will have the virtue of being at least partly right.
Paul Krugman is a Times ~Op-Ed columnist and winner of the 2008 Nobel Memorial Prize in Economic Science. His latest book is “The Return of Depression Economics and the Crisis of 2008.”
This article has been revised to reflect the following correction:
Correction: September 6, 2009
Because of an editing error, an article on Page 36 this weekend about the failure of economists to anticipate the latest recession misquotes the economist John Maynard Keynes, who compared the financial markets of the 1930s to newspaper beauty contests in which readers tried to correctly pick all six eventual winners. Keynes noted that a competitor did not have to pick “those faces which he himself finds prettiest, but those that he thinks likeliest to catch the fancy of the other competitors.” He did not say, “nor even those that he thinks likeliest to catch the fancy of other competitors.”
/***
|''Name:''|LoadRemoteFileThroughProxy (previous LoadRemoteFileHijack)|
|''Description:''|When the TiddlyWiki file is located on the web (view over http) the content of [[SiteProxy]] tiddler is added in front of the file url. If [[SiteProxy]] does not exist "/proxy/" is added. |
|''Version:''|1.1.0|
|''Date:''|mar 17, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#LoadRemoteFileHijack|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
***/
//{{{
version.extensions.LoadRemoteFileThroughProxy = {
major: 1, minor: 1, revision: 0,
date: new Date("mar 17, 2007"),
source: "http://tiddlywiki.bidix.info/#LoadRemoteFileThroughProxy"};
if (!window.bidix) window.bidix = {}; // bidix namespace
if (!bidix.core) bidix.core = {};
bidix.core.loadRemoteFile = loadRemoteFile;
loadRemoteFile = function(url,callback,params)
{
if ((document.location.toString().substr(0,4) == "http") && (url.substr(0,4) == "http")){
url = store.getTiddlerText("SiteProxy", "/proxy/") + url;
}
return bidix.core.loadRemoteFile(url,callback,params);
}
//}}}
[[Syllabus]]
[[About Danyang Xie|http://danyang.xie.tiddlyspot.com]]
"Is Growth Exogenous? Taking Mankiw, Romer, and Weil Seriously"
#Conclusion: long-run growth is significantly correlated with behavioral variables such as the saving rate, and that this correlation is not easily explained by models in which growth is treated as the exogenous variables. Future empirical studies should focus on models that exhibit endogenous growth.
#Explicitly model the productivity change Zdot as a function of other variables, see equation (2.3), which can be written as (2.11), noting that Z grows at a constant rate on the balanced growth path rules out scale effects in the determination of Z. Xie: it seems problematic to have Z0, K0, H0, L0 in (2.11).
#Two testable equations: (2.17) and (2.18)
#Replication of MRW: For the augmented Solow Model, the implied alpha is low in some cases. Table III.
#Equation (3.2): If the growth rate g is constant across countries, then we could test by adding saving rates, the schooling rates, and population growth rates into the estimation equation and see if their coefficient is zero.Table V rejected this hypothesis.
#Two reasons for the rejection: 1. Growth may not be exogenous; 2. countries may be on a transition, rather than on a BGP. In fact, Results of Western Hemisphere sample in Table V suggests that reason 2 is a possibility.
#Other notable results: Table VI indicates that Ramsey model does not fit well with the data, neither does ~Uzawa-Lucas. AK model does better (Table VIII)
/***
|''Name:''|PasswordOptionPlugin|
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Version:''|1.0.2|
|''Date:''|Apr 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#PasswordOptionPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.PasswordOptionPlugin = {
major: 1, minor: 0, revision: 2,
date: new Date("Apr 19, 2007"),
source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
coreVersion: '2.2.0 (Beta 5)'
};
config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordInputType = "password"; // password | text
setStylesheet(".pasOptionInput {width: 11em;}\n","passwordInputTypeStyle");
merge(config.macros.option.types, {
'pas': {
elementType: "input",
valueField: "value",
eventName: "onkeyup",
className: "pasOptionInput",
typeValue: config.macros.option.passwordInputType,
create: function(place,type,opt,className,desc) {
// password field
config.macros.option.genericCreate(place,'pas',opt,className,desc);
// checkbox linked with this password "save this password on this computer"
config.macros.option.genericCreate(place,'chk','chk'+opt,className,desc);
// text savePasswordCheckboxLabel
place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
},
onChange: config.macros.option.genericOnChange
}
});
merge(config.optionHandlers['chk'], {
get: function(name) {
// is there an option linked with this chk ?
var opt = name.substr(3);
if (config.options[opt])
saveOptionCookie(opt);
return config.options[name] ? "true" : "false";
}
});
merge(config.optionHandlers, {
'pas': {
get: function(name) {
if (config.options["chk"+name]) {
return encodeCookie(config.options[name].toString());
} else {
return "";
}
},
set: function(name,value) {config.options[name] = decodeCookie(value);}
}
});
// need to reload options to load passwordOptions
loadOptionsCookie();
/*
if (!config.options['pasPassword'])
config.options['pasPassword'] = '';
merge(config.optionsDesc,{
pasPassword: "Test password"
});
*/
//}}}
''Econ 5250 Advanced Macroeconomics
Course Website: http://advmacro.tiddlyspot.com/
Fall 2019
Instructor: Danyang Xie, danyang.xie@gmail.com
Office Hours: Friday 1:00 pm to 3:00 pm or by appointment, LSK 6009
TA: HAO Yuzhi (Office Hour: Tue. 15:00pm-17:00pm, Room 5067, Seat No.11, LSK Building.)
!Course Outline and Reading List
This course covers deterministic and stochastic models of economic growth. These dynamic models are used to conduct business cycle analysis and to discuss government fiscal and monetary policies. Background in dynamic optimization is helpful but not required.
@@All the blue items are the required readings. You need to print them out by yourself.@@
There is no required textbook. The following books are recommended for general reference:
#Olivier Blanchard and Stanley Fischer, Lectures on Macroeconomics, MIT Press, 1989.
#Thomas Sargent, Dynamic Macroeconomic Theory, Harvard University Press, 1987.
#Barro and ~Sala-i-Martin, Economic Growth,~McGraw-Hill, Inc. 2nd Edition, 2003.
#Roger E. A. Farmer, The Macroeconomics of ~Self-Fulfilling Prophecies, MIT Press,1993.
#David Romer, Advanced Macroeconomics, Fourth Edition, ~McGraw-Hill, 2012.
The following articles are for general discussions:
#Woodford Michael,"Revolution and Evolution in ~Twentieth-Century Macroeconomics," 1999.
#Blanchard Olivier, "What Do We Know about Macroeconomics that Fisher and Wicksell did not?" Quarterly Journal of Economics, 2000.
#Mankiw Gregory,"The Macroeconomist as Scientist and Engineer," NBER, 2006.
#Chari V.V. and P. Kehoe,"Modern Macroeconomics in Practice: How Theory is Shaping Policy," Journal of Economic Perspectives, 2006.
#[[Krugman Paul,"How Did Economists Get it So Wrong," September 2009, New York Times]]
#[[Cochrane John, "How Did Paul Krugman Get it So Wrong." 2009]]
#[[Blanchard Olivier,"On the Future of Macroeconomic Models, 2018"|https://academic.oup.com/oxrep/article-pdf/34/1-2/43/23183705/grx045.pdf]]
!Evaluation Criterion
The evaluation is based on a final exam (50%), a set of homework (20%), paper presentation (20%, 35 minutes for each student) and participation in class discussion (10%). The exam will be open-book. @@Selection Criteria for a paper to be used for presentation (1. 2016 or more recent; 2. related to the topics covered; 3. a Google citation above 50.) @@ ''Please send the link to the TA. Section G contains some of the selections by my previous students over the years.''
!Topics and Readings
''An Introduction and Math Preparation''
*[[Major Development in Macroeconomics|http://dxie.people.ust.hk/Econ5250/majordevelopment.pdf]]
*[[Chapter 17|http://dxie.people.ust.hk/Econ5250/ch17.pdf]]
*[[Heuristic Derivation of Hamiltonian Approach|http://dxie.people.ust.hk/Econ5250/hamiltoniansimplified.pdf]]
''A. Growth Theory (3 weeks)''
A.1 Classics
Solow Robert, “A Contribution to the Theory of Economic Growth,” Quarterly Journal of Economics, Vol. 70, 1956: 65-94.
Ramsey Frank, “A Mathematical Theory of Saving,” Economic Journal, Vol. 38, December 1928: 543-559.
A.2 Endogenous Growth: ~One-Sector Model
*[[Chapter 18|http://dxie.people.ust.hk/Econ5250/ch18.pdf]]
*[[Backward Shooting: Mathcad Program|http://dxie.people.ust.hk/Econ5250/backwardshooting.pdf]]
*[[Chapter 19|http://dxie.people.ust.hk/Econ5250/ch19.pdf]]
*[[Chapter 20|http://dxie.people.ust.hk/Econ5250/ch20.pdf]]
[[Romer, Paul “Increasing Returns and Long Run Growth,” Journal of Political Economy, Vol. 94, 1986:1002-1037.|http://dxie.people.ust.hk/Econ5250/romerjpe1986.pdf]]
[[Xie, Danyang “Increasing Returns and Increasing Rates of Growth,” Journal of Political Economy, April, 1991: 429-435.|http://dxie.people.ust.hk/Econ5250/xiejpe.pdf]]
A.3 Endogenous Growth: ~Two-Sector Model
[[Lucas, Robert, E. Jr. “On the Mechanics of Economic Development,” Journal of Monetary Economics, Vol. 22, 1988:3-42.|http://dxie.people.ust.hk/Econ5250/lucasjme1988.pdf]]
[[Xie Danyang “Divergence in Economic Performance: Transitional Dynamics with Multiple Equilibria,” Journal of Economic Theory, Vol. 63, June, 1994: 97-112.|http://dxie.people.ust.hk/Econ5250/xiejet1994.pdf]]
[[Romer, Paul “Endogenous Technological Change,” Journal of Political Economy, Vol. 98, 1990: ~S71-S102.|http://dxie.people.ust.hk/Econ5250/romerjpe1990.pdf]]
*[[Notes on Romer 1990|http://dxie.people.ust.hk/Econ5250/Note Endogenous Technological Change.pdf]]
Grossman Gene and Elhanan Helpman, “Endogenous Product Cycles,” Economic Journal, Vol. 101, September, 1991: 1214-1229.
Grossman Gene and Elhanan Helpman “Quality Ladders in the Theory of Growth,” Review of Economic Studies, Vol. 58, January, 1991: 43-61.
Bond Eric, Ping Wang and C, K. Yip, “A General ~Two-Sector Model of Endogenous Growth with Physical and Human Capital: Balanced Growth and Transitional Dynamics,” Journal of Economic Theory, vol. 68, 1996, 149—173.
A4. Fiscal Policies in Endogenous Growth Models
Rebelo, Sergio, “~Long-Run Policy Analysis and ~Long-Run Growth,” Journal of Political Economy, Vol. 99, No. 3, 1991: 500-521.
Barro, Robert, J. “Government Spending in a Simple Model of Endogenous Growth,” Journal of Political Economy, Vol. 98, No. 5, 1990: ~S103-S125.
[[Devarajan, Shantayanan, Danyang Xie and Heng-fu Zou, “Does Public Capital Formation Promote Economic Growth,”|http://dxie.people.ust.hk/Econ5250/xiejme1988.pdf]] Journal of Monetary Economics, April, 1998.
A.5. Structural Change and Economic Growth
[[Kongsamut Piyabha, Sergio Rebelo and D. Xie, “Beyond Balanced Growth,”|http://dxie.people.ust.hk/Econ5250/xieres2001.pdf]] Review of Economic Studies, Vol. 68, November, 2001: 869-882.
Ngai Rachel and Christopher Pissarides, “Structural Change in a ~Multi-Sector Model of Growth,” American Economic Review, 2007.
Acemoglu Daron and Veronica Guerrieri, “Capital Deepening and ~Non-Balanced Economic Growth,” Journal of Political Economy, 2008.
*[[Acemoglu's presentation of KRX and his paper on Non-Balanced Growth|http://econ-www.mit.edu/files/1953]]
''B. Empirics of Growth (1 week)''
B.1 Growth Regression and Convergence Debate
[[N. Gregory Mankiw, David Romer, and David Weil, “A Contribution to the Empirics of Economic Growth,” Quarterly Journal of Economics, 107 (1992), 407-438.|http://dxie.people.ust.hk/Econ5250/mrw.pdf]]
*[[Note on MRW|http://dxie.people.ust.hk/Econ5250/Note on mrw.pdf]]
*[[The derivation of item 20 in the Note on MRW|http://dxie.people.ust.hk/Econ5250/notemrw-item20.pdf]]
Bernard, A. B. and Jones, C. I. , “Technology and Convergence,” Economic Journal, 106, 1996, 1037-1044.
Jones, Charles I. “Convergence Revisited,” Journal of Economic Growth, Vol. 2, July, 1997: 131-153.
Jones, Charles I. “On the Evolution of the World Income Distribution,” Journal of Economic Perspectives, Summer, 11, 1997: 19-36.
Quah, D. T. “Twin Peaks: Growth and Convergence in Models of Distribution Dynamics”. Economic Journal, 106, 1996: 1045-1055.
Hsieh C. T. and P. Klenow, "Misallocation and Manufacturing Productivity in China and India," Quarterly Journal of Economics, 2009.
Lucas, R. E. Jr. "Trade and the Diffusion of the Industrial Revolution," ~AEJ-Macro 2009.
[[Bernanke and Gurkaynak, "Is Growth Exogenous? Taking Mankiw, Romer, Weil Seriously,", NBER Macroeconomics Annual 2001|http://dxie.people.ust.hk/Econ5250/bernanke on mrw.pdf]]
[[Note on Bernanke and Gurkaynak]]
[[Determinants of Growth|http://dxie.people.ust.hk/Econ5250/2018 CGE Part 5 Determinants of Growth.pdf]]
B.2. Growth Accounting
Alwyn Young, “A Tale of Two Cities: Factor Accumulation and Technical Change in Hong Kong and Singapore,” NBER Macroeconomics Annual 1992, 13-54.
B.3. Finance and Growth
Rafael La Porta, Florencio ~Lopez-de-Silanes, Andrei Shleifer, and Robert Vishny, “Investor Protection and Corporate Valuation,” Journal of Finance, 2002.
King Robert G. and Ross Levine, “Finance and Growth: Schumpeter Might be Right,” Quarterly Journal of Economics, Vol. 108, 1993: 717-737.
Levine Ross, Norman Loayza, and Thorsten Beck, “Financial Intermediation and Growth: Causality and Causes,” Journal of Monetary Economics, Vol. 46, 2000: 31-77.
B4. Law and Development
Daron Acemoglu, Simon Johnson, and James A. Robinson, “The Colonial Origins of Comparative Development: An Empirical Investigation,” American Economic Review, December 2001: 1369-1401.
''C. Real Business Cycle Models (2 weeks)''
C.1. Classics
Long, John, Jr. and Charles Plosser, “Real Business Cycles,” Journal of Political Economy, Vol. 91, 1983: 39-69.
Kydland Finn and Edward Prescott, “Time to Build and Aggregate Fluctuations,” Econometrica, Vol. 50, November, 1982: 1345-1370.
[[Introduction to RBC|http://dxie.people.ust.hk/Econ5250/Introduction to RBC.pdf]]
[[Wang Pengfei's Example|http://ihome.ust.hk/~dxie/Econ5250/Wang Pengfei rbc example.pdf]]
C.2. Refinements
~McCallum, Bennett, “Real Business Cycle Models,” Modern Business Cycle Theory, (Robert J. Barro, ed.), 1988.
Prescott Edward “Theory Ahead of ~Business-Cycle Measurement,” ~Carnegie-Rochester Conference Series on Public Policy, Vol. 25, Autumn, 1985: 11-44
Hansen, Gary, “Indivisible Labor and the Business cycle,” Journal of Monetary Economy, Vol. 16, November, 1985: 309-327.
King R. G. and C. Plosser, 1984, “Money, Credit, and Prices in a Real Business Cycle,” American Economic Review, Vol. 74, June, 1984: 363-380.
King R. G. and M. W. Watson, “Money, Prices, Interest Rates and the Business Cycle,” Review of Economics and Statistics, Vol 78, February, 1996: 35-53.
[[Robert G. King and Sergio T. Rebelo, 2000. “Resuscitating Real Business Cycles,” RCER Working Papers 467, University of Rochester - Center for Economic Research (RCER).|http://ihome.ust.hk/~dxie/Econ5250/kingrebelo.pdf]]
[[Note on King and Rebelo|http://ihome.ust.hk/~dxie/Econ5250/Note on Resusciting_RBC.pdf]]
C 3 ~Self-Fulfilling Prophecies
Cass David and Karl Shell, “Do Sunspots Matter?” Journal of Political Economy, Vol. 91, 1983: 193-227.
Asariadis, Costas, “~Self-Fulfilling Prophecies,” Journal of Economic Theory, Vol. 25, 1981: 380-396.
Benhabib Jess and Roger Farmer, “Indeterminacy and Increasing Returns,” Journal of Economic Theory, Vol. 63, June, 1994: 19-41.
[[Farmer Roger, and ~Jang-Ting Guo, “Real Business Cycles and the Animal Spirits Hypothesis,” Journal of Economic Theory, Vol. 63, June 1994: 42-72.|http://ihome.ust.hk/~dxie/Econ5250/farmer_guo.pdf]]
[[Note on Farmer and Guo|http://ihome.ust.hk/~dxie/Econ5250/Note on farmerguo.pdf]]
Duffy John and Xiao Wei, Instability of sunspot equilibria in real business cycle models under adaptive learning, JME 2007
Day Richard, “Irregular Growth Cycles,” American Economic Review, Vol. 72, 1982: 406-414.
Benhabib Jess and Richard Day, “A Characterization of Erratic dynamics in the Overlapping Generations Model,” Journal of Economic Dynamics and Control, Vol. 4, 1982: 37-55.
Benhabib Jess and K Nishimura, “Competitive Equilibrium Cycles,” Journal of Economic Theory, Vol. 35, 1985: 284-306.
''D. Consumption Behavior (1 week)''
Hall Robert E. “Stochastic Implications of the Life ~Cycle-Permanent Income Hypothesis: Theory and Evidence,” Journal of Political Economy, December 1978: 971-988.
[[Note on Consumption Behavior|http://dxie.people.ust.hk/Econ5250/Note on consumption]]
[[Flavin Marjorie “The Adjustment of Consumption to Changing Expectations about Future Income,” Journal of Political Economy, Vol. 89 October 1981: 974-1009.|http://dxie.people.ust.hk/Econ5250/flavin.pdf]]
[[Campbell and Deaton “Why Is Consumption Too Smooth?” Review of Economic Studies, Vol. 56, 1989: 357-374.|http://dxie.people.ust.hk/Econ5250/campbell and deaton.pdf]]
Christiano Lawrence, Eichenbaum Martin and David Marshall “The Permanent Income Hypothesis Revisited,” Econometrica, Vol. 59, No. 2 (March, 1991): 397-423.
''E. Asset Pricing (1 week)''
[[Note on Asset Pricing|http://dxie.people.ust.hk/Econ5250/Note Asset Pricing.pdf]]
Lucas Robert E., Jr. “Asset Prices in an Exchange Economy,” Econometrica, Vol. 46, 1978: 1429-1445.
Hansen Lars Peter “Calculating Asset Prices in Three Example Economies,” in Advances in Econometrics, Fifth World Congress, edited, Truman F. Bewley, Cambridge University Press, 1987: 207-243.
Hansen Lars Peter and Scott F. Richard “The Role of Conditioning Information in Deducing Testable Restrictions Implied by Dynamic Asset Pricing Models,” Econometrica, Vol. 55 May, 1987: 587-613.
Mehra Rajnish and Edward Prescott “The Equity Premium: a Puzzle,” Journal of Monetary Economics, January, 1985: 145-61.
Constantinides George “Habit Formation: A Resolution of the Equity Premium Puzzle,” Journal of Political Economy, 1990.
Abel Andrew, “Asset Prices under Habit Formation and Catching up with the Joneses,” American Economic Review, May, 1990: 38-42.
[[Note on Equity Premium Puzzle|http://dxie.people.ust.hk/Econ5250/Note Equity Premium Puzzle taken by Greenwood.pdf]]
[[Note on Habit Formation|http://dxie.people.ust.hk/Econ5250/Note Habit Formation]]
Bansal and Yaron, "Risks for the Long Run: A Potential Resolution of Asset Pricing Puzzles," Journal of Finance, 2004.
Savov Alexi, "Asset Pricing with Garbage," Journal of Finance, 2011.
Tim Kroencke,"Asset Pricing without Garbage," Journal of Finance, 2017.
''F. Time Inconsistency of Government Policies (2 weeks)''
F.1. Classics
[[Kydland Finn and Edward Prescott, “The Inconsistency of Optimal Plans,” Journal of Political Economy, Vol. 85, 1977: 473–492.|http://ihome.ust.hk/~dxie/Econ5250/rulesdiscretion.pdf]]
[[Note on Time Consistency|http://ihome.ust.hk/~dxie/Econ5250/Note Time Consistency.pdf]]
[[Fischer Stanley, “Dynamic Inconsistency, Cooperation, and the Benevolent Dissembling Government,” Journal of Economic Dynamics and Control, Vol. 2, 1980: 93–107.|http://ihome.ust.hk/~dxie/Econ5250/Fischer JEDC 1980.pdf]]
[[Blanchard interview Fischer|http://ihome.ust.hk/~dxie/Econ5250/blanchardinterviewfischer.pdf]], 2004.
Barro Robert and David Gordon, “Rules, Discretion and Reputation in a Model of Monetary Policy,” Journal of Monetary Economics, Vol. 12, 1983: 101–121.
[[Note on Barro and Gordon|http://ihome.ust.hk/~dxie/Econ5250/Note Barro and Gordon.pdf]]
Rogoff, Kenneth, “The Optimal Degree of Commitment to an Intermediate Monetary Target,” Quarterly Journal of Economics, Vol. 85, 1985: 1169–1189.
Lucas Robert Jr. and Nancy Stokey, “Optimal Fiscal and Monetary Policy in an Economy Without Capital,” Journal of Monetary Economics, Vol. 12, 1983: 55–93.
Persson Torsten and Lars Svensson, “Why a Stubborn Conservative Would Run a Deficit: Policy with ~Time-Inconsistent Preferences,” Quarterly Journal of Economics,, Vol 104, 1989: 325–345.
F.2 Discrete Time Models
Abreu D, D. Pearce, and E. Stachetti, “Toward a Theory of Discounted Repeated Games with Imperfect Monitoring,” Econometrica, Vol. 58, 1990: 1041-1063.
Chang Roberto, “Credible Monetary Policy in an Infinite Horizon Model: Recursive Approaches,” Journal of Economic Theory, Vol. 81, 1998: 431–461.
Chari V.V. and Kehoe Patrick,” Optimal Fiscal and Monetary Policy,” Handbook of Macroeconomics, 1999.
~Schmitt-Grohe Stephanie and Martin Uribe,"Optimal Fiscal and Monetary Policy under Sticky Prices,” Journal of Economic Theory, 2004.
Alvarez Fernando, Patrick J. Kehoe and Pablo A. Neumeyer, 2004. "The Time Consistency of Optimal Monetary and Fiscal Policies," Econometrica, Econometric Society, vol. 72(2), pages 541-567
F.3. Continuous Time Models
[[Xie Danyang, “On Time Inconsistency: A Technical Issue in Stackelberg Differential Games,” Journal of Economic Theory, Vol. 76, 1997: 412–430.|http://ihome.ust.hk/~dxie/Papers/xiejet1997.pdf]]
[[Karp Larry and In Ho Lee, “Time Consistent Policies,” Journal of Economic Theory, Vol. 112, 2003: 353-364.|http://ihome.ust.hk/~dxie/Econ5250/Karp and Lee Consistency.pdf]]
Lansing K, “Optimal redistributive capital taxation in a neoclassical growth model,” Journal of Public Economics, 1999: 423-453.
[[Note on Lansing JPubE 1999|http://ihome.ust.hk/~dxie/Econ5250/Note Lansing Optimal Redistributive Capital Taxation.pdf]]
''G. Influential Articles Selected by Students''
*[[Song, Storesletten, and Zilibotti: "Growing like China" AER 2011|http://pubs.aeaweb.org/doi/pdfplus/10.1257/aer.101.1.196]]
*[[Wachter, Jessica, Can Time-Varying Risk of Rare Disasters Explain Aggregate Stock Market Volatility?|https://docs.google.com/file/d/1V-x08j1f_KkrR4AXFcKN55e0AiRAZAnHt5EiCjO6sGjplXGIu32NX6WZM98o/edit?usp=sharing]]
*[[Jaimovich, Nir, and Sergio Rebelo. 2009. "Can News about the Future Drive the Business Cycle?" American Economic Review, 99(4): 1097-1118.|http://pubs.aeaweb.org/doi/pdfplus/10.1257/aer.99.4.1097]]
*[[Mark Gertler and Peter Karadi, "A Model of Unconventional Monetary Policy," JME 2010|http://ac.els-cdn.com/S0304393210001261/1-s2.0-S0304393210001261-main.pdf?_tid=60de50f8-4110-11e3-9712-00000aab0f6c&acdnat=1383102615_08437f0dee49b8f3726f77788b6783d9]]
*[[Hsieh and Klenow, "Misallocation and Manufacturing TFP in China and India," QJE 2009|http://faculty.chicagobooth.edu/chang-tai.hsieh/research/MMTFP.pdf]]
*[[Xavier Gabaix, "Variable Rare Disasters: An Exactly Solved Framework for Ten Puzzles in Macro-Finance," QJE 2009|http://qje.oxfordjournals.org/content/127/2/645.full.pdf+html]]
*[[Eric Hanushek & Ludger Woessmann, 2012. "Do better schools lead to more growth? Cognitive skills, economic outcomes, and causation," Journal of Economic Growth, Springer, vol. 17(4), pages 267-321, December.|http://hanushek.stanford.edu/sites/default/files/publications/Hanushek%2BWoessmann%202012%20JEconGrowth%2017%284%29.pdf]]
*[[Jermann and Quadrini, "Macroeconomic Effects of Financial Shocks, NBER Working Paper 2009|http://www.nber.org/papers/w15338]]
*[[Brunnermeier and Sannikov, "A Macroeconomic Model with a Financial Sector", AER 2013|http://www.princeton.edu/~sannikov/macro_finance.pdf]]
*[[Bianchi, Javier. 2011. "Overborrowing and Systemic Externalities in the Business Cycle." American Economic Review, 101(7): 3400-3426|http://econ.as.nyu.edu/docs/IO/18565/Bianchi_20110113.pdf]]
*[[Daron Acemoglu, Philippe Aghion, Leonardo Bursztyn, and David Hemous "The Environment and Directed Technical Change" NBER 2009 |http://dspace.mit.edu/openaccess-disseminate/1721.1/61749]]
*[[Carol Corrado, Charles Hulten, Daniel Sichel, "Intangible Capital and US Economic Growth," Review of Income and Wealth. 2009|http://onlinelibrary.wiley.com/doi/10.1111/j.1475-4991.2009.00343.x/pdf]]
*[[François Gourio."Disasters Risk and Business Cycles" NBER Working Paper 2009|http://www.nber.org/papers/w15399]]
*[[Margaret S. McMillan and Dani Rodrik, "Globalization, structural change and productivity growth" NBER, 2011|http://www.ifpri.org/sites/default/files/publications/ifpridp01160.pdf]]
*[[Justiniano, Alejandro, Giorgio E. Primiceri, and Andrea Tambalotti. "Investment shocks and business cycles." Journal of Monetary Economics 57.2 (2010): 132-145.|http://ac.els-cdn.com/S0304393210000048/1-s2.0-S0304393210000048-main.pdf?_tid=70106874-4235-11e3-aebd-00000aab0f26&acdnat=1383228483_036a4ef748f52abc6910ef7a48ae8e8e]]
*[[Philippe Aghion, Richard Blundell, Rachel Griffith, Peter Howitt, and Susanne Prant, "The Effects of Entry on Incumbent Innovation and Productivity," Review of Economics and Statistics 2009 91:1, 20-32 |http://www.econstor.eu/bitstream/10419/51205/1/563419822.pdf]]
*[[Fatih Guvenen, A Parsimonious Macroeconomic Model for Asset Pricing. Econometrica (Vol. 77, No. 6, November 2009, pp. 1711-1750)|http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.195.605&rep=rep1&type=pdf]]
*[[Gertler and Kiyotaki: “ Financial Intermediation and Credit Policy in Business Cycle Analysis” Handbook of Monetary Economics, 2010.|http://www.gaia.e.u-tokyo.ac.jp/utipe/news/macro0622.pdf]]
*[[Balázs Égert, 2015. Public debt, economic growth and nonlinear effects: Myth or reality? Journal of Macroeconomics |http://www.sciencedirect.com/science/article/pii/S0164070414001335#!]]
*[[Bloom, N., Floetotto, M., Jaimovich, N., Saporta-Eksten, I., & Terry, S. J. (2016). Really uncertain business cycles. Working paper.|https://people.stanford.edu/nbloom/sites/default/files/rubc_paper.pdf]]
*[[Williams, H. L. (2013). Intellectual property rights and innovation: Evidence from the human genome. Journal of Political Economy, 121(1), 1-27.|http://www.journals.uchicago.edu/doi/abs/10.1086/669706]]
*[[Christiano, L. J., Eichenbaum, M. S., & Trabandt, M. (2016). Unemployment and business cycles. Econometrica, 84(4), 1523-1569.|http://onlinelibrary.wiley.com/doi/10.3982/ECTA11776/full]]
*[[Barro, R. J. (2013). Education and economic growth. Annals of Economics and Finance, 14(2), 301-328.|ftp://ftp.aefweb.net/WorkingPapers/w571.pdf]]
*[['Public debt and economic growth: Is there a causal effect?' by Ugo Panizza and Andrea F. Presbitero, Journal of Macroeconomics 2014.|http://www.sciencedirect.com/science/article/pii/S0164070414000536]]
*[[Barberis, N., Greenwood, R., Jin, L., & Shleifer, A. (2015). X-CAPM: An extrapolative capital asset pricing model. Journal of Financial Economics, 115(1), 1-24.|https://ac.els-cdn.com/S0304405X14001822/1-s2.0-S0304405X14001822-main.pdf?_tid=40fcd3f0-bfa0-11e7-ade2-00000aacb362&acdnat=1509608246_f0f26c8ab8a5ce61e4c3819ccb8da806]]
*[[Acemoglu, D., Naidu, S., Restrepo, P., & Robinson, J. A. (2015). Democracy does cause growth. National Bureau of Economic Research. Working paper.|https://economics.mit.edu/files/10759]]
*[[McKay, A., & Reis, R. (2016). The role of automatic stabilizers in the US business cycle. Econometrica, 84(1), 141-194.|http://onlinelibrary.wiley.com/doi/10.3982/ECTA11574/full]]
*[[“Land Price Dynamics and Macroeconomic Fluctuations”, by professors Zheng LIU, Pengfei WANG and Tao ZHA, Econometrica 2013 |http://www.jstor.org/stable/23524172?seq=1#page_scan_tab_contents]]
*[[Kogan, L., Papanikolaou, D., Seru, A., & Stoffman, N. (2017). Technological innovation, resource allocation, and growth. The Quarterly Journal of Economics, 132(2), 665-712. |https://academic.oup.com/qje/article/132/2/665/3076284]]
*[[David, J. M., Hopenhayn, H. A., & Venkateswaran, V. (2016). Information, misallocation, and aggregate productivity. The Quarterly Journal of Economics, 131(2), 943-1005.|https://academic.oup.com/qje/article/131/2/943/2607135]]
*[[Favilukis, J., & Lin, X. (2015). Wage rigidity: A quantitative solution to several asset pricing puzzles. The Review of Financial Studies, 29(1), 148-192.|https://academic.oup.com/rfs/article/29/1/148/1843600]]
*[[ “Shi, S. (2015), Liquidity, assets and business cycles, Journal of Monetary Economics, 70, 116-132. |https://www.sciencedirect.com/science/article/pii/S0304393214001573]]
*[[Prettner, K. (2013). Population aging and endogenous economic growth. Journal of population economics, 26 (2), 811-834.|https://link.springer.com/article/10.1007/s00148-012-0441-9]]
*[[Chari, V. V., & Kehoe, P. J. (2013). Bailouts, time inconsistency, and optimal regulation (No. w19192). National Bureau of Economic Research.|http://www.nber.org/papers/w19192]]
*[[Baker, S.R., Bloom, N. and Davis, S.J., 2016. Measuring economic policy uncertainty. The Quarterly Journal of Economics, 131(4), pp.1593-1636.|https://hkustconnect-my.sharepoint.com/:b:/g/personal/mnbhatia_connect_ust_hk/Ea9zrP9NN7lLkdsVnRYqPuwBX5YKht5gkswqt40md1xXJg?e=ecSsas]]
*[[Dabla-Norris, E., Ji, Y., Townsend, R.M. and Unsal, D.F., 2018. Distinguishing Constraints on Financial Inclusion and Their Impact on GDP, TFP, and the Distribution of Income.|https://www.nber.org/papers/w20821]]
*[[Kogan, L., Papanikolaou, D., Seru, A. and Stoffman, N., 2017. Technological innovation, resource allocation, and growth. The Quarterly Journal of Economics, 132(2), pp.665-712.|https://academic.oup.com/qje/article/132/2/665/3076284]]
*[[Keister, T., 2015. Bailouts and financial fragility. The Review of Economic Studies, 83(2), pp.704-736.|https://academic.oup.com/restud/article/83/2/704/2461219]]
*[[Jaimovich, N. and Rebelo, S., 2017. Nonlinear effects of taxation on growth. Journal of Political Economy, 125(1), pp.265-291. |https://www.journals.uchicago.edu/doi/abs/10.1086/689607]]
*[[Guerrieri, V. and Lorenzoni, G., 2017. Credit crises, precautionary savings, and the liquidity trap. The Quarterly Journal of Economics, 132(3), pp.1427-1467.|https://academic.oup.com/qje/article/132/3/1427/3071924]]
*[[Albuquerque, R., Eichenbaum, M., Luo, V.X. and Rebelo, S., 2016. Valuation risk and asset pricing. The Journal of Finance, 71(6), pp.2861-2904.|https://onlinelibrary.wiley.com/doi/full/10.1111/jofi.12437]]
*[[Bustos, P., Caprettini, B. and Ponticelli, J., 2016. Agricultural productivity and structural transformation: Evidence from Brazil. American Economic Review, 106(6), pp.1320-65.|https://www.aeaweb.org/articles?id=10.1257/aer.20131061]]
*[[Cecchetti, S.G. and Kharroubi, E., 2015. Why does financial sector growth crowd out real economic growth?.|https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2615882]]
*[[Dietz, S. and Stern, N., 2015. Endogenous growth, convexity of damage and climate risk: how Nordhaus' framework supports deep cuts in carbon emissions. The Economic Journal, 125(583), pp.574-620.|https://onlinelibrary.wiley.com/doi/full/10.1111/ecoj.12188]]
*[[Mukoyama, T., Patterson, C. and Sahin, A., 2018. Job search behavior over the business cycle. American Economic Journal: Macroeconomics, 10(1), pp.190-215.|https://www.aeaweb.org/articles?id=10.1257/mac.20160202]]
*[[Galor, O. and Ozak, O., 2016. The agricultural origins of time preference. American Economic Review, 106(10), pp.3064-3103.|https://www.aeaweb.org/articles?id=10.1257/aer.20150020]]
*[[Bisin, A., Lizzeri, A., & Yariv, L. (2015). Government policy with time inconsistent voters. American Economic Review, 105(6), 1711-37.|https://www.aeaweb.org/articles?id=10.1257/aer.20131306]]
*[[Kaplan, G., Moll, B. and Violante, G.L., 2018. Monetary policy according to HANK. American Economic Review, 108(3), pp.697-743.|https://www.aeaweb.org/articles?id=10.1257/aer.20160042]]
*[[Bloom, N., Floetotto, M., Jaimovich, N., Saporta-Eksten, I. and Terry, S.J., 2018. Really uncertain business cycles. Econometrica, 86(3), pp.1031-1065.|https://onlinelibrary.wiley.com/doi/abs/10.3982/ECTA10927]]
*[[Lopez-Salido, D., Stein, J.C. and Zakrajsek, E., 2017. Credit-market sentiment and the business cycle. The Quarterly Journal of Economics, 132(3), pp.1373-1426.|https://academic.oup.com/qje/article/132/3/1373/3787666]]
*[[Gambetti, L., & Musso, A. (2017). Loan supply shocks and the business cycle. Journal of Applied Econometrics, 32(4), 764-782.|https://onlinelibrary.wiley.com/doi/full/10.1002/jae.2537]]
*[[Beck, T., Chen, T., Lin, C. and Song, F.M., 2016. Financial innovation: The bright and the dark sides. Journal of Banking & Finance, 72, pp.28-51.|https://www.sciencedirect.com/science/article/pii/S0378426616301133]]
*[[The Race Between Man and Machine Implication of Technology for Growth, Factor Shares, and Employment, AER, 2018 |http://cdi.mecon.gov.ar/bases/doc/nber/w22252.pdf]]
*[[Juan Carlos Cordoba and Marla Ripoll, 2017. "Risk Aversion and the Value of Life" Review of Economic Studies, 84: 1472-1509.|https://academic.oup.com/restud/article/84/4/1472/2684497]]
*[[Nakamura, E., Steinsson, J., & Liu, M. (2016). Are Chinese Growth and Inflation Too Smooth? Evidence from Engel Curves. American Economic Journal: Macroeconomics, 8(3), 113-144.|http://www.jstor.org/stable/24739426]]
*[[Hendrik Bessembinder, Do Stocks Outperform Treasury Bills, JFE 2018|https://papers.ssrn.com/sol3/Delivery.cfm/SSRN_ID3186246_code667.pdf?abstractid=2900447&mirid=1]]
*[[Iván Alfaro, Nicholas Bloom, Xiaoji Lin, The Finance Uncertainty Multiplier, NBER, 2018|https://www.nber.org/papers/w24571.pdf]]
*[[Grossman, Gene M., Elhanan Helpman, Ezra Oberfield, and Thomas Sampson. 2017. "Balanced Growth Despite Uzawa." American Economic Review, 107 (4): 1293-1312.|https://www.aeaweb.org/articles/pdf/doi/10.1257/aer.20151739]]
*[[Kogan et al. Technological Innovation, Resource Allocation, and Growth, 2017|https://academic.oup.com/qje/article/132/2/665/3076284#87520737]]
*[[Saroj Bhattarai, Arpita Chatterjee, and Woong Yong Park,Effects of US Quantitative Easing on Emerging Market Economies, Working Paper 2018|https://www.adb.org/sites/default/files/publication/399121/adbi-wp803.pdf]]
*[[Linda Schilling & Harald Uhlig, 2019. "Some simple Bitcoin Economics," Journal of Monetary Economics|https://www.nber.org/papers/w24483.pdf]]
*[[Blundell, Richard, et al. “Consumption Inequality and Family Labor Supply.” The American Economic Review, vol. 106, no. 2, 2016, pp. 387–435.|https://www.aeaweb.org/articles?id=10.1257/aer.20121549]]
*[[Rabah Arezki, Valerie A. Ramey, Liugang Sheng, News Shocks in Open Economies: Evidence from Giant Oil Discoveries, The Quarterly Journal of Economics, Volume 132, Issue 1, February 2017, Pages 103–155,|https://doi.org/10.1093/qje/qjw030]]
/***
Description: Contains the stuff you need to use Tiddlyspot
Note, you also need UploadPlugin, PasswordOptionPlugin and LoadRemoteFileThroughProxy
from http://tiddlywiki.bidix.info for a complete working Tiddlyspot site.
***/
//{{{
// edit this if you are migrating sites or retrofitting an existing TW
config.tiddlyspotSiteId = 'advmacro';
// make it so you can by default see edit controls via http
config.options.chkHttpReadOnly = false;
window.readOnly = false; // make sure of it (for tw 2.2)
window.showBackstage = true; // show backstage too
// disable autosave in d3
if (window.location.protocol != "file:")
config.options.chkGTDLazyAutoSave = false;
// tweak shadow tiddlers to add upload button, password entry box etc
with (config.shadowTiddlers) {
SiteUrl = 'http://'+config.tiddlyspotSiteId+'.tiddlyspot.com';
SideBarOptions = SideBarOptions.replace(/(<<saveChanges>>)/,"$1<<tiddler TspotSidebar>>");
OptionsPanel = OptionsPanel.replace(/^/,"<<tiddler TspotOptions>>");
DefaultTiddlers = DefaultTiddlers.replace(/^/,"[[WelcomeToTiddlyspot]] ");
MainMenu = MainMenu.replace(/^/,"[[WelcomeToTiddlyspot]] ");
}
// create some shadow tiddler content
merge(config.shadowTiddlers,{
'TspotControls':[
"| tiddlyspot password:|<<option pasUploadPassword>>|",
"| site management:|<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">>//(requires tiddlyspot password)//<br>[[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]], [[download (go offline)|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download]]|",
"| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[blog|http://tiddlyspot.blogspot.com/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|"
].join("\n"),
'TspotOptions':[
"tiddlyspot password:",
"<<option pasUploadPassword>>",
""
].join("\n"),
'TspotSidebar':[
"<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">><html><a href='http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download' class='button'>download</a></html>"
].join("\n"),
'WelcomeToTiddlyspot':[
"This document is a ~TiddlyWiki from tiddlyspot.com. A ~TiddlyWiki is an electronic notebook that is great for managing todo lists, personal information, and all sorts of things.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //What now?// @@ Before you can save any changes, you need to enter your password in the form below. Then configure privacy and other site settings at your [[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]] (your control panel username is //" + config.tiddlyspotSiteId + "//).",
"<<tiddler TspotControls>>",
"See also GettingStarted.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Working online// @@ You can edit this ~TiddlyWiki right now, and save your changes using the \"save to web\" button in the column on the right.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Working offline// @@ A fully functioning copy of this ~TiddlyWiki can be saved onto your hard drive or USB stick. You can make changes and save them locally without being connected to the Internet. When you're ready to sync up again, just click \"upload\" and your ~TiddlyWiki will be saved back to tiddlyspot.com.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Help!// @@ Find out more about ~TiddlyWiki at [[TiddlyWiki.com|http://tiddlywiki.com]]. Also visit [[TiddlyWiki.org|http://tiddlywiki.org]] for documentation on learning and using ~TiddlyWiki. New users are especially welcome on the [[TiddlyWiki mailing list|http://groups.google.com/group/TiddlyWiki]], which is an excellent place to ask questions and get help. If you have a tiddlyspot related problem email [[tiddlyspot support|mailto:support@tiddlyspot.com]].",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Enjoy :)// @@ We hope you like using your tiddlyspot.com site. Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions."
].join("\n")
});
//}}}
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 14/11/2019 12:34:38 | Danyang Xie | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . | ok |
| 14/11/2019 12:37:18 | Danyang Xie | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . | ok |
| 14/11/2019 12:41:14 | Danyang Xie | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . |
| 17/11/2019 19:30:05 | Danyang Xie | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . |
| 18/11/2019 22:15:42 | Danyang Xie | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . |
| 30/11/2019 10:38:06 | Danyang Xie | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . |
| 01/12/2019 18:41:49 | Danyang Xie | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . |
| 21/07/2020 20:35:18 | YourName | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . |
| 21/07/2020 21:06:39 | YourName | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . |
| 21/07/2020 21:07:29 | YourName | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . |
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.3|
|''Date:''|Feb 24, 2008|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
major: 4, minor: 1, revision: 3,
date: new Date("Feb 24, 2008"),
source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
coreVersion: '2.2.0'
};
//
// Environment
//
if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false; // true to activate both in Plugin and UploadService
//
// Upload Macro
//
config.macros.upload = {
// default values
defaultBackupDir: '', //no backup
defaultStoreScript: "store.php",
defaultToFilename: "index.html",
defaultUploadDir: ".",
authenticateUser: true // UploadService Authenticate User
};
config.macros.upload.label = {
promptOption: "Save and Upload this TiddlyWiki with UploadOptions",
promptParamMacro: "Save and Upload this TiddlyWiki in %0",
saveLabel: "save to web",
saveToDisk: "save to disk",
uploadLabel: "upload"
};
config.macros.upload.messages = {
noStoreUrl: "No store URL in parmeters or options",
usernameOrPasswordMissing: "Username or password missing"
};
config.macros.upload.handler = function(place,macroName,params) {
if (readOnly)
return;
var label;
if (document.location.toString().substr(0,4) == "http")
label = this.label.saveLabel;
else
label = this.label.uploadLabel;
var prompt;
if (params[0]) {
prompt = this.label.promptParamMacro.toString().format([this.destFile(params[0],
(params[1] ? params[1]:bidix.basename(window.location.toString())), params[3])]);
} else {
prompt = this.label.promptOption;
}
createTiddlyButton(place, label, prompt, function() {config.macros.upload.action(params);}, null, null, this.accessKey);
};
config.macros.upload.action = function(params)
{
// for missing macro parameter set value from options
if (!params) params = {};
var storeUrl = params[0] ? params[0] : config.options.txtUploadStoreUrl;
var toFilename = params[1] ? params[1] : config.options.txtUploadFilename;
var backupDir = params[2] ? params[2] : config.options.txtUploadBackupDir;
var uploadDir = params[3] ? params[3] : config.options.txtUploadDir;
var username = params[4] ? params[4] : config.options.txtUploadUserName;
var password = config.options.pasUploadPassword; // for security reason no password as macro parameter
// for still missing parameter set default value
if ((!storeUrl) && (document.location.toString().substr(0,4) == "http"))
storeUrl = bidix.dirname(document.location.toString())+'/'+config.macros.upload.defaultStoreScript;
if (storeUrl.substr(0,4) != "http")
storeUrl = bidix.dirname(document.location.toString()) +'/'+ storeUrl;
if (!toFilename)
toFilename = bidix.basename(window.location.toString());
if (!toFilename)
toFilename = config.macros.upload.defaultToFilename;
if (!uploadDir)
uploadDir = config.macros.upload.defaultUploadDir;
if (!backupDir)
backupDir = config.macros.upload.defaultBackupDir;
// report error if still missing
if (!storeUrl) {
alert(config.macros.upload.messages.noStoreUrl);
clearMessage();
return false;
}
if (config.macros.upload.authenticateUser && (!username || !password)) {
alert(config.macros.upload.messages.usernameOrPasswordMissing);
clearMessage();
return false;
}
bidix.upload.uploadChanges(false,null,storeUrl, toFilename, uploadDir, backupDir, username, password);
return false;
};
config.macros.upload.destFile = function(storeUrl, toFilename, uploadDir)
{
if (!storeUrl)
return null;
var dest = bidix.dirname(storeUrl);
if (uploadDir && uploadDir != '.')
dest = dest + '/' + uploadDir;
dest = dest + '/' + toFilename;
return dest;
};
//
// uploadOptions Macro
//
config.macros.uploadOptions = {
handler: function(place,macroName,params) {
var wizard = new Wizard();
wizard.createWizard(place,this.wizardTitle);
wizard.addStep(this.step1Title,this.step1Html);
var markList = wizard.getElement("markList");
var listWrapper = document.createElement("div");
markList.parentNode.insertBefore(listWrapper,markList);
wizard.setValue("listWrapper",listWrapper);
this.refreshOptions(listWrapper,false);
var uploadCaption;
if (document.location.toString().substr(0,4) == "http")
uploadCaption = config.macros.upload.label.saveLabel;
else
uploadCaption = config.macros.upload.label.uploadLabel;
wizard.setButtons([
{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption,
onClick: config.macros.upload.action},
{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
]);
},
options: [
"txtUploadUserName",
"pasUploadPassword",
"txtUploadStoreUrl",
"txtUploadDir",
"txtUploadFilename",
"txtUploadBackupDir",
"chkUploadLog",
"txtUploadLogMaxLine"
],
refreshOptions: function(listWrapper) {
var opts = [];
for(i=0; i<this.options.length; i++) {
var opt = {};
opts.push();
opt.option = "";
n = this.options[i];
opt.name = n;
opt.lowlight = !config.optionsDesc[n];
opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
opts.push(opt);
}
var listview = ListView.create(listWrapper,opts,this.listViewTemplate);
for(n=0; n<opts.length; n++) {
var type = opts[n].name.substr(0,3);
var h = config.macros.option.types[type];
if (h && h.create) {
h.create(opts[n].colElements['option'],type,opts[n].name,opts[n].name,"no");
}
}
},
onCancel: function(e)
{
backstage.switchTab(null);
return false;
},
wizardTitle: "Upload with options",
step1Title: "These options are saved in cookies in your browser",
step1Html: "<input type='hidden' name='markList'></input><br>",
cancelButton: "Cancel",
cancelButtonPrompt: "Cancel prompt",
listViewTemplate: {
columns: [
{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
{name: 'Option', field: 'option', title: "Option", type: 'String'},
{name: 'Name', field: 'name', title: "Name", type: 'String'}
],
rowClasses: [
{className: 'lowlight', field: 'lowlight'}
]}
};
//
// upload functions
//
if (!bidix.upload) bidix.upload = {};
if (!bidix.upload.messages) bidix.upload.messages = {
//from saving
invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
backupSaved: "Backup saved",
backupFailed: "Failed to upload backup file",
rssSaved: "RSS feed uploaded",
rssFailed: "Failed to upload RSS feed file",
emptySaved: "Empty template uploaded",
emptyFailed: "Failed to upload empty template file",
mainSaved: "Main TiddlyWiki file uploaded",
mainFailed: "Failed to upload main TiddlyWiki file. Your changes have not been saved",
//specific upload
loadOriginalHttpPostError: "Can't get original file",
aboutToSaveOnHttpPost: 'About to upload on %0 ...',
storePhpNotFound: "The store script '%0' was not found."
};
bidix.upload.uploadChanges = function(onlyIfDirty,tiddlers,storeUrl,toFilename,uploadDir,backupDir,username,password)
{
var callback = function(status,uploadParams,original,url,xhr) {
if (!status) {
displayMessage(bidix.upload.messages.loadOriginalHttpPostError);
return;
}
if (bidix.debugMode)
alert(original.substr(0,500)+"\n...");
// Locate the storeArea div's
var posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
bidix.upload.uploadRss(uploadParams,original,posDiv);
};
if(onlyIfDirty && !store.isDirty())
return;
clearMessage();
// save on localdisk ?
if (document.location.toString().substr(0,4) == "file") {
var path = document.location.toString();
var localPath = getLocalPath(path);
saveChanges();
}
// get original
var uploadParams = new Array(storeUrl,toFilename,uploadDir,backupDir,username,password);
var originalPath = document.location.toString();
// If url is a directory : add index.html
if (originalPath.charAt(originalPath.length-1) == "/")
originalPath = originalPath + "index.html";
var dest = config.macros.upload.destFile(storeUrl,toFilename,uploadDir);
var log = new bidix.UploadLog();
log.startUpload(storeUrl, dest, uploadDir, backupDir);
displayMessage(bidix.upload.messages.aboutToSaveOnHttpPost.format([dest]));
if (bidix.debugMode)
alert("about to execute Http - GET on "+originalPath);
var r = doHttp("GET",originalPath,null,null,username,password,callback,uploadParams,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
bidix.upload.uploadRss = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
if(status) {
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.rssSaved,bidix.dirname(url)+'/'+destfile);
bidix.upload.uploadMain(params[0],params[1],params[2]);
} else {
displayMessage(bidix.upload.messages.rssFailed);
}
};
// do uploadRss
if(config.options.chkGenerateAnRssFeed) {
var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
var rssUploadParams = new Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
var rssString = generateRss();
// no UnicodeToUTF8 conversion needed when location is "file" !!!
if (document.location.toString().substr(0,4) != "file")
rssString = convertUnicodeToUTF8(rssString);
bidix.upload.httpUpload(rssUploadParams,rssString,callback,Array(uploadParams,original,posDiv));
} else {
bidix.upload.uploadMain(uploadParams,original,posDiv);
}
};
bidix.upload.uploadMain = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
var log = new bidix.UploadLog();
if(status) {
// if backupDir specified
if ((params[3]) && (responseText.indexOf("backupfile:") > -1)) {
var backupfile = responseText.substring(responseText.indexOf("backupfile:")+11,responseText.indexOf("\n", responseText.indexOf("backupfile:")));
displayMessage(bidix.upload.messages.backupSaved,bidix.dirname(url)+'/'+backupfile);
}
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.mainSaved,bidix.dirname(url)+'/'+destfile);
store.setDirty(false);
log.endUpload("ok");
} else {
alert(bidix.upload.messages.mainFailed);
displayMessage(bidix.upload.messages.mainFailed);
log.endUpload("failed");
}
};
// do uploadMain
var revised = bidix.upload.updateOriginal(original,posDiv);
bidix.upload.httpUpload(uploadParams,revised,callback,uploadParams);
};
bidix.upload.httpUpload = function(uploadParams,data,callback,params)
{
var localCallback = function(status,params,responseText,url,xhr) {
url = (url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1));
if (xhr.status == 404)
alert(bidix.upload.messages.storePhpNotFound.format([url]));
if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
alert(responseText);
if (responseText.indexOf("Debug mode") >= 0 )
responseText = responseText.substring(responseText.indexOf("\n\n")+2);
} else if (responseText.charAt(0) != '0')
alert(responseText);
if (responseText.charAt(0) != '0')
status = null;
callback(status,params,responseText,url,xhr);
};
// do httpUpload
var boundary = "---------------------------"+"AaB03x";
var uploadFormName = "UploadPlugin";
// compose headers data
var sheader = "";
sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
sheader += uploadFormName +"\"\r\n\r\n";
sheader += "backupDir="+uploadParams[3] +
";user=" + uploadParams[4] +
";password=" + uploadParams[5] +
";uploaddir=" + uploadParams[2];
if (bidix.debugMode)
sheader += ";debug=1";
sheader += ";;\r\n";
sheader += "\r\n" + "--" + boundary + "\r\n";
sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+uploadParams[1]+"\"\r\n";
sheader += "Content-Type: text/html;charset=UTF-8" + "\r\n";
sheader += "Content-Length: " + data.length + "\r\n\r\n";
// compose trailer data
var strailer = new String();
strailer = "\r\n--" + boundary + "--\r\n";
data = sheader + data + strailer;
if (bidix.debugMode) alert("about to execute Http - POST on "+uploadParams[0]+"\n with \n"+data.substr(0,500)+ " ... ");
var r = doHttp("POST",uploadParams[0],data,"multipart/form-data; ;charset=UTF-8; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
// same as Saving's updateOriginal but without convertUnicodeToUTF8 calls
bidix.upload.updateOriginal = function(original, posDiv)
{
if (!posDiv)
posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
store.allTiddlersAsHtml() + "\n" +
original.substr(posDiv[1]);
var newSiteTitle = getPageTitle().htmlEncode();
revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
revised = updateMarkupBlock(revised,"PRE-HEAD","MarkupPreHead");
revised = updateMarkupBlock(revised,"POST-HEAD","MarkupPostHead");
revised = updateMarkupBlock(revised,"PRE-BODY","MarkupPreBody");
revised = updateMarkupBlock(revised,"POST-SCRIPT","MarkupPostBody");
return revised;
};
//
// UploadLog
//
// config.options.chkUploadLog :
// false : no logging
// true : logging
// config.options.txtUploadLogMaxLine :
// -1 : no limit
// 0 : no Log lines but UploadLog is still in place
// n : the last n lines are only kept
// NaN : no limit (-1)
bidix.UploadLog = function() {
if (!config.options.chkUploadLog)
return; // this.tiddler = null
this.tiddler = store.getTiddler("UploadLog");
if (!this.tiddler) {
this.tiddler = new Tiddler();
this.tiddler.title = "UploadLog";
this.tiddler.text = "| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |";
this.tiddler.created = new Date();
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
}
return this;
};
bidix.UploadLog.prototype.addText = function(text) {
if (!this.tiddler)
return;
// retrieve maxLine when we need it
var maxLine = parseInt(config.options.txtUploadLogMaxLine,10);
if (isNaN(maxLine))
maxLine = -1;
// add text
if (maxLine != 0)
this.tiddler.text = this.tiddler.text + text;
// Trunck to maxLine
if (maxLine >= 0) {
var textArray = this.tiddler.text.split('\n');
if (textArray.length > maxLine + 1)
textArray.splice(1,textArray.length-1-maxLine);
this.tiddler.text = textArray.join('\n');
}
// update tiddler fields
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
// refresh and notifiy for immediate update
story.refreshTiddler(this.tiddler.title);
store.notify(this.tiddler.title, true);
};
bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {
if (!this.tiddler)
return;
var now = new Date();
var text = "\n| ";
var filename = bidix.basename(document.location.toString());
if (!filename) filename = '/';
text += now.formatString("0DD/0MM/YYYY 0hh:0mm:0ss") +" | ";
text += config.options.txtUserName + " | ";
text += "[["+filename+"|"+location + "]] |";
text += " [[" + bidix.basename(storeUrl) + "|" + storeUrl + "]] | ";
text += uploadDir + " | ";
text += "[[" + bidix.basename(toFilename) + " | " +toFilename + "]] | ";
text += backupDir + " |";
this.addText(text);
};
bidix.UploadLog.prototype.endUpload = function(status) {
if (!this.tiddler)
return;
this.addText(" "+status+" |");
};
//
// Utilities
//
bidix.checkPlugin = function(plugin, major, minor, revision) {
var ext = version.extensions[plugin];
if (!
(ext &&
((ext.major > major) ||
((ext.major == major) && (ext.minor > minor)) ||
((ext.major == major) && (ext.minor == minor) && (ext.revision >= revision))))) {
// write error in PluginManager
if (pluginInfo)
pluginInfo.log.push("Requires " + plugin + " " + major + "." + minor + "." + revision);
eval(plugin); // generate an error : "Error: ReferenceError: xxxx is not defined"
}
};
bidix.dirname = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(0, lastpos);
} else {
return filePath.substring(0, filePath.lastIndexOf("\\"));
}
};
bidix.basename = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("#")) != -1)
filePath = filePath.substring(0, lastpos);
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(lastpos + 1);
} else
return filePath.substring(filePath.lastIndexOf("\\")+1);
};
bidix.initOption = function(name,value) {
if (!config.options[name])
config.options[name] = value;
};
//
// Initializations
//
// require PasswordOptionPlugin 1.0.1 or better
bidix.checkPlugin("PasswordOptionPlugin", 1, 0, 1);
// styleSheet
setStylesheet('.txtUploadStoreUrl, .txtUploadBackupDir, .txtUploadDir {width: 22em;}',"uploadPluginStyles");
//optionsDesc
merge(config.optionsDesc,{
txtUploadStoreUrl: "Url of the UploadService script (default: store.php)",
txtUploadFilename: "Filename of the uploaded file (default: in index.html)",
txtUploadDir: "Relative Directory where to store the file (default: . (downloadService directory))",
txtUploadBackupDir: "Relative Directory where to backup the file. If empty no backup. (default: ''(empty))",
txtUploadUserName: "Upload Username",
pasUploadPassword: "Upload Password",
chkUploadLog: "do Logging in UploadLog (default: true)",
txtUploadLogMaxLine: "Maximum of lines in UploadLog (default: 10)"
});
// Options Initializations
bidix.initOption('txtUploadStoreUrl','');
bidix.initOption('txtUploadFilename','');
bidix.initOption('txtUploadDir','');
bidix.initOption('txtUploadBackupDir','');
bidix.initOption('txtUploadUserName','');
bidix.initOption('pasUploadPassword','');
bidix.initOption('chkUploadLog',true);
bidix.initOption('txtUploadLogMaxLine','10');
// Backstage
merge(config.tasks,{
uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}
});
config.backstageTasks.push("uploadOptions");
//}}}