Category Archives: finance

The Price of [Mobile] Serfdom

κλοιῷ τέτριπται σάρκα τῷ σιδηρείῳ,
ὃν ὁ τροφεύς μοι περιτέθεικε χαλκεύσας.”
λύκος δ’ ἐπ’ αὐτῷ καγχάσας “ἐγὼ τοίνυν
χαίρειν κελεύω” φησί “τῇ τρυφῇ ταύτῃ,
δι’ ἣν σίδηρος τὸν ἐμὸν αὐχένα τρίψει.”

THE WOLF, THE DOG AND THE COLLAR 

Aesop’s Fables (Valerius Babrius, 100)

The Internet and modern computer technology promised to reduce the effects from consumer myopia arising from mental calculation costs. However, it is to note that the current cost of mobile permanence agreements in Spain, calculated as the foregone value of forsaking the right to change to the best mobile provider for 18 to 24 months, ranges from 216€ to 296€.

And given that smartphone Average Selling Prices (ASPs) are around 250€, the implicit interest rate of these permanence agreements may even surpass 100% in some cases. A really astonishing figure.

Therefore, and in accordance with other studies in the empirical literature about transaction costs on the e‑commerce industry (Do Lower Search Costs Reduce Prices and Price Dispersion?), very high search costs and the analysis paralysis resulting from them also exists in the mobile telecommunications industry, and are just as relevant today as they always have been.

All Equity and No Debt Makes the VC a Dumb Boy

Entrepreneurs are already well versed on the intricacies of startup financing and the pernicious effects it may have on their companies: down-rounds, dilution, preferred stock and stock with different voting rights, among others. For that reason, they plan ahead and try their best not to find themselves caught in stalemates and catch-22 situations with no possible resolution.

But what I find fascinating is the lack of thought exhibited by VCs on their term sheets, driven more by custom and just plain imitation than by economically rational designs. The case is most notorious in the disregard of debt instruments (convertible debt and notes), of which their advantageous properties to the entrepreneurial side of the investment are widely known, but not their equally valuable properties to the other side of equation.

The detailed study of the financing structures of tech startups is a puzzling experience of negation of the received wisdom from the classic Corporate Finance results, especially the Myers-Majluf theorem: given a project within a startup, with positive or negative NPV, and the founders knowing the project’s NPV with very high certainty but startup outsiders do not, ceteris paribus, the founders may not invest in the project with positive NPV if outside equity must be issued to finance it, because the value of the project may go to the new shareholders at the expense of earlier shareholders . That is, the asymmetric information is causing an agency cost to the current shareholders if the startup issues equity, but not if it issues debt. This straightforward result is key to explain the low start-up survival rates through the different rounds of financing since, in the light of the full lifecycle of the entrepreneur, it’s perfectly rational to prefer that the current startup goes bankrupt to start a new one with the project with positive NPV if the cost of issuing new equity is so high, avoiding any pivot in the process.

And then, by Green Theorem (from Corporate Finance, not from Calculus) convertible debt, not straight, would be the ideal instrument: if the startup can choose investment levels between different projects with different risks, and outsiders don’t know the relative scale of the investments then, ceteris paribus, current shareholders bear an agency cost if the startup gets financed only by straight debt, a cost that can be avoided by issuing convertible debt.

These pecking order results hold even with stock options and without asymmetric information or managerial firm-specific human capital (see Stock Options and Capital Structure), so I wonder how many decades it will take for practice to meet theory… if they dare!

The New New Tech IPO Bubble

The latest IPOs of tech companies like LinkedIn, Yandex and RenRen have reactivated the never-ending debate of valuations and the fear of another tech bubble, even if most tech stocks are cheaper than before the dot-com bust. But this time, we have the masterful studies of [amazon_link id=“1843763311” target=“_blank” ]Technological Revolutions and Financial Capital: The Dynamics of Bubbles and Golden Ages[/amazon_link] and [amazon_link id=“0123497043” target=“_blank” ]Tech Stock Valuation: Investor Psychology and Economic Analysis[/amazon_link], providing us with tons of empirical data from previous bubbles. Or even better, real-time theories of asset bubble formation, like the Jarrow-Kchia-Protter-Shimbo theory put to test in the following paper:

GDE Error: Error retrieving file — if necessary turn off error checking (406:Not Acceptable)

This time is different.

Python in the Financial Markets

With the SEC recommending the use of Python to report ABS cashflows and major investing banks (J.P. Morgan, Goldman Sachs, Morgan Stanley) slowly substituting their Matlab code with Python to take advantage of its much faster time-to-prototype/time-to-market, it’s an awesome moment to enjoy watching a nascent field grow up.
I’ve collected the most representative public resources on the use of Python in finance and some experiments of mine in this slide.

LMAX: Going Slow to Go Fast

GDE Error: Error retrieving file — if necessary turn off error checking (404:Not Found)

Scalable web architects must learn from the transactional world, stock exchanges and other financial creatures of mass data processing. For example, LMAX attaining 100K+ TPS at less than 1 ms latency is a remarkable technical feat. Sure, other exchanges like NYSE and LSE manage to achieve higher TPS at lower latencies, however it’s the history behind LMAX what makes it a fascinating object of study: I’ve estimated from public sources that 20 people worked fully committed for three years to develop the initially released version of LMAX. At first, a simple proof of concept reaching 10K TPS was produced, followed by a long number recode-measure-debug cycles that felt more like squeezing and juicing the JVM to achieve significant speed-ups than real programming, because writing cache-friendly code for an adaptive-optimizing JIT virtual machine with no control of how data structures are mapped to memory is really hard, as nonlinearities appear everywhere in the typical code optimization process.

It’s the same kind of technical debt Google experienced when it started with a Java codebase, then migrated to a slower Python one to finally settle for C/C++; or the current technical debt at Twitter, a pure Ruby on Rails product that moved to Java and Scala with phenomenal results.

When frameworks and virtual machines get in the way, it’s the good old wisdom from people like Ken Thompson that illuminates the path to success: “One of my most productive days was throwing away 1000 lines of code.”

Code battling code battling… (ad infinitum)

pMARS, the official Redcode simulator

Battle programs of the future will perhaps be longer than today’s winners but orders of magnitude more robust. They will gather intelligence, lay false trails and strike at their opponents suddenly and with determination.”
‑A. K. DEWDNEY, Computer Recreations, Scientific American (January 1987)

Mahjong is different from Checkers, just like High Frequency Trading is different from Core War: they include the profit motive!

Books on Market Microstructure

The market microstructure of financial markets is a fascinating field: the old customs for trading of financial assets and contracts had been codified on computer algorithms, allowing for their execution at sub-luminal speed. The analysis of market microstructure, through stylized and econometric models, is an overlooked but necessary skill for the high frequency trader to survive in an ever-changing environment, to better understand the dynamics of price formation in financial markets and how the most seemingly innocuous of the rules could alter the short-run behavior of securities prices.

It’s worth recollecting the strengths and weaknesses of the fundamental books of the field here since I’ve read all of them and each one offers an interesting point of view of the subject. And reading at least two of the better would be an excellent introduction to the specialized literature:

  • [amazon_link id=“0195144708” target=“_blank” ]Trading and Exchanges: Market Microstructure for Practitioners[/amazon_link]. Excellent introductory textbook on how financial instrument trading works, comprehensive yet accessible to every public. It offers a high-level, non-technical and non-quantitative, recollection of insights of the different institutions, incentives and techniques of all the market players, resulting from years of experience of its author, as well as structural and regulatory issues, plus a stylized overview of the most common microstructure effects. The only negative aspect is that it’s almost a decade old and, even if fundamental market microstructure didn’t change much, technology really did.
  • [amazon_link id=“0631207619” target=“_blank” ]Market Microstructure Theory[/amazon_link]. The classical introduction to microstructure theory, now dated, provides an excellent mathematical introduction to the field for the researcher through a systematic presentation of the basic models and results.
  • [amazon_link id=“026262205X” target=“_blank” ]Microstructure Approach to Exchange Rates[/amazon_link]. This book covers FX market microstructure all the way through theoretical and empirical models. Although dated, it’s indispensable to understand the idiosyncratic nature of exchange-rate markets.
  • [amazon_link id=“0195301641” target=“_blank” ]Empirical Market Microstructure[/amazon_link]. Brief, updated and quantitative book, perfect for an intensive intermediate course on equity market microstructure with an emphasis on the econometrics, but neither on the real world implementation nor technical issues.
  • [amazon_link id=“0521867843” target=“_blank” ]The Microstructure of Financial Markets[/amazon_link]. The most updated book of this list, it’s perfect for an advanced graduate course with an emphasis on the empirical models of market microstructure. Recommended for its in-depth treatment of transactions costs and their effects on return on investment.

All-in Blind: Stop-Loss Considered Harmful

Simulation of the impact of stop-losses on returns (MSFT stock)

In the investing world, stop-loss orders are the most used risk management device: so simple and intuitive that they confuse reason and common sense. But the hidden costs of stop-losses alter the shape of expected future return distributions, resulting in no inherent edge to be had in using neither stop-losses nor profit-taking stops, or any combination of them; and as volatility of the underlying asset’s returns is increased, the impact of stop-losses increase as well, generating higher portfolio volatility. Precisely, the opposite of what is intended: the perceived benefits of the stop-loss are largely balanced out by the hidden costs.

Note: Trading desks may profit from large quantities of sell orders from client’s stop-loss/profit-taking orders known in advance, so don’t expect them to disappear anytime soon.