Thursday, October 31, 2013

Detecting an Unfair Die with Bayes’ Theorem | The Chemical Statistician

Detecting an Unfair Die with Bayes’ Theorem | The Chemical Statistician:

"An occasionally dishonest casino uses 2 types of dice.  Of its dice, 97% are fair but 3% are unfair, and a “five” comes up 35% of the time for these unfair dice.  If you pick a die randomly and roll it, how many “fives”  in a row would you need to see before it was most likely that you had picked an unfair die?”"

This is the same problem of identifying the correct regime that should use a Hidden Markov Model to detect which is the most likely.  This is the same problem that will seek to identify the state of the Minsky cycle by looking at the returns that are recorded in the carry trade.

Wednesday, October 30, 2013

Using Chaos Theory to Predict and Prevent Catastrophic 'Dragon King' Events - Wired Science

Using Chaos Theory to Predict and Prevent Catastrophic 'Dragon King' Events - Wired Science:

"Dragon king events may be freakish, but they are not freakishly rare. In fact they occur much more frequently than you would expect. Small fluctuations in the stock market happen all the time and very large ones rarely. But a dragon-king-type stock market drop would be one that was both extremely large and occurred somewhat regularly. It would be like seeing a once-in-a-century stock market crash every decade or so."

The dragon is an unusual animal as if the wealth of a king.  These outliers may be explained by the particular circumstances in chaotic systems that cause occasional, unusual activity.

"Even more interestingly, the researchers found that dragon king events displayed characteristic signals announcing their approach (they could only occur when the two circuits were on the “body” of the strange attractor butterfly). Knowing that a dragon king was coming, they could apply tiny perturbations to make sure the circuits stayed in sync. In essence, they could forecast the arrival of a catastrophic event and suppress it, prevent it from occurring".

Wednesday, October 23, 2013

The demise of Knight Capital

Python Sweetness on How to lose $172,222 a second for 45 minutes:

"How to lose $172,222 a second for 45 minutes This is probably the most painful bug report I’ve ever read, describing in glorious technicolor the steps leading to Knight Capital’s $465m trading loss due to a software bug that struck late last year, effectively bankrupting the company.  The tale has all the hallmarks of technical debt in a huge, unmaintained, bitrotten codebase (the bug itself due to code that hadn’t been used for 8 years), and a really poor, undisciplined devops story."


Tuesday, October 22, 2013

Crisis models of boom and bust

Vox asks Could an early warning system have predicted the crisis? | vox:

 "In a recent paper, we empirically model the cross-country incidence of the financial crisis (Rose and Spiegel 2009). Because the time-series component of an early warning system has proven harder to predict, we view the ability to predict relative performance in the cross section as a necessary, but not sufficient, condition for early warning models to be successful. We estimate a “MIMIC” (Multiple-Indicator Multiple Cause) model (Goldberger 1972), which we apply to a cross-sectional data set of 107 countries. The MIMIC specification explicitly acknowledges that the severity of a financial crisis is a continuous, rather than a discrete phenomenon, and one that can only be observed with error."
There is more work here and here that may be useful

This may be one way to look at the Minsky model and the bank lending model that will flow from it.

When did “How I Met Your Mother” become less legen.. wait for it… | Data and Analysis with R, for Work and Fun

When did “How I Met Your Mother” become less legen.. wait for it… | Data and Analysis with R, for Work and Fun:

"Enter IMDB average user ratings of every episode of How I Met Your Mother (until season 9, episode 5).  Once I brought up the page showing rated episodes by date, I simply copy and pasted the table into LibreOffice Calc, saved it as a csv, and then loaded it into R.  As you can see in DiffusePrioR’s post (and also in mine), the purpose of the changepoint package is to find changepoints, or abrupt baseline shifts, in your data."

Looking at the structural change in the data. This may be something that can be used in the regime-change paper.  At what point did things change?  What was happening then?

Monday, October 14, 2013

Why Microsoft Word must Die - Charlie's Diary

Monopoly power Why Microsoft Word must Die - Charlie's Diary:

 "I hate Microsoft Word. I want Microsoft Word to die. I hate Microsoft Word with a burning, fiery passion. I hate Microsoft Word the way Winston Smith hated Big Brother. Our reasons are, alarmingly, not dissimilar ..."

'via Blog this'

Sunday, October 13, 2013

UK house price

Lots from Joe's Data Diner: on UK house prices, including the link to the data.  This is something that can be used to assess the ratio of house prices to income and the question of whether this is a measure that can identify the points where the market is overvalued.

"There seems nothing the British press likes more than a good house price story. Both the OECD and 'The Economist' studies quoted in The Telegraph recently use the house price to household income ratio as a consideration of affordability and sustainability of the market. Most often this is a ratio of average house prices to average incomes; I keep wondering if this ratio is itself a function of income? What follows is a first (and not that rigorous!) look at this idea."

Do extremes tell us something about future prices?

Saturday, October 12, 2013

Review: What Happened to Goldman Sachs - WSJ.com

Another look at how investment banks changed after the abandonment of partnership.  This is a book review that is behind a paywall.  However, the book may be worth the read.

Review: What Happened to Goldman Sachs - WSJ.com: "The year after Goldman Sachs went public in 1999, the investment bank threw a raucous party for clients at the Venetian Hotel on the Las Vegas Strip. Girls in high heels served candy and cigars while synchronized swimmers performed in the pool. Jay Leno was flown in for a private show. Traders bet tens of thousands of dollars on single hands of poker downstairs in the casino. It was one heck of a party. (Full disclosure: I attended as a rube analyst at the firm.)
It was also a very un-Goldman-like event. A private partnership since 1869, the bank had ..."

Wednesday, October 09, 2013

Poisson or Binomial distribution?

When to use the Poisson or Binomial distribution?:

"If a mean or average probability of an event happening per unit time/per page/per mile cycled etc., is given, and you are asked to calculate a probability of n events happening in a given time/number of pages/number of miles cycled, then the Poisson Distribution is used.

If, on the other hand, an exact probability of an event happening is given, or implied, in the question, and you are asked to calculate the probability of this event happening k times out of n, then the Binomial Distribution must be used."

(Adapted from this page).  Therefore, if there is on average 2 bank failures per month, what is the probability that there are no bank failures in a month?
Poission Distribution (lambda t) = (2 errors per page * 1 page) = 2.
Hence P0 = 2^0/0! * exp(-2) = 0.135

There are 20 banks in a state, the probability of one going bust is 0.1.  What is the probability of losing two banks?

Here it is binomial with n = 20.   Expand (q + p)^20
q^20 + 20 q^19 p + 20(20-1)/2! q^18 P^2  + ...

So P(2) = 20(20-1)/2! q^18 p^2 = 0.285.

Tuesday, October 08, 2013

Light sweet saturation and a malinvestment *alert* | FT Alphaville

FT Alphaville: The origin of the US oil 'glut'.

"In other words, oil prices were simply not high enough to justify energy investment during that period. The industry had to squeeze itself to make the investment case compelling enough to attract all that surplus capital. It was only when oil prices soared to 2008 record levels, that enough of the risk was removed to once again attract capital to the sector."


Monday, October 07, 2013

Understanding Society: Issues about microfoundations

An overview of microfoundations:

"A microfoundation is something like this: an account of the mechanisms at the individual actor level (and perhaps at levels intermediate between actors and the current level -- e.g. institutions) that work to create the structural and causal properties that we observe at the meso or macro level. A fully specified microfoundational account of a meso-level feature consists of an account that traces out (1) the features of the actors and (2) the characteristics of the action environment (including norms and institutions) which jointly lead to (3) the social pattern or causal power we are interested in. A microfoundation specifies the individual-level mechanisms that lead to the macro- or meso-level social fact. This is the kind of account that Thomas Schelling illustrates so well in Micromotives and Macrobehavior."

A contrast to the ideas of emergence, the belief that the sum is greater than the parts '

Saturday, October 05, 2013

How traffic actually works

How traffic actually works: "At the risk of being helpful, here are some things YOU can do that are actually guaranteed to improve commute times for everyone:

Drive a shorter car.
Don’t let people merge in front of you, ever.
Don’t drive during rush hour.
Move to New York. Seriously, no one owns a car here. It’s great. I don’t even know why I’m writing this.
Bye!"

'via Blog this'

Thursday, October 03, 2013

Millisecond data disputes, part 2.0000000100 | FT Alphaville

FT Alphaville, overview of the dissemination debate:

"Does ‘other dissemination’ mean that the decision can be sent to other internal servers run by news organisations? That seems to be the key question, and we suspect there will be more clarity coming on the matter now that this episode has received so much attention.
In any case, it seems that a broader discussion needs to be had about how markets have evolved, and about how their evolution affects the release of public and private data to the market."

Background and information about the question of whether news agencies have been releasing news about Fed decisions from New York or from New York AND Chicago.

Wednesday, October 02, 2013

Scott E.D. Skyrm » 10 Events That Changed The Repo Market

Scott E.D. Skyrm » 10 Events That Changed The Repo Market:

The history of repo

Hedge funds becoming more interested in repo.

Link to FT article.

What I saw as a Wall Street trader

What I saw as a Wall Street trader: a culture of bad behaviour | Business  The most interesting is the way that the investment banking partnerships turned into monsters owned by a disparate range of diversified funds with little interest in the minutia of what is going on.

"In my final years many of my last trades were approved by – well, I don't really know what they looked like, since most conversations were held over the phone. Sometimes it would be a gentleman with an Indian accent. Sometimes it was a nervous-sounding man in a satellite office somewhere. For six sweet months it was nobody: I had fallen between administrative cracks in a reshuffle. I set my own limits for trades.

Now each person is a small cog in the larger whole but there is no ownership or responsibility.

Tuesday, October 01, 2013

Saltation level and Avalanche

Saltation layer in avalanche adds weight and momentum to the avalanche models. This layer is from the Latin "saltus" meaning "leap".  Solids are picked up by the flow and transported forwards.  The solid objects are pulled off the ground level and become part of the fluid.  This adds to the mass and increases the power.