Saturday, November 19, 2016

Katsuyama and Flash Boys

The ebullient Brad Katsuyama recently spoke at University of Toronto. It was a wonderful talk, and here are some reflections on what I learned. (Any errors are of course due to my own misunderstanding.)

Why Stock Exchanges Weren't Fair
Brad Katsuyama became my hero when I read Michael Lewis' riveting book Flash Boys.The book describes how Katsuyama, a Canadian working for RBC in New York, discerned how stock exchanges are not unbiased referees in the markets. He would observe the price of a stock, place an order, and, consistently, the fill price would be higher. It was only a small increase, but still, it shouldn't have been there.

Katsuyama initiated a detective hunt to figure out why this was happening. He pieced together that the exchanges had huge conflicts of interest: their  profits at stake motivate them to tilt the odds in favour of their best customers, the high frequency traders.

Traders have many choices of where to places their trades, putting the exchanges in competition with each other. Exchanges entice brokers to place trades with them by giving the brokers rebates. These rebates stayed in the pockets of the traders not the customers on whose behalf they were trading. In order to force traders to choose the best price, not the exchange which offers the best rebate, new regulations were introduced. These regulations required a trader to take up the cheapest offer price when placing an order for shares.

The Law of Unintended Consequences
The regulation had a totally unintended consequence. Suppose you're a trader wanting to buy 100,000 shares of Microsoft.  Large buys like this get filled with purchases on many different exchanges. Before placing your order, you determine the price on your trading terminal - say it's X. But high frequency traders have laid a trap for you - on one exchange they  offer to sell 5,000 shares at, say, 'X minus a tiny little bit'. As a buyer, you buy those shares because they're the cheapest available and because regulations require you to buy at the cheapest price for your customer. But you still have most of your order left to fill - 95,000 shares.

The high frequency traders, knowing about this demand, rush around to other exchanges to buy shares at the quote price X. This demand pushes up the price of Microsoft. By the time you arrive to complete your purchase of 95,000 shares, the price has risen to 'X plus a little bit'. The high frequency trader has bought at X and sold at 'X plus a little bit', a tactic called front running. Thus he's made 95,000 times 'a little bit' in profit. For the original baiting trade, it only cost him 5,000 times 'a tiny little bit' to set this up.

We're Talking Billionths of a Second
You might ask how these high frequency traders beat the buyer to those other exchanges. Well, the laws of physics are at work. Distance travelled equals time. The closer you are to the exchange, the faster your messages get there. Flash Boys opens with a description of cable being laid in an obsessively straight line to minimize transmission time from Chicago to New York. It's a stealth operation so that the land rights sellers don't realize just how valuable their particular piece of land is. Builders don't want the cable to deviate even a foot from the optimum route.

Of course, the best place to be is right in the computer room of the stock exchange. So stock exchanges charge big bucks for you to co-located your computers within their computer room. It takes a billionth of a second to travel over 11.8 inches of cable. So the closer you get to the exchange's computer, the faster you can trade. In order to be able to sell space to many different players, the exchanges introduce the exact amount of coiled cable between a customer and their computer so that all the customers buying space in the room have exactly the same arrival time at the exchange's computers.

The business of selling computer room real estate is hugely profitable for the exchanges, and accounts for their conflict of interest. It behooves them to cater to the high frequency traders - the flash boys - who account for the majority of their profit. The exchanges also make a lot of money selling data, with the high frequency traders again being their best customers.

Feeling the Pain - First Step in Addressing A Problem
Katsuyama says he would never have tackled this problem if he himself hadn't experienced the pain of getting dinged on his own trades. When he first arrived in New York in 2006, he could get his whole order of 100,000 shares filled at the quote price X. Every year, the proportion of the order filled at the quoted price X kept dropping. By 2009, he observed that he could only get about 60,000 of his desired 100,000 filled at the original price X. (Note that I exaggerated the proportions in my example above to emphasize the point.)

Katsuyama didn't initially understand this. But he was a humble and indefatigable searcher for truth.  He was willing to admit his own ignorance and doggedly talked to many people who did understand these things until he figured out what was going on. He had taken the job as Manager of the Algorithmic Programming Team based on the assurance from RBC that he would have a free hand in hiring the best people.  He doesn't think he'd have had the persistence for his painstaking research if he hadn't felt the pain himself. He didn't say this, but I think he was also motivated by his innate sense of fairness which was offended by the way the market was working.

Thinking Differently
Once he understood what was going on, Katsuyama concluded that there was no way RBC could win in this rigged market. Because RBC was trading on behalf of customers, there were checks and balances in the system that would always make them slower than the flash boys. RBC took about 2 milliseconds, whereas the HFT guys were taking 476 microseconds: they'd always be four times faster than RBC.

He'd read Michael Lewis' previous book, Moneyball, which described Billy Bean's unorthodox approach to making the Oakland As a successful team despite the disparity in their budget. It all came down to thinking differently. He decided to apply this lesson to the financial markets.

Katsuyama concluded that the key for RBC was to get slower. Introduce delays in your messages to all the different exchanges so that your offers arrive at the same time and the flash boys can't front run you. In my innovation courses, I call this Letting Go Of What You Know. If the industry 'knows' that the way to succeed is to get ever faster, let's get slower! Selectively slower. Insert a delay into the orders to the closest exchanges so that all your orders arrive simultaneously at all exchanges. Suddenly, you're seeing 100% of your trades getting executed at the original offer price X. A diagram in Wikipedia explains it very simply:

Start trading this way, tell your customers about it, and in one year RBC moves in the trading rankings from #19 to #1.

So what do you do about it? IEX
Now that Katsuyama has untangled the secret of the market, he faces several fundamental choices: stay at RBC and help their customers get fair trades, get very rich by becoming a flash boy himself or reform the entire market by publicizing what he's learned.  

Katsuyama choose the third option and decided to create a new exchange. He has to leave RBC to do this, and the great people he's hired there follow him. They call it the Investors Exchange and it is designed to be fair, simple and transparent. No co-location. No fees for trading data. An even playing field for everybody.

IEX started as an 'alternative stock exchange' but soon reached volumes that required it to get approved by the SEC as a full exchange. Naturally there was lots of opposition from the incumbents, the exchanges and the high frequency traders; IEX was attacking their livelihood. 

Katsuyama described this as Diffuse Harm, Concentrated Benefit. For the exchanges and high frequency traders, there was a lot at stake and they were prepared to fight hard; for the ordinary traders, it was just about fractions of a cent, and there were more important issues for them to worry about. Nevertheless, mostly because of the Flash Boys book, the SEC received more input supporting IEX's application than in their total history before. In the end, the exchanges' insertion of cable in their own computer rooms (to equalizes things for all those who'd bought colocation) set a precedent for the equalization that IEX was imposing and so IEX won the day.

Did Being Canadian Make A Difference?
At the presentation, I asked a question of Katsuyama. I started by saying that, when reading Flash Boys, I'd been incredibly proud that he was Canadian. The audience - a completely packed room - burst into spontaneous, exuberant applause. (The Economist had just put Canada on the front cover as an example to the world. It was US election day and the extent of Trumptastrophe was not yet known.)

Katsuyama, with typical modesty, said he didn't spend much time thinking about himself, but Michael Lewis did feel that only a Canadian would have reacted the way he did - seeking to make the world a better place by creating a level playing field, rather than seeking personal profit. You could almost feel a maple leaf tattoo mystically appearing on everyone's forehead!

Flash Boys the book
I would put this book on your must-read list. It reads like a suspense novel, with high frequency traders as sinister predators and the boyish, charismatic, unassuming Katsuyama as the hero. Lewis explains the technical and financial details clearly. He brings the characters to life. It's just an enjoyable read in every way.

For my other book reviews, click here.

Wednesday, November 9, 2016

What's in a Word: Describing a President

Abhorent. Appalling. Arrogant. Belligerent. Bigoted. Blowhard. Blustering. Braggart. Brash. Buffoon. Bully. Cheating. Deceitful. Delusional. Demagogue. Despicable. Egomaniac. Fascist. Fearmongering. Grotesque. Hyperbolist. Hypersensitive. Ignorant. Immoral. Impulsive. Irrational. Jerk. Lascivious. Lacking in judgement. Lying. Megalomaniac. Misinformed. Misogynist. Morally bankrupt. Narcissistic. Obnoxious. Racist. Reckless. Scary. Scumbag.  Sleazeball. Temperamental. Terrifying. Thuggish. Unqualified. Unreliable. Unsuitable. Untrustworthy. Vengeful. Vulgar. Wicked. Windbag. Xenophobic. Just plain awful.

Unelectable. Not so much.

Other 'What's in a Word' Posts:

Tuesday, August 30, 2016

The Gene: An Intimate History

The Gene is the engrossing, insightful, educational, suspenseful, thought-provoking, disturbing, unnerving, even chilling history of genetics.  Un-put-down-able. This is a book I may read twice. You should read it at least once (at least IMHO).

This book is bursting with information about the evolution of genetics from the seeds of Darwin and Mendel up to 2015, told in a clear, understandable, exciting way. It reminded me why I almost majored in genetics. The descriptions of dogged efforts to move one painstaking step forward over the course of a decade(!) make me relieved I chose a field with more immediate gratifications.

The book juxtaposes the spectacular advances of science with social and moral issues such as eugenics.  By coolly pointing out the ramifications of each step along the way, he induces a sense of wonder but also foreboding. For instance, the description of the American eugenics movement makes current US politics - with a sociopathic racist running for President with the support of a disturbing proportion of the population - even more terrifying. Of course, given the American eugenics sterilization schemes of the 1920s, Mukerjee might not be here to sound the alarm; his family had the wrong skin colour and a familial history of schizophrenia. By the way, Mukerjee scrupulously omits explicit mention of this fact. 

Mukerjee has a scintillating writing style. His vivid descriptions of the people involved and the evocative settings where major advances took place bring the book to life and made me marvel at his command of the language. He considers why different words were chosen and the implications of those choices. What a treat to find such scientific insight and writing skill in one person. I must confess I had to consult a dictionary a few times, and not just for scientific or medical terms. But when I found the word, it was clear it wasn’t there to show off, but to deliver exactly the right nuance of meaning.

There were several themes in this book that will keep me thinking for a while. You might see some of them turning up in future posts.

P. S. For past book reviews check here. If you like this book I think you'd like The Immortal Life of Henrietta Lacks and Curiosity.

Friday, August 5, 2016

Three Psychological Thrillers

Pamela Paul, editor of The New York Times Book Review section, recently wrote "In my future life, I will spend entire weekends lying in a hammock by some idyllic lakeside, cooly reading thriller after thriller".  Pamela, for me, the future is here. The idyllic lake is Six Mile Lake in the Muskokas north of Toronto, the hammock is from Lee Valley and the thrillers are many and varied. I've recommended many thrillers that I've enjoyed in past book reviews (you can find the complete list of my book reviews here).

It seems like yesterday, but the blockbuster psychological thriller Gone Girl erupted onto the scene fully six years ago with the movie following a couple of years later. The Girl on the Train followed three years later, was again a blockbuster success with a similar formula, and is soon to be a movie. This year's contribution to the genre is I Let You Go. How much do you want to bet there's a movie coming about this too?

I would recommend all these books for lakeside hammock reading. They all have engrossing plots guaranteed to keep you from snoozing off in that oh-so-comfy hammock!

For past reviews of other books, check the list of my reviews here.

Thursday, July 28, 2016

Panama Papers - the back story

A deluge of 40 years' worth of records - emails, account records, spreadsheets - about offshore companies from around the globe, leaked by an anonymous John Doe. They described the financial machinations, some legal some not, orchestrated by Mossack Fonesta, a law firm in Panama. Mossack Fonesta set up secretive offshore companies in a system that at the very least represented aggressive tax sheltering just within the law, to shadow companies to hide the fruits of crime and corruption.

The leak comprised 11.5 million documents including 4.8M emails, 2M PDFs, and 1M images. 2.6 terabytes* of data in all. Put that up against a newspaper industry ravaged by the onslaught of online advertising with investigative journalism resources in radical decline because of those financial pressures. In such an environment, how could one possibly investigate these documents fully?

Gerard Ryle
The German newspaper German Süddeutsche Zeitung initially received all this material. Faced with a task far beyond their own resources, they contacted International Consortium of Investigative Journalists for help. What happened next is a remarkable story.  At the recent TED Summit Gerald Ryle, head of the ICIJ, told us that story. A marvel of collaboration unfolded. The handful of journalists at the ICIJ were joined by 350 journalists from over 100 media companies in 80 different countries who brought 'native eyes to bear on native names'. The data was stored in a huge database and sophisticated software helped uncover links and cross references, based on nationality, industry, or themes such as sports or blood diamonds. Nobody met in person and communication was through online encrypted messages. It was a monumental task and 'a milestone in the use of data journalism software tools and mobile collaboration'**.

What makes this story even more remarkable is the fact this disparate group of media players, whose corporate DNA was based on 'getting the scoop', did this work in total secrecy. The worked for over a year, without pay, without breaking ranks. Ryle described the constant persuasion required to maintain secrecy. As Ryle put it, "the greatest noise had to be preceded by the greatest silence"As other events were unfolding - in Brazil or around FIFA for instance - whose coverage could have been bolstered by reference to the Panama Papers, journalists begged to release the news. But the confidentiality agreements held. The news was published simultaneously in 76 countries on April 3 2016, along with many of the original documents. We all know the story of the fallout of these papers, up to the resignation of Iceland's prime minister. The back story is almost as interesting.

It was a wonderful heartwarming story told by a quiet man clearly more comfortable with writing words than in speaking them (watch his talk here). He was encouraged with applause from the audience during several stumbles in his talk; that was a great habit started by the TED Fellows (see more about the TED Fellow here).

* 1 terabyte equals 1,024 gigabytes. That's a lot of data!
** quoted from Wikipedia

Thursday, July 21, 2016

Julia Bracha

Make conflicts less violent; have more women in public life. This was the thought-provoking thesis of Julia Bracha in her TED Summit talk.

Her contention runs like this. Since it's futile to try to eliminate all conflicts, what we should be trying to do is to make them less violent. Nonviolent campaigns have two big advantages.  Fewer people are hurt or killed and less infrastructure is destroyed, infrastructure that might be key to recovery after conflict. They also tend to be more successful. And the best predictor of which tactics will prevail (violent or non-violent) is the ideology regarding women in public life. In her research, movements with women in leadership roles have succeeded more often: 53-27*.

It's not that women are less involved in conflicts. It's that they are talented in exercising power and influence nonviolently in the background. Because men are the public face of resistance, we often miss women's quieter, and highly effective, role in the background. Bracha pointed to influential women like Septima Clark in the US civil rights movement who emphasized literacy and education.

The media often underestimates the influence of women in Arab and Muslim communities. Consider the 1st Intifada, where media coverage focused on rocks being thrown at tanks. However 97% of the activities in that Intifada were non-violent tactics (like strikes for instance), and the women were calling the shots in those efforts.

Bracha's film wonderful Budrus, which I saw and loved at Toronto's Hot Docs Festival (reviewed here) highlighted the efforts of the women of the town of Budrus. Budrus was fighting the Israeli security fence, which was slated to go into Palestinian territory and bulldoze olive trees which were their livelihood. The 15-year-old girl who was an inspiration in the battle ultimately planted herself in front of a bulldozer. With the help of Israeli liberals, the Israelis relented and moved the wall to the boundary between Israeli and Palestinian territory instead of its planned incursion into Palestinian territory.

* not sure of the source of this statistic

Friday, July 15, 2016

Tepperman and the Fix

Jonathon Tepperman, the managing editor of Foreign Affairs, exhorted us to temper our pessimism over the doom and gloom induced by our daily media diet. In his upcoming book, The Fix: How Nations Survive and Thrive in a World in Decline, he describes countries with good news stories.  Tepperman feels these countries offer lessons that could be extrapolated elsewhere. This talk followed right on the heels of the uplifting talk by Monica Araya (described here), in this roundly optimistic session. 

Instead of cramming too many examples into his talk, Tepperman chose three to focus on. (Bravo for this approach.)


Tepperman started by describing Canada’s immigration policy as brave and successful. In the late 60s, Pierre Trudeau, the current prime minister’s father, pulled off a great coup of progressive transformation. Unlike many countries, Canada, a vast land with a small population, actually needed more people to thrive. Past race-based immigration policy had only admitted white Europeans and this wasn’t working any more because those waves of immigrants were drying up as recovery after the war took hold in Europe.

The new immigration policy established admission requirements based on education, skills and language, plus a small number of refugees. Canada has an enviable track record of immigrants integrating and contributing to Canadian society. In fact, Tepperman told us that surveys show multiculturalism, the Canadian cultural mosaic as it’s known, ranks second as the thing Canadians are most proud of  -  before hockey!!! In fact, one of the campaign promises of the recently elected Justin Trudeau was to bring in 25,000 Syrian refugees, fully ten times as many as the US*. And with this platform, he won a resounding majority.

Tepperman concluded by saying Canada was greatly admired internationally as a tolerant, accepting nation. The audience greeted this with thunderous applause**.


Suharto had been a brutal dictator in Indonesia for thirty years when he was overthrown in 1998. One of the few positive attributes of his reign was that he had kept religion out of politics and had held together - by force - the interest of Indonesia’s 17,000 islands and 1,000 languages. With his overthrow, most people feared a surge of religious intrusion into Indonesian politics, and an increase in intolerance and perhaps even terrorism in the world’s largest Muslim country. The pot might boil over without Suharto's tight lid.

For a while, that was exactly what happened. Islamic extremists garnered 36% of the vote. Yet, since then, while individuals have become more deeply religious, politics  has become less so, with the Islamic vote declining to 25% in 2014. Tepperman described some of Indonesia's successful approaches used to combat terrorism, including reducing inequality to dampen enthusiasm for terrorism, using of police rather than army for enforcement, and making trials public. One metric of their success is the extremely small proportion of ISIS fighters coming from the world’s largest Islamic nation, a tiny fraction of Belgium’s for instance.


Tepperman’s third example was Mexico, which suffered such a chaotic, hostile political atmosphere after becoming a democracy in 2000 that it seemed that the country might simply implode.

Then along came Pena. Pena was a member of the corrupt PRI party. He looked like a lightweight dilettante – indeed Tepperman's  slide of Pena flashing a big smile would make you think he was a handsome airhead toothpaste model. Yet this unlikely man hammered out three-party agreements which brought Mexico back from the brink. Immediately after election, he initiated conversations with the opposition parties (in private), actually listened to their issues, and passed some of their priority legislation before his own party’s. When asked how he achieved this progress, his response was ‘compromise, compromise and compromise’.

Lessons Learned

This talk was again one of the hits of the conference, another proudly Canadian speaker, Suzanne Simard (described here) being the first. Gosh it was a nice introduction to Canada Day!

*(As an aside, one of the TED Summit attendees I met was involved in the integration efforts for these refugees. She is deeply impressed with the job Canada is doing, undertaking strict triage in the origin territories, pairing all refugees with sponsor organizations, and quickly getting them integrated into Canadian social structure). The Globe and Mail has been running good-news stories about refugee families getting established. Not surprisingly, others have complained about shortage of resources, particularly language training resources.

** This was truly a global audience, with folks from 73 countries, many of whom had lived in more than one country, so their applause was based on a broad knowledge. Several attendees joked about their growing interest in emigrating to Canada, particularly Americans with the most pessimistic view that Trump might be elected. The Economist ran a Daily Chart tracking the number of searches for ‘moving to Canada’. Many of these were searches from the US, sparked by horror at the prospect of a Trump presidency, while a roughly equal number arose after Brexit.

Saturday, July 9, 2016

Costa Rica – No More Fossils Fuels?

The charming and charismatic Monica Araya advocates for building a fossil-fuel-free society. She argues that this lofty goal is achievable in Costa Rica. Why is she so optimistic about Costa Rica's chances?

Excellent record on clean energy
Nearly 100% of Costa Rica’s electrical energy comes from renewables, a combination of hydro, wind, solar, biomass and geothermal. Last year, the country’s electrical industry used only renewables for 299 of 365 days. That’s the good news. The bad news is that 70% of Costa Rica's energy is still based on oil, due to consumption in the transportation sector. Removing that dependence cannot be done by incremental steps, says Araya; it requires deep, transformative change. Impossible? Not according to Araya, because of her second argument for optimism.

Small country with big ideas
Costa Rica is a small country with big ideas and has a track record of bold unconventional decisions. In 1948, coming out of a brutal civil war, in a region still suffering much discord, Costa Rica took a decision to abolish the army, and enshrined that decision in the 1949 constitution. Instead, the money that would have gone to the military is spent on free education and free health care. In the 50s, they invested heavily in hydro, in the 70s in national parks and by the 90s created a system of payments for ecosystem preservation.  The result is a nation that does medium well on GDP/capital at $11,000, but is a positive outlier on the Social Progress Index.

Current transportation system a mess

Her last argument is that the time is right. Costa Rica’s road system is overloaded and commuting is a disaster. Thus, it's an opportune time to shift investment from roads to public transportation, which would address both the transportation and the energy issues.

So, the goal is extremely ambitious, but the country is a fertile ground for such a transformation. Araya's strategy is to get people in the country to own this goal. The TED Summit program describes her as the founder and director of Costa Rica Limpia,  a citizen group that promotes clean energy and transportation and resilience for climate change, and of Nivela, an international thought leadership group that advances narratives on development and climate responsibility. Holding a Ph.D. in environmental management from Yale, and named as 'Personality of the Future' by the French Ministry of Foreign Affairs, she is indeed an impressive person.. I for one will be interested to see whether she and other Costa Ricans are able to muster the required support.