The Art of R Programming : Summary

book_coverThis book is written by Normal Matloff , a professor who has worked both in the Computer science department and Statistics department at UCLA. Hence this book is markedly different from the books that are available on R. You get a nice blend of views about R. Also the author clearly states in his preface that this book is essentially a book for those “who want to develop software in R”.

The theory that would not die

image

This is a talk by Sharon Bertsch McGrayne , the author of a fantastic book titled, “The theory that would not die”. 

My book summary is here . The video lecture @ CMU is worth watching and might motivate someone read the book.

Algorithmic Trading & DMA

book_cover

This book by Barry Johnson clarifies a lot of terms that we get to hear in the context of trading using computers( program trading , DMA, algorithmic trading, high frequency trading, systematic trading, statistical arbitrage, quantitative trading ). Most of the times, the articles / papers / academic literature don’t make an attempt to clarify what these terms are. So, the reader is left to imagine whatever is convenient to him/her based on the context of the material.

Moonwalking with Einstein : Summary

image

“Moonwalking with Einstein” is a book recounting the experiences of US Memory Championship winner Joshua Foer, whose day job is NY Times journalist. The book is easy on eyes and can be read in a few hours time. One might shy away from books that deal with memory assuming they are of “self-help” type books . But that’s not the case with this book. This book is a result of curious journalist who happens to cover National and International Memory championships for a couple of times and starts wondering about the participants. He starts pondering over a few questions:

Quote for the day

The problem is that coding isn’t fun if all you can do is call things out of a library, if you can’t write the library yourself.  If the job of coding is just to be finding the right combination of parameters, that does fairly obvious things, then who’d want to go into that as a career ?

- Peter Siebel( Coders at Work )

RapiData acquired

Via TradersMagazine

Nasdaq OMX announced on Monday it has acquired the machine-readable news company RapiData, getting Nasdaq into the business of providing trading firms and financial institutions with the latest government and economic news.

RapiData delivers economic indictors directly to market participants as soon as the data becomes available so firms can incorporate macroeconomic news into their trading strategies. Brian Hyndman, senior vice president for Nasdaq OMX global data products, said RapiData’s offerings would be a welcome addition to Nasdaq’s existing lineup of data products and services. Hyndman added that while the delivery speed of RapiData is currently comparable to that of competitors, Nasdaq plans to use its own resources to improve data speeds.

How I became a Quant : Summary

image_thumb1

The purpose of this post is to summarize the various stories mentioned in this book. This write up is a result of a marathon writing on this weekend. Actually it took more time to write than read the entire book!. In the process of summarizing, I have tried listing down some of the statements/remarks/suggestions(under the heading, learning’s) made by these quants that are worth pondering upon.

clip_image004_thumb David Leinweber

LaTeX – Summary

image

Nowadays I start most of my work with a .Rnw document that I convert later in to a LaTeX file. Since .Rnw keeps a running log of the trials / mistakes encountered in a project, it serves as a good summary document of the time spent on data analysis , model building , visualization , back testing etc. One big limitation that I was facing in preparing .Rnw documents was that I had forgotten most of the LaTeX syntax that I had used 4 years back. I somehow got by till date by knowing only a handful LaTeX commands. But my “memory” never fails to embarrass me!..and so had to go over LaTeX syntax.

NBCD Prerana

It’s a small world. I was talking to one of my colleagues about Kathalaya and he mentioned that his sister had attended some workshop at Kathalaya. At the same time, he mentioned about another NGO that badly needed a web presence. So, I just took some time out this week and designed a preliminary site for the NGO.

The NGO goes by the name North Bengal Council for the Disabled ( NBCD) and Prerana is one such initiative under NBCD.  They run a school for the blind at Siliguri, near Calcutta. Made a basic version of the website and I hope to change the design after 10-12 months of web presence. These 10-12 months would also help the NGO put in appropriate content/videos/images for the relevant pages.

How HDFC Bank Is Triumphing in India

Via BusinessWeek:

Unaggressive bets have led Aditya Puri’s bank to 10 years of 30 percent profit gains

Aditya Puri avoids e-mail, doesn’t carry a mobile phone or wear a watch, and goes home for lunch most days. That hasn’t stopped his HDFC Bank (HDB) from becoming the country’s second-biggest lender by market value, after government-owned State Bank of India. “Banking is a simple business,” says Puri, 61, in an interview in his sparsely decorated office at the bank’s Mumbai headquarters, sunlight streaming onto the bare tiled floors. “You be too aggressive, it will come back and bite you on your backside.”

EU Collapse

Fresh in my mind are the various images/opinions/numbers/people from the book, “Boomerang Here is an article that I stumbled upon, that says EU’s collapse is imminent.

Via CBS News :

With Italy sinking rapidly into financial chaos, the eurozone’s 17 finance ministers scrambled Tuesday to find enough money to give their rescue fund a veneer of credibility and world markets some reason to believe their embattled currency won’t break up.

Italy’s borrowing rates shot up above 7 percent Tuesday, an unsustainable level that already has forced three smaller EU nations to seek bailouts. Markets rose for the second day on hopes that the enormous pressures on the ministers would produce some results.

Boomerang : Summary

book_cover

This book introduced me to a new term, ‘disaster tourism’ Smile. People who visit places where financial disasters occur. Michael Lewis goes on one such tour to Iceland, Greece, Ireland and Germany. This book recounts his experiences of the visits and in turn gives a reader some idea of “What the hell is going on in these countries that is causing stock markets to gyrate wildly, investors to panic and making world leaders increasingly edgy?”

Brain Rules

book_cover

Books such as ”Brain Rules” are basically meant to be a bridge to understanding some very basic things. A layperson like me does not know much about the brain. I have completely forgotten whatever I have learnt in high school about the anatomy of brain . So, why read this book ? In fact why should anyone read this book? Most of our survival in modern day world depends on our brains. So, a little knowledge about it might help us in performing better and probably living better too. The author states in his preface that the rules that he talks about in the book are a collection of ideas that he wants others to explore in the field of education, business, entertainment, marketing and in general , every aspect of our lives.

Datamarket

Stumbled on to a fantastic service called datamarket.

One can sign up for free and get up to 100 Million data sets for data exploration.

All you need is the url of the dataset to import data in to your programming environment. This service will be tremendously useful when you are learning visualization techniques.

Gone are the days when you had to struggle to get time series data. Kudos to the datamarket team

Quote for the day

Good quantitative finance can be summed up as the art of leaving things out, plus the art of selecting the right tools.

-- Julian Shaw ( Permal Group)

Kx Systems Founder

imageFrom a childhood in Colombia, to a life in the States, Janet Lustgarten’s personal motto might as well be “no guts, no glory.”

Lustgarten’s father was a men’s suit manufacturer in Colombia when new political pressures brought change to business and the way factories were run. “It was a difficult time,” she recalled, “and my family thought we’d live a better life in the United States and moved to Florida. We were the classic family coming to America looking for security and opportunity”

Quote for the day

Andrew B. Weisman on MVO(Mean Variance Optimization);

The use of this technique, in combination with the informationless performance-enhancement techniques that are frequently employed (knowingly or unknowingly) by professional investors, tends to produce portfolios that are optimized to produce maximal future period losses; systematically denigrated from a liquidity standpoint; and actively inclusive of managers that make use of money management strategies that imply catastrophic losses of capital. It is my firm belief that unless Harry Markowitz had a truly ironic sense of humor, this was not his intent. Since this time, savvy investors have begun to employ several compensating techniques in order to accommodate the peculiarities of hedge fund data, including conditional value at risk (CVaR) in recognition of the distinctly nonsymmetric, left tail-skewed, reality of hedge fund investing, resampled optimization in recognition of the frailties of error estimation and the fact that life is,sadly, out of sample

Word Processors Vs. Text editors

For majority, writing something means firing up a word document( MS Office or Open Office) and typing in stuff. Sometimes we don’t pause and think about the way we are actually preparing the document. We write something, we format it using the menu items or hot keys, then we write something, then we format etc. This goes on until we are done with preparing the document. This process is virtually in an auto-pilot mode for most of us. But if we pause and think of it, Should composition and formatting be activities that should done in parallel ? At least I don’t remember writing anything beyond 100-150 words before using some typesetting stuff like changing the font, color,etc. Does my composition become efficient if I don’t club these activities ? Don’t know!

Getting Good with Git : Summary

clip_image002

This book helps one “get up to speed“ with git. With github being the goto repository-master for most of the R projects out there, it has become imperative for any R programmer to have a decent knowledge of git and the know about ways to interact with github. As of today github has 1.1 million programmers hosting close to 3.2 Million repositories. This has surpassed sourceforge long back. So, an R programmer cannot be ignorant of this distributed version control system. Personally I found it a stretch to have a version control system. But once I started using it for a few projects along with ProjectTemplate directory structure , I found that it helped me in carrying out analysis in a better way. So, how do you go about using it? Well, there are many plug-ins to get going on git. Before you start using the plugin, you need to get the vocabulary of git.

Choosing Workflow applications

I stumbled upon a very interesting write-up that captures the necessary software needed for managing one’s projects. The paper is written by Kieran Healy of Duke University. The takeaways from the paper are as follows :

  • Three principles of work flow :

  • Keep a coherent record of actions. Instead of doing a bit of statistical work and then just keeping the resulting table of results or graphic that you produced, for instance, write down what you did as a documented piece of code. Rather than figuring out but not recording a solution to a problem you might have again, write down the answer as an explicit procedure

All models are short volatility

Via Derman :

If You Use a Model, You Are Short Volatility

All models are analogies, and being analogies, they are limited in their scope. In physics you can describe ice, water and steam, and the phase transitions between them, with one unified theory, amazingly, and hence you can handle the extremes of freezing and boiling.

In finance or economics we have nothing like that. Even beautiful Black-Scholes-Merton ignores volatility variations, illiquidity, panic, government regulations on shorting, to name just a few things that lie outside it.

Academic life in a nutshell

Stanford professor,John Perry, distills the essence of academic life Smile :


The Academic Trough

Being a Full Professor has a lot to be said for it. You are a duke or duchess in the medieval institution of the university. You receive a good salary, as big and nice an office as your department has available, first choice of class hours, and a lot of nice other perks. And there is also the wisdom and balanced judgment that comes with age. For example, I remember when I was an assistant professor, it seemed absurdly unfair that Full Professors, in addition to receiving a better salary, also received nicer offices and other perks. But now that I’ve got that wisdom and balanced judgment that comes with age, it all seems perfectly reasonable.

R to Python

I have always wanted to write Python code for cleansing real time data. Now that I have at least a working knowledge of R, I hope the transition from R to python would be a little easier as there are a lot of similarities between them.

Drew Conway from NYU gives a brief 20 min. talk on the similarities and differences between R and Python.

http://static.vcasmo.com/swf/vcasmo.swf

Blah Blah Blah: What to do when words don’t work - Summary

clip_image002

Dan Roam, the author of popular books “The Back of the Napkin” and “Unfolding the Napkin”, has written a new book with a message that one must fuse our linear wordy based thought process with pictures/images/visuals to comprehend things in a better way. Well, this message is not something new. Presentations with visuals catch our attention rather than the boring bullet point slides. To some extent my book summaries might also be boring as they are merely words, although I try to put in some visuals to make it interesting.

Listening below the noise : Summary

image

Yesterday was a rather unpleasant day for me. Whenever I am in a bad mood / I become restless I pick up this book by Anne D LeClaire, titled, “ Listening below the noise”. For some reason this book has been my best companion over the past few years. I reread parts of this book from time to time. This time around, I thought I should blog about this and write a few words about the book.

R Inferno : Summary

image        [image

The author of “R Inferno”, Patrick Burns, starts off by saying, “If you are using R and you think you’re in hell, this is a map for you”. Well, this fantastic book needs to be read by any R programmer, irrespective of whether he thinks he is in hell or not. The metaphor used in this book is that of journey through concentric circles, each circle representing people (programmers) who are suffering in pain because of “violating the proper programming conduct”. Using this metaphor, the author makes an amazing list of items that one need to keep in mind while programming in R. There is a good discussion on each of the items too. My intent of this post is to merely list down the main points of this book. 

Murakami’s schedule

Via NYT( The Fierce Imagination of Haruki Murakami)

Murakami sold his jazz club in order to devote himself, full time, to writing.

“Full time,” for Murakami, means something different from what it does for most people. For 30 years now, he has lived a monkishly regimented life, each facet of which has been precisely engineered to help him produce his work. He runs or swims long distances almost every day, eats a healthful diet, goes to bed around 9 p.m. and wakes up, without an alarm, around 4 a.m. — at which point he goes straight to his desk for five to six hours of concentrated writing. (Sometimes he wakes up as early as 2.) He thinks of his office, he told me, as a place of confinement — “but voluntary confinement, happy confinement.”

Robust Portfolio Optimization & Management : Summary

image

I tend to read books from the Fabozzi factory Smile, not to get mathematical rigor in a subject but to get an intuitive understanding of the stuff. Overtime, this approach has helped me managed my expectations from Fabozzi books. Having never worked on Black-Litterman model till date, I wanted to get some intuition behind the model. With that mindset, I went through the book. The book is divided into four parts**. Part I** covers classical portfolio theory and its modern extensions. Part II introduces traditional and modern frameworks for robust estimation of returns. Part III provides readers with the necessary background for handling the optimization part of portfolio management. Part IV focuses on applications of the robust estimation and optimization methods described in the previous parts, and outlines recent trends and new directions in robust portfolio management and in the investment management industry in general. The structure of the book is pretty logical. Starting off with the basic principles of modern portfolio management, one moves on to understanding estimation process, and then understanding the optimization process and finally exploring new directions.

The Dewarists

Stumbled on to Dewarists! Brilliantly conceptualized and executed!

The Dewarists is a new original series. Part music documentary and part travelogue, the show features inspiring musicians collaborating to create original music while traveling to locations across India.Set against the frenetic pace of the city of Mumbai, Episode 2 features a cross-border collaboration between Pakistani singer-songwriter duo Zeb & Haniya, and two veterans of Bollywood – composer Shantanu Moitra, and lyricist Swanand Kirkire.

Introduction to Probability Simulation and Gibbs Sampling with R : Summary

image

Gibbs Sampling is an important method in the context of Bayesian estimation. There are other books on R that focus on Bayesian Simulation (Jim Albert), Monte Carlo simulation (Robert and Casella) that are very good and little advanced. So, where does this book fit in? If one has never done any kind of simulation in R, this book is the ideal reference. For someone who is already aware of the basic simulation stuff, there are 3 chapters in the book that talk about Markov Chain, Bayesian Estimation and Gibbs Sampler that are worth going over. I will try to summarize the main points of the book.

Models Behaving Badly : Summary

image

Emanuel Derman’s book, “Models.Behaving.Badly”, gives a physicist and quant’s perspective of models Vs theories, their nature, what to expect of them, how to differentiate between them and how to cope with their inadequacies. Derman starts off by citing a few incidents from his childhood in Africa, where political models, social movement models failed badly. He then talks about the need to understand the crucial difference between theories and models, thus providing the necessary motivation for a reader to go over the book. The book is not as much as describing the precise faulty nature of all the financial models, which would be quite a stretch that it would not fit in a single book. The book is more about the kind of basic things that a financial modeler must always keep in mind and remain humble in his pursuit, always remembering that his model will always say “what something is like?”. It will never be able to answer “what something is”. Let me summarize the main chapters of this book.

Kathalaya

I stumbled on to Kathalaya, an NGO based out of Bangalore, in early 2006. I was amazed at their efforts in keeping the spirit of story-telling alive in India. In early 2007 I had designed a website for Kathalaya and have been maintaining the site since then. Needless to say, I feel nice that I am able to at least contribute something to this wonderful group led by Geeta Ramanujam, which is trying to keep the tradition of story-telling alive.

Quote for the day

While most people were analyzing the benefits of why things could work and the negatives to why they wouldn’t, I was out doing and making things happen.

~ Lou Imbriano ( CEO of TrinityOne )

Practical .NET for Financial Markets

image

I went over this book to get some idea on STP. I was completely clueless on the things that happen at the back end, once the trade is placed with a broker. STP was introduced in Indian Markets by FT and few other vendors almost a decade ago. It has lead to a clear improvement in operational efficiency. Even though this book talks about .NET platform, I liked the chapter on STP that explained things using business case and .NET code.

The Practicing Mind : Summary

image

The author of this book, Thomas M. Sterner, is a Piano technician for a major performing arts center. The author admits that , in his career spanning 25 years, he had faced a lot of challenges to keep himself disciplined and focused (considering the act of tuning and maintaining a piano , an instrument that has 88 notes , is repetitious and tedious by nature). Over a period of time, the author develops a mindset that has kept him productive.Through this book, Sterner tells his method of remaining disciplined.

We are all weird : Summary

image

The core message of this book by Seth Godin, is “Mass Marketing is dead and its an era of marketing to wierds”. Seth clarifies the word wierd by defining as “ people who have chosen to avoid conforming to the masses, at least in some parts of their lives”. In one sense the book is a rehash of Seth’s other books There are some examples and illustrations that might motivate a reader to go over this 90 odd page book. The book starts off with an example of a zoo in Belgium.The zoo facing with dwindling crowds and hence falling revenues, pulls off a mass marketing campaign by focusing on “ A pregnant elephant”.This sort of marketing brings back the crowds to the zoo, but such examples are an exception than the rule, says Seth.  He describes a few situations that capture the changing market place both in the online and offline world. Here is a sample :

Another Rogue Trade

Via Reuters:

Swiss bank UBS on Sunday increased the amount it said it had lost on rogue equity trades to $2.3 billion and alleged a trader concealed his risky deals by creating fictitious hedging positions in internal systems.UBS stunned markets on Thursday when it announced unauthorised trades had lost it some $2 billion. London trader Kweku Adoboli was charged on Friday with fraud and false accounting dating back to 2008.

“The loss resulted from unauthorised speculative trading in various S&P 500, DAX, and EuroStoxx index futures over the last three months,” UBS said in a brief statement.“The loss arising from this matter is $2.3 billion. As previously stated, no client positions were affected.”