Book Review: Too Big To Fail by Andrew Ross Sorkin

For anyone working in the financial industry, the events that unfolded in 2007/2008 were nothing but extraordinary. During that time, I had just started my first semester in college and barely knew anything about the financial industry. Every day, I would catch the express train and read about another bank either being acquired or going bankrupt. Soon, it wasn’t just banks in US but globally. After reading about all these banks biting the dust, I would dispose of the newspaper and go back to my day as if nothing had happened.

Things are different now. I have worked at a sell side and a buy side and I can’t afford to not know the details of the financial crisis. I knew bits and pieces after reading so many articles over the years but I needed one detailed source that would walk me through all the major events of the crisis. And this is where Too Big To Fail (TBTF) by Andrew Ross Sorkin comes in. TBTF is an amazing book which covers the financial crisis in extraordinary amount of detail. Sorkin does a wonderful job by giving his readers insights into all the meetings that were held at the Fed, Treasury and investment banks by some very powerful people. Sorkin provides his readers with a great opportunity to know the details of the conference calls that were being held to decide whether or not to takeover a bank, whether or not a company needs to declare bankruptcy before market opens the next day, and whether or not Congress will pass a new bill that can potentially put an end to the crisis.

Continue…

Getting started with regex in python

I have been wanting to learn regex. Not just because it reminds me of a bit but because it’s actually very useful and can be used within numerous languages including python. In case you don’t know, regex stands for regular expression. A regex is “a sequence of characters that define a search pattern.” Most popular use case is to search strings for a pattern.

I was looking at videos from this year’s PyCon and stumbled up on a video of Trey Hunner conducting regex workshop at PyCon 2016. If you are looking to learn regex, I encourage you to watch the video. You can also find most of the stuff mentioned in the video on this website.

After I watched the video, I did some practice on my own which I wanted to share here.

Continue…

Book Review: Flash Boys by Michael Lewis

I remember what a big deal Flash Boys (amazon) was when it was released in 2014. Everyone I knew was talking about it (I was working at an investment bank back then). I am two years late but I finally finished reading it and have to say, it’s a really interesting book.

There is no denying that Michael Lewis (author of Liar’s Poker and The Big Short among others) is probably the best financial author of our times. In this book, he does a great job explaining the inner workings of high frequency trading and how high frequency trading firms have been ‘stealing’ from investors for the last few years. He explains different ways through which high frequency traders make money at the expense of ‘slow’ investors.

Continue…

Everything I have learnt about trading oil through ETFs

When I started trading independently few months ago, I began with stocks. I picked some popular stocks such as Apple and Amazon and some not so popular ones such as Extra Space Storage and Public Storage. I would look at my P&L every few minutes to see how my portfolio was doing. However, there was not much I could do if it was doing poorly because since I work at a hedge fund, I am not allowed to sell my stocks within 30 days of buying them. This made me feel a little helpless and to be a honest, it’s boring. This is why I started trading ETFs.

ETFs are great. Not only do they allow me to trade intraday but they also, indirectly, allow me to short. Again, due to the industry I work in, I am not allowed to trade futures and engage in short sales. ETFs allow me to go long and short! A colleague of mine recommended I check out an ETF called FAZ. This ETF is meant to go against the Russell 1000 Financial Services Index. Without knowing much about how 3x leveraged ETFs work, I decided to start trading FAZ to hedge against the market. This was around February when the market was going down. Turns out this wasn’t a good investment because as soon as I invested in FAZ, the economy started recovering and FAZ declined. Of course, I could have switched to FAZ’s counterpart FAS which goes in the direction of Russell 1000 Financial Services Index but I didn’t and had to accept some loss. As I learnt more about trading ETFs, I shifted my attention to trading oil.

Continue…

Developers should be practical, not perfectionists

There is barely any time when I can say I learnt a particular skill in college which I use in my daily professional life. Being able to build circuits? Nope. Triple integration? Nope. Calculating poles and zeros of a transfer equation to be able to optimize your circuit? Nope. However, one skill I do use is being practical. As an (electrical) engineer, I learnt to build stuff good enough to function. I learnt to focus more on practical aspect of things rather than purely theoretical. This concept was reinforced when I started my first job as a programmer. It was more important to have a functional code that could be delivered on time than to have the perfect code that took months, if not years, to write. My clients cared about results and budget. This is not to say they didn’t care about quality but they cared about it only to the extent that was necessary. But how do you know what level of quality is good enough?

As a programmer, many times, you will have to decide whether to make your code ‘better’ (and sophisticated) or to leave it in its current functional state. You wrote the code that meets your client’s requirements and everyone’s happy. Do you go the extra mile and make sure all the boundary cases are accounted for? Even the ones that you think have fewer chances of occurring than you winning a million dollar lottery tomorrow? It’s because of such scenarios that I am able to proudly say I am not a perfectionist. I am a practical guy who assesses each situation and determines what level of quality is required. I do not write code that will last for two decades because I know that due to the dynamic nature of the industry I work in, no code will survive that long. Why bother wasting my team and my company’s resources for something that will never be utilized?

Continue…

My experience at the QuantCon 2016

quantcon_1Most of you have probably heard of a startup called Quantopian which was launched in 2011. Quantopian is a crowd-sourced hedge fund that allows its users to develop and back-test strategies using its platform. Last year, Quantopian started an annual conference for quants called QuantCon. It has been gaining a lot of popularity in the quant world which I find quite astonishing for a conference that is only a year old. Maybe it has to do with the lack of conferences targeted at quants. I attended the conference yesterday on Apr 09th, 2016 at Convene Conference Center in Midtown Manhattan. From what I could tell and I might be wrong about this, there were about 300-400 people in attendance. The day consisted of various lectures from 40 different speakers from fields such as quantitative finance, machine learning and data science. At any given time, there were about 5 sessions going on which meant that you had to pick your favorite and attend that one only.

Continue…

Book Review: The Quants

Regardless of which industry you are employed in, it’s always a good idea to know the background and history of that industry. The Quants by Scott Patterson is one such book which covers the origins of quantitative trading through the lives of some of most famous quant researchers. The book focuses on the story of Ed Thorp, Ken Griffin, Peter Muller and Jim Simons.

The book begins with an introduction of Ed Thorp, a brilliant mathematician who went from using math to win at blackjack to using complicated formulas and pricing techniques to beating the stock market. He is the author of the famous books, Beat the Dealer and Beat the Market. Most of the quants mentioned in the book have had some sort of connection to Ed Thorp whether it be that they knew him personally or were inspired by his books.

Continue…

Getting started with data science

Recently, a few of my friends have shown interest in what I do and the skill set required for my job. For those who don’t know, I am a market data developer. This means that I work with time-series databases to capture and store both real-time and historical data. I am also responsible for writing queries to help my users (i.e. researchers) analyze this data efficiently. Most of the times, when people say they work with big data, they are exaggerating. But I can promise you, market data is big data. In case you don’t believe me, let me tell you that our system captures around 4 billion rows daily.

Once I explain this to my friends, they are interested in finding out more. How do I capture so much data? What tools do I use to analyze this data? How can they get into data analysis? Where should they begin?

Continue…

Using kdb+ for big data analytics in pharmaceutical industry

I attended Kx’s latest meetup in New York this Monday at J.P. Morgan. This meetup was different. It was focused on using kdb+ for data analysis in pharmaceutical industry. I have barely any knowledge about how pharma companies work and what type/size of data they deal with. This meetup was an incredible introduction to growing need of powerful analytical tools in the pharmaceutical industry.

kdb meetup

Kx’s new CEO, Mark Sykes, at the meetup

The event started with a quick introduction by Kx’s new CEO Mark Sykes. I don’t know much about him but he seemed like a nice humble guy. He also announced KxCon that will be held in 2016 in Montauk, New York. Mark led the way for Larry Pickett, CIO of Purdue Pharma, to discuss Purdue’s big data strategy. This was quite high level and am not sure how many people found it interesting. I saw many attendees on their phones during this presentation. I, however, was quite interested in seeing how pharmaceutical companies think differently than financial firms when it comes to big data.

 

Continue…