Showing posts with label Mathematics. Show all posts
Showing posts with label Mathematics. Show all posts

Friday, November 5, 2010

Book Review: Fermat's Enigma

Fermat's Enigma by Simon Singh

In 1637, Pierre de Fermat, a renown amateur-but-genius mathematician, was reading Diophantus's Arithmetica and wrote the following margin note:

I have discovered a truly marvelous proof that it is impossible to separate a cube into two cubes, or a fourth power into two fourth powers, or in general, any power higher than the second into two like powers. This margin is too narrow to contain it.

In other words, although there are many three integer solutions to Pythagoras's Theorem,

X^2+Y^2=Z^2

There are no three integer solutions for higher powers,

 X^3+Y^3=Z^3
 X^4+Y^4=Z^4
....

Unfortunately, no written record of Fermat's proof has ever been found. Worse, Fermat had a reputation for pranking his fellow mathematicians by claiming to have secretly solved impossible problems. For 350 years, it was uncertain if a proof ever existed. But that didn't stop a lot of people from trying, including some of the best mathematicians in history.

In this book, Simon Singh provides a thorough account of the many efforts to prove Fermat's Last Theorem. Particular attention is given to Andrew Wiles's successful solution in 1994, the result of a seven year solitary effort that shocked the mathematics world.

The book is structured very well. Singh expertly interweaves the history and mathematics behind Fermat's conjecture in an easy to understand and engaging manner. Singh describes the complicated mathematics involved just enough to appreciate Wiles's solution without going into too much detail. The narrative flows evenly and holds the reader's attention well.

Wiles's story is incredible. He was first fascinated by Fermat's Last Theorem as an adolescent. After earning a PhD in mathematics, Wiles found himself uniquely positioned to pursue a proof. He made the bold decision to both work in secret and devote all of his time to developing a proof. For seven years, Wiles worked night and day in isolation until he finally succeeded. After a fatal flaw was found during peer review, he spent an additional year fixing the proof. Wiles's focus, dedication, and determination are truly inspiring.

Fermat's Last Theorem is great book if your into math, history, and solitary geniuses overcoming the odds.

Tuesday, May 25, 2010

Book Review: The Quants

The Quants by Scott Patterson

In The Quants, Patterson provides an intriguing account of Wall Street's most successful quantitative analysts (aka quants) and the role they played in the subprime crisis.

The first few chapters introduce the main players and provide a brief introduction to quantitative finance. Patterson begins by describing how Ed Thorp applied his mathematics background and experience pioneering Black Jack card counting techniques to invent various hedging techniques and start the first arbitrage hedge fund. From there, Patterson lightly introduces other important concepts like Brownian Motion, Random Walk Theory, Efficient Market Hypothesis, and statistical arbitrage. The introduction winds down with the October, 1987 market crash which is used as the context to introduce the "fat tail" contrary point of view personified by Benoit Mandelbrot, and Nassim Nicholas Taleb - a not so subtle foreshadow.

The "middle" of the book discusses the background, career, and substantial success of primarily five high-profile quants: Pete Muller, Ken Griffin, Cliff Asness, Boaz Weinstein, and Jim Simmons. Other Wall Street personalities are also mentioned but to a lesser extent. This part of the book more or less establishes that the above quants are very smart, and very rich.

The last part of the book provides a blow-by-blow account of the sub-prime crisis. All of the quants appeared to be caught off guard, perplexed by the market's "irrational" behavior, and unshure of how to adjust their models to prevent further losses. Throughout the ordeal, many of the quants are forced to question the very foundations of their mathematical models and prior success - was it all just luck?

Over all, I thought this book was OK but felt it tried to cover too much ground as a quantitative finance primer, homage to quants, historical account of the sub-prime crisis, and financial mystery-thriller. Since my interest lies more in the technical details, I was a disappointed with those portions of the book and uninterested in the dramatized historical account. Perhaps I simply had the wrong expectations of the book.

It's also possible that my expectations were set artificially high by Poundstone's excellent book Fortune's Formula which provides a detailed historical and technical account of the events that gave rise to the quantitative finance industry. If you're interested in this topic, then I highly recommend Fortune's Formula.

While reviewing the book to write this review, one passage caught my eye on page 250 regarding a study performed by MIT Professor Andrew Lo and his student Amir Khandani:

There was also the worry about what happened if high-frequency quant funds, which had become a central cog of the market, helping transfer risk at lightning speeds, were forced to shut down by extreme volatility. "Hedge funds can decide to withdraw liquidity at a moment's notice," they wrote, "and while this may be benign if it occurs rarely and randomly, a coordinated withdrawal of liquidity among an entire sector of hedge funds could have a disastrous consequences for the viability of the financial system if it occurs at the wrong time and in the wrong sector."

There is some evidence indicating that the withdrawal of high-frequency liquidity was a contributing factor to the May 6, 2010 flash crash. I doubt the story of the quants is over just yet.

Wednesday, March 3, 2010

The Kahn Academy

About a month ago I discovered The Kahn Academy. Since then, I've found myself spending spare moments watching the video tutorials to refresh my memory on a number of topics including finance, banking, the credit crisis, statistics, linear algebra, and physics. Although short (~10 minutes), the tutorials are very well done and a great resource.

Evidently, the creator, Salman Kahn, started out making video tutorials for a geographically distant niece. Unexpectedly, other people around the world began watching the videos and sending positive feedback. This motivated Kahn to turn the effort into a non-profit venture dedicated to providing high-quality, free educational materials. An inspiring story.

Also impressive is Kahn's simple approach of drawing diagrams on a "black board" in real-time - very similar to back-of-the-napkin visual brainstorming. Like all good teachers, Kahn's deep understanding allows him to discuss complex topics in a readily understandable manner.

If you've got a spare moment, I encourage you to check out a video.

Sunday, November 29, 2009

N is a Number

Earlier this year I read the book "Linked: The New Science of Networks" which prominently featured the mathematician Paul Erdős. The book mentioned a documentary about Erdős entitled "N is a Number" that I was curious to see. Thanks to Netflix, I finally got the chance last weekend.

Most importantly, this movie is about Erdős "the person" and not his mathematics. While the film discusses his mathematical activities and accomplishments, it makes no material attempt to explain them.

With that focus in mind, I thought this was a nice documentary. The footage of Erdős was very entertaining and I suspect conveyed an accurate sense of his personality. I found the interviews of his various acquaintances equally entertaining - especially the elderly English women who recalled Erdős as a young man. Such focus on Erdős' human qualities really helped cast him as an "exceptional person" instead of an "un-relatable genius".

As is often the case with people of substance, Erdős suffered hardship and had a number of significant life experiences - especially during WWII. Perhaps this explains his generosity and thoughtfulness of others that was recounted a number of times in the documentary.

I was most surprised to learn of Erdős' nomadic lifestyle - for most of his life he had no permanent home or job. Instead, he followed his interests around the world attending conferences and staying with (very) supportive friends. If an acquaintance on a different continent came up with an interesting problem, Erdős would hop on a plane with all of his worldly possessions in two small suitcases and often only a small amount of money in his pockets. I found his nomadic and minimalistic lifestyle both impressive and foreign as I can't imagine being without a "home" to return to. I wonder if this is an insight into the personal sacrifice needed to achieve greatness beyond having raw-talent alone.

Clearly Erdős was a genius which I already understood from reading other references before watching this film. The depth and breadth of his work was unique and will likely be unmatched for a long time to come. But, putting his mathematical achievements aside, Erdős still seemed like an impressive, inspirational, and great man - definitely a role model worth reflecting on.

Friday, October 9, 2009

Book Review: Fortune's Formula

Fortune's Formula: The Untold Story of the Scientific Betting System that Beat the Casinos and Wall Street by William Poundstone

[Read in August of 2009 but was delayed in writing the review.]

I absolutely loved this book, in fact I more or less devoured it as it involved three topics that I find very interesting:

How can a book involving these three topics be anything but good!

OK, enough gushing, the book is essentially about the following three people:

  • Claude Shannon: Bell Labs super-genius most famous for creating the field of Information Theory but who also invented the use of boolean binary logic in digital computers, and made material contributions to the fields of Mendelian genetics, cryptography, and computational logistics.
  • John L. Kelley: Bell Labs scientist famous amongst geeks for programming an IBM 704 to sing the song Daisy Bell which inspired HAL-9000's song at the end of the movie 2001: A Space Odyssey. Kelly is also famous for using Shannon's Information Theory to create the Kelly Criterion method for optimal betting or investing given inside information.
  • Edward O. Thorpe: M.I.T. professor famous for writing the book Beat the Dealer which proved card counting could be used to win at Black Jack. Thorpe is also famous for pioneering the use of computers in hedge fund investing (a.k.a quantitative finance). Thorpe's fund, Princeton Newport Partners, achieved an impressive annualized return of 15.1% over its 19 year duration.

The story more or less goes thusly:

  • Shannon invents Information Theory
  • With Shannon's help Kelley uses Information Theory to create the Kelly Criterion for determining an optimal betting strategy given inside information.
  • After meeting at M.I.T., Shannon and Thorpe research ways of using wearable computers to win at roulette. Thorpe goes on to use the Kelly Criteria to first make optimal bets while card counting and later make profitable investments for his hedge fund.

The book focuses on how the interaction between these three men gave rise to much wealth. Along the way Poundstone discusses related topics such as Efficient Market Theory, the Random Walk Hypothesis, and statistical arbitrage. Poundstone includes just enough mathematics to make the story interesting to technical readers without alienating other audiences.

It must be noted that the book offers a much richer story including the influences of organized crime at various stages of history.

All in all, a great book that I highly recommend to anyone interested in these topics.

Book Review: Labyrinths of Reason

[Read in August of 2009 but was delayed in writing the review.]

Labyrinths of Reason: paradox, puzzles, and the frailty of knowledge by William Poundstone.

Ouch, my head hurts. How do we really know we're not just brains-in-vats living in a simulated reality?

This is more or less the central theme of the book which guides the reader through various thought experiments designed to probe the depths of meaning, understanding, and knowing. Along the way Poundstone discusses various topics such as:

I could go on but doing so would still do the book an injustice. It's a great book that covers a lot of interesting topics. Well worth reading if you are interested in these kinds of things but be prepared to get a few headaches from excessive thinking. I'm planning to re-read it perhaps a year from now to try to better absorb the material.

Book Review: Prisoner's Dilemma

[Read in August of 2009 but was delayed in writing the review.]

Prisoner's Dilemma: John Von Neumann, Game Theory, and the Puzzle of the Bomb by William Poundstone.

A book ostensibly about Game Theory, I felt that it was more of a montage of:

The Game Theory content was fascinating and informative covering various kinds of games, strategies, and complications stemming from repeated games. Good stuff.

I found the Von Neumann biography captivating as it provided a deeper insight into his personal nature than I had read before. Clearly he was an incredibly intelligent man but he also clearly had a number of personal challenges. While this material makes Von Neumann appear more "human", it's not particularly pleasant to read about. Also, I thought the account of his death from cancer was too detailed and grim.

Personally, I have no interest in the history of the RAND corporation or the cold war so I found these parts of the book difficult to get through. But others may find this material more interesting.

All in all, not a bad book if you're interested in these topics but I wouldn't recommend this for "feel good" reading.

Sunday, September 27, 2009

Book Review: Complexity

Complexity: A Guided Tour by Melanie Mitchell

[Read in July of 2009 but was delayed in writing the review.]

I came across this book during a bookstore trip and decided to purchase it as it included topics related to a couple of recent posts and previously read book, Linked: The New Science of Networks. I'm glad I did as it made me realize that many of the things that I am interested in fall under the domain of Complex Systems.

The book is structured as five parts and nineteen chapters as summarized below:

PARTCHAPTERTHEME
1BACKGROUND AND HISTORY
1What is Complexity?
2Dynamics, Chaos, and Prediction
3Information
4Computation
5Evolution
6Genetics, Simplified
7Defining and Measuring Complexity
2LIFE AND EVOLUTION IN COMPUTERS
8Self-Reproducing Computer Programs
9Genetic Algorithms
3COMPUTATION WRIT LARGE
10Cellular Automata, Life, and the Universe
11Computing with Particles
12Information Processing in Living Systems
13How to Make Analogies (if You Are a Computer)
14Prospects of Computer Modeling
4NETWORK THINKING
15The Science of Networks
16Applying Network Science to Real-World Networks
17The Mystery of Scaling
18Evolution, Complexified
5CONCLUSION
19The Past and Future of the Sciences of Complexity

Part 1, nearly a third of the entire book, provides a thorough introduction to Complex Systems which are defined by the author as having the following properties:

  1. Complex collective behavior (i.e. the whole is greater than the sum of the parts)
  2. Signaling and information processing
  3. Adaptation to environmental changes

Example complex systems cited were insect colonies, the brain, the immune system, economies, and the world wide web.

Chapter 2 was an enjoyable introduction to dynamical systems and chaos theory which I had only a cursory awareness of. The simple "rabbit population" example using logistic maps was a great aid in understanding the concepts of fixed/periodic/strange attractors, and a sensitive dependence on initial conditions (aka. the Butterfly Effect). New to me were the concepts of the period doubling route to chaos and Feigenbaum's Constant (which is just plain odd).

Chapters 3 and 4 covered concepts related to information and computation including: entropy, Maxwell's Demon, statistical mechanics, Shannon's information theory, Hilbert's problems, Godel's incompletness theorem, and Turing machines. Overall the treatment was good and a sufficient introduction for readers unfamiliar with these concepts.

Chapters 5 and 6 discussed the topics of evolution and genetics. I found the discussion on evolution interesting as I don't recall learning about the feud between the early Darwinians, who believed in continuous small variations, and Mendelians, who believed in discrete large variations. I also don't recall learning about the Modern Synthesis or the continued challenges in the form of punctuated equilibrium. Interesting stuff.

Chapter 7 discussed various ways of defining and measuring complexity as:

  • size
  • entropy
  • algorithmic information content
  • logical depth
  • thermodynamic depth
  • computatoinal capacity
  • statistical complexity
  • fractal dimension
  • degree of hierarchy

While no single measure was identified as the measure, all were interesting to consider.

Chapters 8 to 10 discussed cellular automata, genetic algorithms, and artificial life. While the treatment was good, it felt light-weight after having just read The Recursive Universe. That said, Chapter 10 did provide a nice overview of Wolfram's work on cellular automata that augmented the prior material I had read on this subject.

Chapter 11 discussed the use of cellular automata for majority classification tasks. The specific task discussed was the determination of the dominant color in a one-dimensional vector of white and black pixels. The authors used genetic algorithms to evolve a set of CA rules that reliably performed this task by creating diagonal vectors that carried local majority-voting decisions which eventually intersected to produce a majority-vote for the entire original vector. The authors seemed unable to at first understand how the evolved CA worked but I thought it obvious as clearly any solution must involve the horizontal communication of local-majority votes in order to reach a global decision. It seems obvious (to me) that such horizontal communication would manifest as diagonal vectors when the CA evolutions are graphed vertically. I thought the use of particle equations to explain the phenomina was overkill but still interesting.

I enjoyed the author's account in Chapter 13 of her work on the CopyCat program which was designed to process analogies. The problem appears hard and the program was quite clever. I must admit I am extermely jealous that she got to work so closely with Douglas Hofstadter.

Chapters 15 to 16 discussed real-world network theory which included topics such as small-world phenomina, scale-free networks, clustering, preferential association, and network resiliance. Overall the treatment was good but mostly a review after having just read (actually listened to) Barabasi's book Linked, which I highly recommend reading.

Chapters 17 and 18 discussed network theory in the contexts of metabolic scaling and evolution which was very interesting. Some of this material was a review of Stuart Kauffman's work documented in his book Origins of Order. I previously read another of Kauffman's books, At Home in the Universe, which touched on some of the same topics but perhaps I'll add Origins to the list of potential future readings.

Chapter 19 concluded the book with an overview of the state of complexity science and the need for a unifying theory. While the field has accomplished many great things, it appears that a lot of difficult work remains which is perhaps why this is such an appealing topic.

In summary, Complexity is a great book that covers a lot of interesting topics. On a personal level, I am thankful to have read this book because, as I mentioned, it helped me realize that complexity science is the meta-topic that unifies many of my long term interests and therefore serves a guide for future research.

Tuesday, September 15, 2009

Nice Finance Video Collection

While web-surfing I stumbled across a nice collection of YouTube videos by Bionic Turtle on statistics, finance, and quantitative finance.

The videos tend to be short (under ten minutes) which makes them convenient to watch. Also, the author effectively uses Excel to work through examples and highlight the key points.

So far, I've only watched a handful of these videos but I plan to work my way through them gradually with a priority towards the topics relevant for re-balancing and evaluating the performance of my portfolio.

Wednesday, September 9, 2009

An Algorithmic Trading Primer

While I was getting my MBA I developed a strong interest in quantitative finance. I doubt I'll ever pursue a career in this field but I continue to enjoy reading about it in my spare time as part of a larger, general interest in applied mathematics (more about that in a future post).

Needless to say, I was eager to read the paper Algorithmic Trading: A Primer published in the summer 2009 issue of The Journal of Trading.

Unfortunately, I apparently misinterpreted the title as instead of discussing the algorithms themselves, the article covered the high-level points that clients of algorithmic trading firms should be aware of. To this end the article did cover some important points including:

  • The desire (nay need) for algorithms to increase trader productivity
  • The importance of Regulation NMS and why it favors electronic trading (which I must admit was new to me).
  • The basic framework of algorithmic trading systems such as performance benchmarks, assumptions, etc.
  • The rationale for and limitations of using log-normal models for price fluctuations.
  • The importance of avoiding trades that signal the market and may therefore invalidate the algorithm's model.
  • The importance of using the right algorithms at the right time to achieve the intended goals.

So, although the article didn't cover the topics I had initially hoped for I did find it a useful read anyway.