<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}

a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}

h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}

.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}

.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}

.tabSelected {color:[[ColorPalette::PrimaryDark]];
	background:[[ColorPalette::TertiaryPale]];
	border-left:1px solid [[ColorPalette::TertiaryLight]];
	border-top:1px solid [[ColorPalette::TertiaryLight]];
	border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}

#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}

.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
	border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
	border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
	border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}

.wizard .notChanged {background:transparent;}
.wizard .changedLocally {background:#80ff80;}
.wizard .changedServer {background:#8080ff;}
.wizard .changedBoth {background:#ff8080;}
.wizard .notFound {background:#ffff80;}
.wizard .putToServer {background:#ff80ff;}
.wizard .gotFromServer {background:#80ffff;}

#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}

.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}

.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}

.tiddler .defaultCommand {font-weight:bold;}

.shadow .title {color:[[ColorPalette::TertiaryDark]];}

.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}

.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}

.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}

.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}

.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}

.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}

.imageLink, #displayArea .imageLink {background:transparent;}

.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}

.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}

.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}

.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}

.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}

.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}
.readOnly {background:[[ColorPalette::TertiaryPale]];}

#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:alpha(opacity=60);}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}

body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}

h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}

.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}

/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}

#mainMenu .tiddlyLinkExisting,
	#mainMenu .tiddlyLinkNonExisting,
	#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}

.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0 1em 1em; left:0; top:0;}

.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}

#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}

#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 0.3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

.wizard {padding:0.1em 1em 0 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0; margin:0.4em 0 0.2em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0 0; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0;}
.wizardFooter .status {padding:0 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em;}

#messageArea {position:fixed; top:2em; right:0; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em;}
#messageArea a {text-decoration:underline;}

.tiddlerPopupButton {padding:0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em; margin:0;}

.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}

.tabset {padding:1em 0 0 0.5em;}
.tab {margin:0 0 0 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}

#contentWrapper {display:block;}
#splashScreen {display:none;}

#displayArea {margin:1em 17em 0 14em;}

.toolbar {text-align:right; font-size:.9em;}

.tiddler {padding:1em 1em 0;}

.missing .viewer,.missing .title {font-style:italic;}

.title {font-size:1.6em; font-weight:bold;}

.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}

.tiddler .button {padding:0.2em 0.4em;}

.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}

.footer {font-size:.9em;}
.footer li {display:inline;}

.annotation {padding:0.5em; margin:0.5em;}

* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0 0.25em; padding:0 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}

.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0 3px 0 3px;}

.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}

.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0; font-size:.9em;}
.editorFooter .button {padding-top:0; padding-bottom:0;}

.fieldsetFix {border:0; padding:0; margin:1px 0px;}

.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}

* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0; right:0;}
#backstageButton a {padding:0.1em 0.4em; margin:0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin-left:3em; padding:1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}

.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none !important;}
#displayArea {margin: 1em 1em 0em;}
noscript {display:none;} /* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
}
/*}}}*/
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser excludeLists'></span></div>
<!--}}}-->
To get started with this blank [[TiddlyWiki]], you'll need to modify the following tiddlers:
* [[SiteTitle]] & [[SiteSubtitle]]: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* [[MainMenu]]: The menu (usually on the left)
* [[DefaultTiddlers]]: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
These [[InterfaceOptions]] for customising [[TiddlyWiki]] are saved in your browser

Your username for signing your edits. Write it as a [[WikiWord]] (eg [[JoeBloggs]])

<<option txtUserName>>
<<option chkSaveBackups>> [[SaveBackups]]
<<option chkAutoSave>> [[AutoSave]]
<<option chkRegExpSearch>> [[RegExpSearch]]
<<option chkCaseSensitiveSearch>> [[CaseSensitiveSearch]]
<<option chkAnimate>> [[EnableAnimations]]

----
Also see [[AdvancedOptions]]
<<importTiddlers>>
#I will be joining our Business School delegation to Moscow School of Management SKOLKOVO in October. The class on October 16 is cancelled and we will find a time later for a make-up class.
#I will go to Vienna in November to help EQUIS with an Accreditation Review. The class on Nov 13 is cancelled and we will find a time later for a make-up class.
[[Announcements]]
[[Problem Sets]]
[[Presentations]]
[[Syllabus]]

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. 
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&shy;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"
	});
*/
//}}}
!Session 1: November 26, 9am to 1pm
# Utsa Banerjee
**[[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#!]]
#DONG, Ding
**[[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]]
#HU, Xiaozhang
**[[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]]
#HUANG, Huang
**[[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]]
#LEE, Tsz Him
**[[Barro, R. J. (2013). Education and economic growth. Annals of Economics and Finance, 14(2), 301-328.|ftp://ftp.aefweb.net/WorkingPapers/w571.pdf]]
#LI, Hanrui
**[['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]]
!Session 2: November 26, 2pm to 6pm
#LIU, Yiyu
**[[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]]
#Lakshmi Naaraayanan 
**[[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]]
#QIN, Feng
**[[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]]
#QU, Bowen
**[[“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]]
#SO, Tse Kit
#WAN, Tsz Shing
**[[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]]
!Session 3: Regular class on November 27.
#WU, Saier
**[[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]]
#YAN, Jingda
**[[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]]
#YU, Jun
**[[ “Shi, S. (2015), Liquidity, assets and business cycles, Journal of Monetary Economics, 70, 116-132. |https://www.sciencedirect.com/science/article/pii/S0304393214001573]]
#ZHOU, Weixuan
**[[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]]
#ZHU, Wenjie
**[[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]]
[[Problem Set 1|http://pan.baidu.com/s/1mgK7DdY]]. Due September 18. (Please help notify each other)
[[Problem Set 2: |http://pan.baidu.com/s/1nIuFO]].                Dataset can be found [[here|http://ihome.ust.hk/~dxie/OnlineMacro/mrwdata.xls]]. Due Oct 9.
[[Problem Set 3: |http://pan.baidu.com/s/1i39OUOX]]. Due Oct 23.
[[Problem Set 4: |http://pan.baidu.com/s/1ntymV4P]]           Dataset can be found [[here|http://ihome.ust.hk/~dxie/Econ5250/HK.xlsx]]. Due Nov 20.
[[Sample Final Exam Questions|http://pan.baidu.com/s/1bnENVmn]]
Danyang Xie, HKUST
Advanced Macroeconomics
''Advanced Macroeconomics
Course Website: http://advmacro.tiddlyspot.com/
Fall 2017
Instructor: Danyang Xie, danyang.xie@gmail.com
Office Hours: Friday 1:30 pm to 3:30 pm or by appointment
TA: Jialiang LIN

	
!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:
#Blanchard Olivier, "What Do We Know about Macroeconomics that Fisher and Wicksell did not?" Quarterly Journal of Economics, 2000.
#Woodford Michael,"Revolution and Evolution in ~Twentieth-Century Macroeconomics," 1999.
#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]]
#[[John Cochrane, "How Did Paul Krugman Get it So Wrong." 2009]] 

!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. 2013 or more recent; 2. related to the topics covered; 3. a Google citation above 50.) @@ ''Please download the article to your cloud drive and send the link to the TA. Section G contains some of the selections by my previous students.'' 

!Topics and Readings 

''An Introduction and Math Preparation''
*[[Major Development in Macroeconomics|http://pan.baidu.com/s/1i3Jrgwd]]
*[[Chapter 17|http://pan.baidu.com/s/1gdl5nbH]]
*[[Heuristic Derivation of Hamiltonian Approach|http://pan.baidu.com/s/1hqws6bU]]

''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://pan.baidu.com/s/1eQtF4bC]]
*[[Backward Shooting: Mathcad Program|http://pan.baidu.com/s/1c0sxDOs]]
*[[Chapter 19|http://pan.baidu.com/s/1bniqszX]]
*[[Chapter 20|http://pan.baidu.com/s/1kTqh5Mf]]
[[Romer, Paul “Increasing Returns and Long Run Growth,” Journal of Political Economy, Vol. 94, 1986:1002-1037.|http://pan.baidu.com/s/1i30uVGD]]
[[Xie, Danyang “Increasing Returns and Increasing Rates of Growth,” Journal of Political Economy, April, 1991: 429-435.|http://pan.baidu.com/s/1qW0gHmG]]

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://pan.baidu.com/s/1sjnn3a9]]
[[Xie Danyang “Divergence in Economic Performance: Transitional Dynamics with Multiple Equilibria,” Journal of Economic Theory, Vol. 63, June, 1994: 97-112.|http://pan.baidu.com/s/1i32wSb7]]
[[Romer, Paul “Endogenous Technological Change,” Journal of Political Economy, Vol. 98, 1990: ~S71-S102.|http://pan.baidu.com/s/1dDGclvr]]
*[[Notes on Romer 1990|http://pan.baidu.com/s/1hqJtP2k]]
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://pan.baidu.com/s/1pJz2YBx]] Journal of Monetary Economics, April, 1998.

A.5. Structural Change and Economic Growth 

[[Kongsamut Piyabha, Sergio Rebelo and D. Xie, “Beyond Balanced Growth,”|http://pan.baidu.com/s/1gd3hblL]] Review of Economic Studies, Vol. 68, November, 2001: 869-882. I will try to make this an example of ''5-Minute Presentation''.
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 Emprics of Economic Growth,” Quarterly Journal of Economics, 107 (1992), 407-438.|http://pan.baidu.com/s/1pJi7ZD5]]
*[[Note on MRW|http://pan.baidu.com/s/1ntBcyc5]], [[The derivation of item 20 in the Note on MRW|http://ihome.ust.hk/~dxie/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://ihome.ust.hk/~dxie/Econ5250/bernanke on mrw.pdf]]
[[Note on Bernanke and Gurkaynak]]

	
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://ihome.ust.hk/~dxie/Econ5250/Introduction to RBC.pdf]] and [[An example of the use of HP Filter|http://ihome.ust.hk/~dxie/Econ5250/SP500 HP Filter.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|http://www.sciencedirect.com/science/article/pii/S0304393206001772]]
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://pan.baidu.com/s/1eQsufdS]]
[[Flavin Marjorie “The Adjustment of Consumption to Changing Expectations about Future Income,” Journal of Political Economy, Vol. 89 October 1981: 974-1009.|http://pan.baidu.com/s/1c0H0ElU]]	
[[Campbell and Deaton “Why Is Consumption Too Smooth?” Review of Economic Studies, Vol. 56, 1989: 357-374.|http://pan.baidu.com/s/1dDnCyyt]]	
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://pan.baidu.com/s/1jGC4HgE]]
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://pan.baidu.com/s/1GiNYA]]
[[Note on Habit Formation|http://pan.baidu.com/s/1ntz7uWx]]
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 theBusiness 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]]
/***
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?// &nbsp;&nbsp;@@ 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// &nbsp;&nbsp;@@ 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// &nbsp;&nbsp;@@ 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!// &nbsp;&nbsp;@@ 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 :)// &nbsp;&nbsp;@@ 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 |
| 03/11/2017 09:23:42 | XIE Danyang | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . | ok |
| 03/11/2017 10:21:26 | XIE Danyang | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . |
| 06/11/2017 09:56:45 | XIE Danyang | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . | ok |
| 06/11/2017 10:02:29 | XIE Danyang | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . | ok |
| 06/11/2017 12:30:34 | XIE Danyang | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . |
| 20/11/2017 10:36:41 | XIE Danyang | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . | ok |
| 20/11/2017 10:40:06 | XIE Danyang | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . | ok |
| 20/11/2017 10:49:07 | XIE Danyang | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . |
| 20/11/2017 10:52:34 | XIE Danyang | [[/|http://advmacro.tiddlyspot.com/]] | [[store.cgi|http://advmacro.tiddlyspot.com/store.cgi]] | . | [[index.html | http://advmacro.tiddlyspot.com/index.html]] | . |
| 20/11/2017 13:41:29 | XIE Danyang | [[/|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");


//}}}