NumPy 1.5 – Summary

0C__Cauldron_Books_Reviews_NumPy_for_blog_book_cover

Programming in Matlab / R exposes one to vectorized way of thinking. One doesn’t usually write loops often and one tends to think in terms of vectors,array, matrices etc. R for instance is designed to facilitate vectorized input and output. Almost all the functions in base R support vectorization. Most of the functions in the packages on CRAN are equipped to take vectorized input. In fact the program design itself makes vectorizing easy. Recycling rule in R for instance , sometimes makes your function automatically handle vectorized input, even though you never meant to handle such an input. For a R newbie , the fact that his/her function does much more than expected is a happy side effect. However once you have logged in decent number of hours in R, you realize that it is your responsibility that whatever code you write, it handles vectorized input . Hence these days, one of the first unit tests that I write is to check whether my code breaks down for vectorized input.

Advanced Trading Apr - 2012

image

In the Apr 2012 issue of “Advanced Trading ” magazine , I found these points . quotes worth noting down :

  • Exchanges have announced plans to roll out measures aimed squarely at eradicating the technique of
    quote-stuffing, a common strategy in which high-frequency traders rapidly fire off, and then cancel, millions of orders as a means to probe the direction in which the market is heading.

  • Under Dodd-Frank, hedge funds and other private fund advisers that manage $150 million in assets or more will have to fill out Form PF, the brainchild of regulators who are looking to prevent seismic events like the demise of LTCM

Traders Mag March 2012

image

In the Mar 2012 issue of “Traders” magazine , I found these points worth noting down :

  • The FIX Protocol Ltd. Americas buy side working group has been trying to amend FIX Protocol to make it easier to track orders. It is considering the adoption of new FIX tags later this year

  • Interview with Keith Ross, the early partner at GETCO

  • HFT guys are incredibly good risk managers

  • The good HFT firms very rarely have losing models or they lose at best $50 to $100 a trade, and these firms very rarely have losing trading days where they don’t make any money.

Dive Into Python : Summary

image

This book is cited as the classic reference for  Python programmers. Instead of diving in to Python as the title suggests, I did some ground work before going through this book. I went over Learning Python the Hard Way, Think Python, Python Visual Quick Start guide and understood Python 101 . Those three books gave me some confidence to go over this book that is supposedly for experienced programmers.

TeXworks

I had used LaTeX for a few documents many years ago, but the interfaces were so daunting that I never felt like writing a TeX document, unless it was a thesis or a assignment submission or some compulsory requirement. Needless to say MS Word happened to my ally , though a painful ally.  Then two things happened in my life simultaneously. One, a chance encounter with a TeX enthusiast , who suggested that I make a conscious decision to avoid MS Word for at least a month and try to use TeX irrespective of the pain that entails a beginner. If my experience was not good, I could always revert to MS Word.

A Byte of Python

book_cover

This book gives a quick intro to Python and one does not need any prior programming knowledge to go over the contents. I quick read the book in an hour’s time and it served as a syntax F5er.

  • Some of the GUI libraries mentioned that I need to explore are PyQT, PyGTK, wxPython, TkInter

  • Need to check out Charming Python link mentioned in the book

  • There is no char datatype in Python. Never realized this actually.

SEBI on HFT

Via ET

Securities and Exchange Board of India’s chief UK Sinha reiterated on Friday that the regulator is considering imposing speed limits on high-frequency trading of listed Indian shares.

“Earlier, it was 200 micro second speed, then 20 micro second and then 8 micro seconds, and there are still demands to reduce it even further. At some stage, this has to stop. What we need to look at is whether it is serving any public good,” Sinha said at the International Bar Association Conference.

Psychologist & Netflix prize

Thanks to Ravi, came to know about an old wired article on Netflix prize, where Gavin Potter used fundas from Behavioral economics to crack the problem

A deeper part of Potter’s strategy is based on the work of Amos Tversky and Nobel Prize winner Daniel Kahneman, pioneers of the science now called behavioral economics. This new field incorporates into traditional economics those features of human life that are lost when you think of a person as a rational machine, or as a list of numbers representing cinematic taste.

Dexy–make|docs|sexy

Dexy seems to offer an amazing solution to documentation that is Platform Independent. It’s a tool created by a Ana Nelson, an open source software developer,  who happens to have a PhD in economics.
Obviously a better output that star gazing and making predictions in economics , that anyway go wrong Smile.

Dexy’s USP in Ana’s words:

There are many excellent tools for specific types of documentation, in particular many object-oriented languages have built-in tools for writing API reference documentation (e.g. JavaDocs, RDoc, pydoc), however these tools are very specialized and don’t tend to work well for other types of documentation, such as tutorials, nor do they deal well with the fact that projects these days almost always involve more than one programming language (it would be hard to find a project that didn’t include, at minimum, a few bash scripts or some JavaScript). Dexy lets you continue to use specialized tools for some parts of your documentation, and also gives you the flexibility to write other types of documentation in different formats (tutorials, user guides, lecture notes, presentation slides, posters, even blog posts).

Advanced Trading - Mar 2012

mar2012

In the Mar 2012 issue of “Advanced Trading” magazine , I found these points worth noting down :

  • Gone are the days when you could take a prime brokerage account from Goldman/big Prime brokerage  and start your hedge fund. In Today’s world, launching a hedge fund is becoming harder than ever. You have to have the tech platform that talks to multiple primes , an ops team , at least two counter parties. Further compounding matters for new hedge funds are much more stringent compliance requirements
    than a decade ago. Under the Dodd-Frank Act, firms with at least $150 million in private assets under management will have to periodically file Form PF documents with the Securities and Exchange Commission. The Financial Stability Oversight Council will use those filings to gauge how much risk is flowing

Python : Summary

clip_image001

I like books that explain things visually and this book falls in that category. I am reading this book after reading and understanding the basics of Python from “Think Python” and “Learn Python the Hard Way”. This book serves a nice visual recap of Python 101.  I have listed down some of the points in various chapters mainly to ruminate over the learning’s from the previous two books.

Chapter 1- Getting Started

Learn Python The Hard Way : Summary

clip_image001

Prof. Hadley Wickham, the creator of ggplot2 and other useful packages like plyr, reshape etc. has one strong advice to R programmers – “Read other’s code”. This comes from a person who has developed 30 packages till date. We all have an immense urge to program, code up something, view the results, tweak our code to make it work etc. However pausing to read somebody else’s source code requires a certain amount of hard work, willingness to learn from others . In R particularly, where all the functions are documented really well, one hardly NEEDS to go in to the code. But that’s exactly what Hadley Wickham recommends.

Think Python : Summary

image

If there is a lot of data parsing and cleaning that needs to done before modeling, I tend to follow one of the three paths :

  • Path 1: Use Python to clean the data, export the data structure in to a file/database. Leave Python environment and move in to R to do the modeling.

  • Path 2 :  Use Python to clean the data, Stay in Python environment and invoke R to do the modeling. Rpy is the go to module in this context.

The Age of Big Data

Via TP:

What is Big Data? A meme and a marketing term, for sure, but also shorthand for advancing trends in technology that open the door to a new approach to understanding the world and making decisions. There is a lot more data, all the time, growing at 50 percent a year, or more than doubling every two years, estimates IDC, a technology research firm. It’s not just more streams of data, but entirely new ones. For example, there are now countless digital sensors worldwide in industrial equipment, automobiles, electrical meters and shipping crates. They can measure and communicate location, movement, vibration, temperature, humidity, even chemical changes in the air.

Traders Mag Feb-2012

image

In the Feb 2012 issue of “Traders” magazine , I found these points worth noting down :

  • A 300 page document, Volcker rule, signed into law in July 2010, prohibits U.S. banks from engaging in proprietary trading as of July 2014. This rule is similar to “asking you to switch off mobile phones” in the flight. The chance of electronic signal messing up with aircraft is 1 in million. For most of the passengers this does not make sense. But we still have been following this switch off iPods/electronic devices for the past 20 years. Volcker rule banning prop trading is supposedly a protection against trades that can pull down the entire system. Prop trading accounts for 11% of trading volume. So, who will fill in as liquidity providers ?

The Pleasures of Reading in an Age of Distraction: Summary

image

Alan Jacobs, the author of this book is an English Professor at Wheaton College, Illinois. Given his position as a professor, his students and other people often ask him, “What are the 10 best books on literature that every educated person must read", “Dear Prof, Can you suggest some books to read this summer?”, This book is written to answer all such questions. So one might think this book is basically a recommendation type / instructional / didactic guide to reading. Far from it, this 150 page long essay on reading at Whim, with no fixed pattern, with only one objective in mind, “Pleasure”.

P-value Fallacy

Via BayesianBiologist  : An excellent explanation of the fallacy that most people have about, P-value

What we really want is the probability of hypotheses given our data (written as P(H | D) ), which we can obtain by applying Bayes rule.

What we get from a p-value is the probability of observing something as extreme or more than our data, under the null hypothesis ( written as P(x>=D | Ho) ).  Isn’t that awkward? No wonder it is so commonly misrepresented.

Advanced Trading - Feb 2012

image_thumb[1]

In the Feb 2012 issue of “Advanced Trading” magazine , I found these points worth noting down :

  • 2011 was an extremely bad year for hedge funds, with Asia seeing the maximum number of fund closures. Hedge fund managers have quoted random volatility as a major reason for leaving business.

  • The top performer in 2012 will be Commodity managers who have inside information about an underlying commodity — it is legal for them to utilize that, as opposed to equities, in which insider information is illegal.The managers who have fabulous networks and a really good understanding of supply and demand chains within the commodity space actually have a real advantage — more so than their equity counterparts.

Creativity Now : Summary

image

This book contains most of the productivity hacks that one comes across in various articles/blogs/books.  In one sense, this book is a laundry list of hacks that one can try out to increase productivity. A big font size for the text and rich images scattered through out the book, makes it a coffee table book.

Some of the hacks that I found interesting are,

  • On a daily basis, Try to use pen and paper at least a few minutes to work something out , be it a math problem or a back of the envelope calculation of something or simply draw images that capture whatever you are working on. Writing makes one’s relation to work intensely personal and more so using a pen and paper.

Quote for the day

_“Unless one is happy, one cannot bestow happiness on others.
Happiness is born of Peace and can reign only when there is no disturbance.
__Disturbance is due to thoughts, which arise in the mind.
_When the (thinking) mind is absent there will be perfect Peace.”

-– Ramana Maharshi

HFT hitting BRICS

Via Advanced Trading :

As regulators in the United States and Europe weigh the merits of new regulations to govern high-frequency trading, emerging markets have been methodically paving the way for the practice to expand within their borders.

In an interview with the BBC, Progress Software’s chief technology officer John Bates says said the practice of rapid-fire trading is quickly expanding in the so-called BRIC nations - Brazil, Russia, India and China.

Zipf’s law

An old NY Times article on the surprising ubiquity of Zipf’s law :


Math and the City

One of the pleasures of looking at the world through mathematical eyes is that you can see certain patterns that would otherwise be hidden. This week’s column is about one such pattern. It’s a beautiful law of collective organization that links urban studies to zoology. It reveals Manhattan and a mouse to be variations on a single structural theme.

Stop What You’re Doing And Read This! : Summary

0C__Cauldron_Books_Reviews_stop_doing_what_you_are_doing_and_read_this_for_blog_book_cover

The preface to this book gives a reason behind the title for this book,

This year we learnt that there are many thousands of children across Britain who cannot read competently, that there are thousands who leave primary school unable to put together basic sentences. One in three teenagers reads only two books a year, or fewer, and one in six children rarely reads books outside of the classroom. Many parents do not read stories to their children, and many homes do not have books in them. Stories and poems, for these thousands of children, are not a source of enchantment or excitement. Books are are associated with school, or worse – they are associated with acute feelings of shame and frustration.

Quote for the day

I’m astounded by people who want to ‘know’ the universe when it’s hard enough to find your way around Chinatown.

-- Woody Allen

Million Dollar Traders

An old set of videos that I found extremely interesting.

Lex Van Dam, a hedge fund manager in London, picks 8 rookies and gives them a million dollars to manage for two months. This two hour long set of videos brings out so many human dynamics about trading that this can be a fantastic case study in any B school.  Will the 8 rookies survive 2 month period?Will they manage to make money ? Will they work as a team ? and many more questions get answered on the way.

Speed Traders : Summary

image

In the introduction, the author tries to define HFT using the voices of leading HFT players. What are the characteristics of HFT? There is no agreement on a common definition of HFT, but there are some elements that one can at least attribute to HFT. They are

  • Low latency trading.

  • High turnover strategy.

  • Trader goes home `flat’ with no open position.

The goal of any HFT firm broadly is to have a set of uncorrrelated trading strategies that has statistically more winners than losers for all the trading positions of the day. The introduction mentions the fundamental market driven factors that gave rise to HFT:

Ustad Rais Khan

image

Thanks to my Sitar Sir, I came to know about a concert by Ustad Rais Khan this weekend.  Khan Sahab is from Mewati Gharana ( Indore) and plays in “Beenkar Baj Gayaki Ang”.

Before the concert began , he told the audience that he was running high fever and was having a severe body ache. He apologized in advance for any mistakes he might commit in the concert. He is 72 years old!. How many 72 year olds are there in this world who can actually perform in front of an audience ? I guess there is something in music that keeps a mind fresh and active. Despite his ill health, once Khan Sahab started playing , it looked like he entered another world. It was a delight to watch him play. Khan sahab performed for 2 hours in front of a jam packed auditorium. His son Farhan accompanied him on stage and was providing the speed component whereas Khan Sahab played meend, gammak , zamzama and other variations.

Traders - Jan 2012

cover

In the Jan 2012 issue of “Traders” magazine , I found these points worth noting down :

  • In 2011, Knight Capital earned $172M from market making operations out of its entire on $517M

  • According to a Buy Side survey, the top 5 providers of algo trading systems are Credit Suisse, Goldman, ITG, Bank of America and Merrill Lynch and UBS

  • Aquaequities is a firm that focuses on proving block liquidity by aggregating from various mid tier specialized brokers. Very niche solution provider and making money.

The High-Frequency Game Changer : Summary

image

The book starts off with a discussing ‘What’ and ‘Who’ aspects of High Frequency trading systems.

What is High Frequency Trading :

With the advent of electronic trading , the human market maker has been replaced by electronic market maker. The back end is a programmed strategy that does the market making. HFT’s DNA comprises two elements.First element is the trading strategy that is typically liquidity provision or intra day arb extraction. Second element of its DNA is the holding time that is usually a fraction of a second.

Famous Last Words

image_thumb6

Watching this play is a terrible waste of time. I don’t really understand why such plays are made in the first place. One expects something different from a play as compared to a movie. There are 4 artists in the play who try to put on an accent while speaking , forget dialogues in between, murmur something amongst themselves, talk in an accent that is extremely difficult to follow, and end up enacting a story with no meaning whatsoever. Each artist is a spectacular disaster and logically  the play is a disaster too. Have developed a strong aversion towards seeing any more plays for now.

How to Write a Lot : Summary

image

The title is a marketing ploy so that someone struggling to write, be it  a graduate student. a researcher or a  professor , buys the book thinking that they will get some magical advice from it. The author himself admits this towards the end of the book that the title is not exactly what the book is all about. He says the actual title should have been, “How To Write More Productively During the Normal Work week with Less Anxiety and Guilt ?”. 

Advanced Trading Jan 2012

Its been quite a while since I have read any magazine. In fact I have stopped reading magazines for no reason. Thought I will resume this activity and at least read a couple of them on a regular basis.

trading

Jan-2012 issue of Advanced Trading covers the following aspects:

  • Risk Management Takes Center Stage After MF Global Collapse

    • Broker dealers who have prop desks are posing a big problem on Wall Street. 

Pricing the Future : Summary

image[image

Any book that promises a journey spanning 300 years is bound to focus on events that / people who made the maximum impact for the development of option pricing formula. If one were to pause and think about the option pricing formula, one would come up with questions like

  • Pretty naïve question to start with, Why is there a need for options, in the first place? How were the traded historically? Were they precursor to some other instruments?

Sign of things to come

Via Business Line :

An average trade on the National Stock Exchange, the country’s premier stock exchange, was worth a little over Rs 30,000 in 2007-08. That is now down to Rs 20,000, a drop of around 30 per cent in a little over three-and-a-half years. The trade value has been declining consistently with the calendar year 2011 registering a 15 per cent fall compared with 2010. While some of this decline may be explained by a fall in stock prices, a section of the stock market attributes it also to the increased use of automated or ‘algorithmic’ trading by investors**.**

Let’s Unpack

image

Had a chance to watch a very interesting play called ”Let’s Unpack”, conceived and directed by Meenal Kapoor. Firstly the play is script less. So, in one sense each show is an original and can never be seen again in its entirety. It is delight to watch things shaping impromptu on a stage.

What’s the play about ?

A group of 6 people attend a workshop in which they are bound to stay together for 15 days in complete isolation from the outside world. All that they get is a newspaper, television, gym, a garden, and some personal items that they can carry. There are no rules in this house except that they are pulled into bizarre assignments, intriguing tasks, weird games and complex discussions that force them to peep inside themselves, question their own perspectives and shake hands with their instincts.When they come out of that room nothing outside has changed. But they all have.

Baghdad Wedding

Baghdad_Wedding

Recently, I saw a play called “Baghdad Wedding” by Hassan Abdulrazzak and liked it a LOT. The play is about three characters, Salim, Luma and Marwan. The play begins in a setting at Imperial College London where the three meet each other at a party. Hailing from a common place Baghdad , they become best buddies. Luma is a post-modern girl and holds values that are nowhere close to a conservative Baghdad girl. Marwan is the typical conservative guy who is at Imperial college to do this engineering. Salim is the most rebellious of the lot and spends his time writing novels with extremely controversial titles, that a Muslim would never dare to write. Fate brings all of them to Baghdad and the play shows how people change. The place, the environment, the situations, the context makes each of these characters , transform completely by the end of the play. Luma starts wearing hijab and becomes a dedicated doctor helping fellow Iraqis, Salim starts believing in Quran because of the strange turn of events before his wedding ceremony. Both Salim and Luma  decide to settle down in Iraq Marwan , the most conservative of the lot @ the beginning of the play, actually leaves Baghdad to the safety environs of UK.

I-banking bubble

Like all the bubbles that eventually become unsustainable and burst, I-banking as a profession has also become a bubble. As they say, when everyone recommends buying a stock, one can be pretty certain that the stock is going to tank. Similarly when everyone thinks the best and most sought after job is being I-banker, it is likely that it  is going to suck/ disappear soon.  A whole host of people have lined up to become i-bankers in the recent decade. My guess is, it is the glamour and money that has made the profession attractive. A question like “Would you do , what you are doing, if no one paid you ?” would be totally meaningless question  for most of the people working in this profession.

Books read in 2011

Tabulated the list of books read in 2011, for quick reference.

#

Title

Summary

1

Linear Algebra Done Right

Summary

2

In Code

Summary

3

Numerical Linear Algebra

Summary

4

The Cauchy-Schwarz Master Class

Summary

5

Lebesgue Measure and Integration

Summary

6

Inside the

Black Box

Summary

7

Probability Essentials

Summary

8

Probability through Problems

Summary

9

The Lebesgue Stieltjes Integral

Summary

10

Music Room

Summary

11

Measure Integral and Probability

Summary

12

Poke the box

Summary

13

The War of Art

Summary

14

Do the work

Summary

15

Finite Markov Chains

Summary

16

The Housekeeper and the Professor

Summary

17

Probability Theory and its Applications ( Volume I )

Summary

18

Fifty Days of Solitude

Summary

19

R Cookbook

Summary

20

Accidental Genius

Summary

21

R Graphics

Summary

22

Pomodoro Technique

Summary

23

Measuring the world

Summary

24

The theory that would not die