J. Bradford DeLong's Blog, page 404

February 10, 2018

Jupyter Notebook Programming Dos and Don'ts: A Running List

What else should I add to this?



6a00e551f08003883401b7c90f49fb970b pi 710��326 pixels



Programming Dos and Don'ts: A Running List...



Do restart your kernel and run cells up to your current working point every fifteen minutes or so. Yes, it takes a little time. But if you don't, sooner or later the machine's namespace will get confused, and then you will get confused about the state of the machine's namespace, and by assuming things about it that are false you will lose hours and hours...


Do edit code cells by copying them below your current version and then working on the copy: when you break everything in the current cell (as you will), you can then go back to the old cell and start fresh...


Do exercise agile development practices: if there is a line of code that you have not tested, test it. The best way to test is to ask the machine to echo back to you the thing you have just created in its namespace to make sure that it is what you want it to be...


Do take screenshots of your error messages...


Do google your error messages: ms. google is your best friend here...


Do not confuse assignment ("=") and test for equality ("=="). In general, if there is an "if" anywhere nearby, you should be testing for equality. If there is not, you should be assignment a variable in your namespace to a value. Do curse the mathematicians 500 years ago who did not realize that in the twenty-first century it would be very convenient if we had different and not confusable symbols for equals-as-assignment and equals-as-test...

 •  0 comments  •  flag
Share on Twitter
Published on February 10, 2018 10:58

Should-Read: More economist self-flagellation and self-ju...

Should-Read: More economist self-flagellation and self-justification. I kinda think the discussion would be healthier if it recognized, as Samuel Jackson says in Pulp Fiction: "The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men...": Dan Davies, Simon Wren-Lewis, and Policy Sketchbook: "Saying nothing about the importance of financial linkages and imbalances because they didn't know they were there does not exactly get the profession off the hook!!!":




@dsquareddigest: A very large proportion of the economics profession should have said "our models are clearly inadequate so we will work hard on improving our understanding, in the meantime please listen to this small subset of us who appear to have been right".




@sjwrenlewis: A very large proportion of the economics profession said nothing about finance and the chance of a crisis, and that includes all the trade economists that should have been listened to over Brexit.



@dsquareddigest: Saying nothing about the importance of financial linkages and imbalances because they didn't know they were there does not exactly get the profession off the hook!!!



@policysketch: Isn't the comms challenge here to explain that there are some things we know and many we don't? A challenge made harder (to continue the medical analogy) by the fact that while some economists are giving out vaccinations and painkillers, others are treating dementia with leeches.



@dsquareddigest: The comms challenge is to understand that this is basically a marketing task trying to get our view over, not a settled science where we can just call people idiots for not listening to us. Not helped by the fact that economists like to call themselves "professionals", but reject all associated concepts of ethics, standards and discipline...


 •  0 comments  •  flag
Share on Twitter
Published on February 10, 2018 10:37

Should-Read: Ima gonna archive this to jeer at in the fut...

Should-Read: Ima gonna archive this to jeer at in the future! Yes. BitCoin is a bubble. It is a mania of irrational crowds. It is not a financial market that is serving as a rational social calculating mechanism. It is not a market in which prices are being set by rational von Neumann optimizing agents. It is not even a market with short-selling constraints in which rational speculators are exploiting a non-rational herd: John Cochrane: The Grumpy Economist: Bitcoin and Bubbles: "So, what's up with Bitcoin? Is it a 'bubble?' A mania of irrational crowds?...



...It strikes me as a fairly pure instance of a regularly occurring phenomenon in financial markets.... The convenience yield... it facilitates tax evasion, and allows for illegal voluntary transactions such as drugs and bribes.... On top of this "fundamental" demand, we can add a "speculative" demand.... You can make so much money in a volatile market over a week, if you get on the right side of volatility.... In sum, what's going on with Bitcoin seems to me like a perfectly "normal" phenomenon. Intersect a convenience yield and speculative demand with a temporarily limited supply, plus temporarily limited supply of substitutes, and limits on short-selling, and you get a price surge.... Other theories, such as madness of crowds, do not explain that correlation...----




A longer excerpt: John Cochrane: The Grumpy Economist: Bitcoin and Bubbles: "So, what's up with Bitcoin? Is it a 'bubble?' A mania of irrational crowds?...




...It strikes me as a fairly pure instance of a regularly occurring phenomenon in financial markets, one that encompasses some "excess valuations".... Let's think about "convenience yield." Why might someone be willing to hold bitcoins even though... we know pretty much for sure that within our lifetimes bitcoin will become worthless?.... Some of the convenience yield... is that it facilitates tax evasion, and allows for illegal voluntary transactions such as drugs and bribes. We can debate if that's good or bad.... This is the obvious "convenience yield" of bitcoin.... It's great for laundering money. And it's great for avoiding capital controls.... There is a perfectly rational demand for bitcoin as it is an excellent way to avoid both the beneficial and destructive attempts of governments to control economic activity and to grab wealth....



On top of this "fundamental" demand, we can add a "speculative" demand.... High prices come with volatile prices.... Someone speculating on bitcoin over a week cares little about its fundamental value.... You can make so much money in a volatile market over a week, if you get on the right side of volatility. Now to support a high price, you need restricted supply as well as demand. There are only so many bitcoins....



In sum, what's going on with Bitcoin seems to me like a perfectly "normal" phenomenon. Intersect a convenience yield and speculative demand with a temporarily limited supply, plus temporarily limited supply of substitutes, and limits on short-selling, and you get a price surge. It helps if there is a lot of asymmetric information or opinion to spur trading.... This view says that price surges only happen with restricted supply, and accompany price volatility, large trading volume, and short holding periods. That's a nice testable link, which seems to hold for bitcoin. And other theories, such as madness of crowds, no not explain that correlation...


 •  0 comments  •  flag
Share on Twitter
Published on February 10, 2018 10:24

Should-Read: Only three? I confess I do not expect the Ca...

Should-Read: Only three? I confess I do not expect the Cato Institute to ever release people from non-disclosure agreements, or accurately report summary statistics on numbers and total amount of bribes to remain silent: Think Tank Watch: Sex Scandal Rocks Cato Institute: "Here is more from Politico...




...Three former employees of the famed Cato Institute say they were sexually harassed by Ed Crane, the 73-year-old co-founder and president emeritus of the think tank and one of the most recognizable figures in the libertarian movement.... Asked her to take off her bra. Another said he compared her breasts to pornographic images on his computer. A third said he sent her an email on breast augmentation. Crane also settled an additional sexual harassment claim by a former employee in 2012.... Crane retains the title of president emeritus at Cato and was paid more than $400,000 annually from the powerful think tank in the years after he left, but a Cato spokesperson said his consulting contract has ended and he is no longer employed by the think tank....



Whenever a new crop of interns arrived, which happened three times a year, Cato would distribute headshots and short bios of the interns to staff. The handout was colloquially known by some men around the office as ���The Menu,��� according to two former Cato employees...



 •  0 comments  •  flag
Share on Twitter
Published on February 10, 2018 10:16

Should-Read: Max Roser: When will the world reach 'peak c...

Should-Read: Max Roser: When will the world reach 'peak child'?: "The world has probably not reached 'peak child' yet...



...However, we are likely very close to a long flat peak; the number of children in the world will not increase much more. We are close to the peak.... The number of children in the long-run will depend on how successful the world will be in providing education���in particular to women���in the short-run. This is because women that are better educated tend to have fewer children. If we are successful in providing accessible education for all in the near-term, there will be fewer children���and therefore less demand for education���in the future.... How the size of the population will change in different world regions. Crucial will be the African continent: fast development in Africa will slow down population growth, whereas slow development would leave African countries in an extended period of fast population growth. The latter scenario could see the African population growing 5-fold over the 21st century...




When will the world reach peak child Our World in Data



When will the world reach peak child Our World in Data



Younger than 15 in Africa

 •  0 comments  •  flag
Share on Twitter
Published on February 10, 2018 10:09

Should-Read: Hans and Ola Rosling: Author: Ignorance: "Th...

Should-Read: Hans and Ola Rosling: Author: Ignorance: "The mission of Gapminder Foundation is to fight devastating ignorance with a fact-based worldview that everyone can understand...



...We started the Ignorance Project to investigate what the public know and don���t know about basic global patterns and macro-trends. We use surveys to ask representative groups of people simple questions about key-aspects of global development.When we find large knowledge-gaps, we know what teaching materials we should develop. The first results from surveys in UK and Sweden were published in 2013. As the project evolves we will investigate many more countries. The test questions and results will be made freely available under Creative Commons Attribution License...


 •  0 comments  •  flag
Share on Twitter
Published on February 10, 2018 09:58

Should-Read: That the minority of academic economists who...

Should-Read: That the minority of academic economists who opposed fiscal stimulus from 2009-2011 were able to carry the day in the public sphere from 2010 on is a deep indictment of the economics profession���but more so of journalism, IMHO at least: Simon Wren-Lewis: Academic knowledge about economic policy is not just another opinion: "Why don���t we look at what has happened since the financial crisis...



Macroeconomists, having learnt the lessons of the 1930s, immediately recommended that policy makers do three things after the crisis: cut interest rates sharply, embark on fiscal stimulus and bailout banks. Policy makers took that advice in 2009, and as a result we avoided another Great Depression. Many said that rising government debt was sure to send interest rates on that debt rising: academic economists using basic ideas from Keynes said they would not and they were proved right. Many others said that Quantitative Easing (central banks creating money to buy government debt) would cause hyperinflation, but again academic economists looking at more modern New Keynesian models said that was nonsense and again they were right.



You might claim that in all this economists were just advocating what was obvious. The acid test came in and after 2010, when fiscal stimulus turned to austerity. What evidence we have suggests this move was opposed by a majority of academic economists, a majority that grew over time. There was a minority that supported austerity, at least for a time, and they gained a lot of publicity because politicians latched on to what they had to say. But the majority followed both textbook and state of art economics, and this majority was right. The recovery would have been stronger and faster if politicians had gone with this majority...


 •  0 comments  •  flag
Share on Twitter
Published on February 10, 2018 09:52

This Is Your Reminder...

Note to Self: This is your reminder:




178.4 180.8 million people are represented by the 48 49 senators who caucus with the Democrats.
144.1 141.7 million people are represented by the 52 51 senators who caucus with the Republicans.
65.9 million people voted for Hillary Rodham Clinton and Tim Kaine to be their president and vice president
63.0 million people voted for Donald Trump and Mike Pence to be their president and vice president.
 •  0 comments  •  flag
Share on Twitter
Published on February 10, 2018 00:17

This Is Your Reminder...

Note to Self: This is your reminder:




178.4 180.8 million people are represented by the 48 49 senators who caucus with the Democrats.
144.1 141.7 million people are represented by the 52 51 senators who caucus with the Republicans.
65.9 million people voted for Hillary Rodham Clinton and Tim Kaine to be their president and vice president
63.0 million people voted for Donald Trump and Mike Pence to be their president and vice president.
 •  0 comments  •  flag
Share on Twitter
Published on February 10, 2018 00:17

February 5, 2018

Should-Read: I think T.S. Eliot hit upon the reasons for ...

Should-Read: I think T.S. Eliot hit upon the reasons for the success of Deng Xiaping and Xi Jinping's "socialism with Chinese characteristics" back in the late 1940s: T.S. Eliot (1944): Rejection of Animal Farm:


DNN5vR4WsAAQIY7 jpg 1200��720 ����
DNN5vR4WsAAQIY7 jpg 1200��720 ����

 •  0 comments  •  flag
Share on Twitter
Published on February 05, 2018 13:28

J. Bradford DeLong's Blog

J. Bradford DeLong
J. Bradford DeLong isn't a Goodreads Author (yet), but they do have a blog, so here are some recent posts imported from their feed.
Follow J. Bradford DeLong's blog with rss.