The Ferrari Killler…

tesla-roadster-side-viewTesla pulled a “just one more thing” at their Tesla Semi Truck event and it looks amazing – the Tesla Roadster 2.0. I’m calling it 2.0 since the very first Tesla car was a sports car and it was called a Roadster as well.

Overnight Tesla has put every hyper/super/exotic sports car manufacturer on notice. The Roadster 2.0 is beautiful and the specs are industry leading, 0 to 60 MPH in 1.9 seconds is the fastest production car EVER. I’m a hugh car fan and if I had to put down $250,000 for a Tesla Roadster 2.0 or a Ferrari 488 Spider, I would lean towards the Tesla. And that is saying a lot. If you were to ask me my top 3 car picks, they would be:

  1. Ferrari 488 Spider
  2. Porsche 911 Targa
  3. Mercedes Benz AMG E63 S

Even knowing the history of Ferrari with it’s strong racing culture and it’s exclusiveness, I would still lean towards the Tesla. To hear the engine rev or hear the exhaust note of the Ferrari 488 gets me excited every time I hear one, yet I would still leans towards Tesla. Granted I would have to see the final production version of the Tesla Roadster 2.0 but having seen other Tesla products I’m pretty sure the Roadster 2.0 is the real deal.

Ferrari and every other hyper/super/exotic sports car manufacturer is in a typical innovator’s dilemma. They stick to what they know and yet what they know is being disrupted yet they still cling to the past. The internal combustion engine (ICE) is going the way of the dinosaur and the only place to see those cars in the future will be in museums.

For the past 20 years car manufacturers have been in an arms race to shove the biggest ICE into the engine bay and get higher and higher HP (horsepower) numbers. When I bought my first car in 1996, it was a Nissan Maxima SE and it had a 190 HP engine and at that time that was a big deal for a 4 door sedan. Today, that same Maxima carries a 300 HP engine. I’m guessing most consumers don’t care about those numbers and that’s the issue, the industry is changing. Yet, someone forget to tell the big automakers about this structural shift that is happening.

If I were a shareholder of Ferrari, which is listed on the Nasdaq under the ticker symbol – RACE, I would be worried. Ferrari has capped the number of cars they produce in a year to make sure they don’t flood the market but at some point, people will no longer want ICE cars. Time and time again they have said they are not looking at EVs (electric vehicles) or SUVs (sport utility vehicle). However, they are starting to change their stance on SUVs and I’m sure sooner or later they will have to push their chips into the pot and say they are all in for EVs.

Tesla is the future just like Ferrari and Porsche were the future in the 60’s and 70’s. Time will tell if Tesla is the winner, but one thing is for sure that EVs are here to stay and are the future.

The Tesla of India?

mahindraA couple of days ago the Mint newspaper published a story about Mahindra & Mahindra (M&M) working with Ford to develop an electric sedan. Ford would get the technology to build a low-cost electric vehicle from M&M and in exchange M&M would get technology to build a larger electric vehicle for potentially the Indian market. M&M is part of the Mumbai based Mahindra Group conglomerate which is run by Anand Mahindra.

So you ask what low-cost electric vehicle technology does M&M have? The answer is quite simple – REVA, which it bought in 2010. REVA (Revolutionary Electric Vehicle Alternative) was started in 1994 by Chetan Maini and way before Tesla came to the market and made electric cars cool. REVA has since been renamed to Mahindra Electric and under the M&M umbrella.

When I look at the Indian car manufacturers – Maruti, M&M and Tata Motors. Maruti is a one trick pony – build cheap cars that the masses will buy. This is not a knock on Maruti it’s just their playbook that has made them the #1 car seller in India. Tata Motors which is part of the Tata Group is currently embroiled in corporate strategy indecision and I’m sure they have not clear strategy in place for electric vehicles.

That leaves M&M, which has the best chance of being a leader in the electric vehicle space not only for Indian but other markets located near India. The Mahindra Group over the years has acquired several companies that call help it achieve it’s goal. If you look at Tesla, they are leaders because of 3 things:

  1. Design
  2. Their manufacturing plant in Fremont, California
  3. Battery technology

For design the Mahindra Group bought Pininfarina SpA in 2015. Pininfarina is the legendary Italian design house that has designed most of the Ferrari’s and one of my favorite American cars the Cadillac Allanté. With Pininfarina in-house they have no excuse not to sketch a car that is out of this world.

Tesla recently admitted that building cars is hard and hence behind schedule with their Model 3 builds. M&M has been building cars and trucks for many years and also purchased SsangYong Motors, South Korea’s 4th largest automobile manufacturer. From a manufacturing perspective M&M seems to have their act together since they have been assembling cars and trucks for many decades.

That leaves Mahindra Electric and their battery technology, which really is the main ingredient in an electric car. I’m assuming their technology is not so strong but with the partnership and knowledge sharing with Ford that should all change. With the partnership and acquisitions it looks like the Mahindra Group is leagues ahead of anyone else in India…now they just need to release a product that will wow the world.

Jio and the Video Revolution

 

reliance-jio-logo-redIt seems like just yesterday when I would come home late and the building security would all be sound asleep. Now when I roll-up at night many of them have their faces partially lit because of their mobile phone screens. Invariably, 99% of them are watching some Bollywood movie, TV show or music program.

There is only one person to thank for this – Mukesh Ambani. Overnight he changed the mobile telecommunications game and dropped boatloads of bandwidth on unsuspecting consumers. At first, people were apprehensive but once they realized it was truly free they started exploring and ultimately found YouTube. A friend of mine works for a fairly large internet exchange point (IXP) and he said the two websites that have benefitted the most from Jio’s explosive growth are Facebook and YouTube.

Even I have changed my internet usage patterns from reading reviews on cars and gadgets to instead watching these reviews on YouTube. One of my favorite Vloggers (video bloggers) for cars is Seen Through Glass. He is witty, loves cars and is generally a treat to watch as he drives some of the most insane cars in the world. In his latest video he is driving around in a Lexus LFA Nurburgring Edition (one of 50 in the world).

YouTube is not the only beneficiary, all the online streaming players are having a field day as well – Amazon Prime, Netflix and YuppTV to name a few.

Of course, Mukesh Ambani wants everyone to stream the content from his services such as JioTV and JioMusic but that’s the beauty of these OTT (over the top) services like YouTube…you can access them from any high speed internet connection.

 

Securing the India Stack

IndiaStack-logoOver the weekend, the Times of India ran a front page article about how someone was able to hack into India’s Aadhaar database.

Aadhaar is India’s attempt to give everyone in India a unique 12 digit ID that can be used for a variety of government services. The Aadhaar project is part of what many call the India Stack. According to Wikipedia the India Stack is:

…a set of APIs that allows governments, businesses, startups and developers to utilise a unique digital Infrastructure to solve India’s hard problems towards presence-less, paperless, and cashless service delivery.

IndiaStack

In a nutshell, the government is going digital and everything will revolve around this unique 12 digit number. Initially, it will be basic government services then it will move to eKYC (Know Your Customer), payments and beyond.

As more and more services go online using the Aadhaar number to authenticate services, we will hear about more and more security breaches. This is not uncommon in the technology world, in the early days of PayPal (they provide online money transfers) they dedicated a large number of resources to “plug” these holes. The reason why people prefer open source security solutions is because you have a large community of programmers that are looking at the code base and constantly testing it to find holes in it.

The Government of India (GoI) should not sweep these issues under the rug and say everything is secure. When a government official says their technology is “tamper proof” that’s when you know they don’t understand technology. Actually, if they are so confident they should host hackathons. These hackathons have two purposes: 1. potentially find bugs or security issues 2. an excellent hunting ground to find talent for the India Stack team.

The Government should actually embrace these hackers whether they are black hat or white hat. Creating a platform like HackerOne would be a step in the right direction. HackerOne is a bug bounty platform that connects hackers (or as they called them “cybersecurity researchers”) with companies to crowd-source security vulnerabilities.

The idea of embracing hackers goes against the grain of conventional thinking but when it comes to digital, I think it’s the best way to constantly improve security and enhance service delivery. The current thinking of “nothing is wrong and nothing to see here” is old school and needs to die.

By the way if you are concerned about AI (Artificial Intelligence) and robots taking over your job, you are in luck! I think India has a severe deficiency in technology security experts which I don’t think robots will be able to takeover…for now. If I was coming out of college today:

  • I would read every API spec document on Aadhaar, UPI, eKYC and others
  • Not only would I read them, I would tear them apart and see how they work
  • Build Android apps around them to understand a real world implementation
  • Start a blog and give recommendations on how to make them better
  • Download other apps to sniff the traffic and see how they implement these APIs
  • Find Indian companies on HackerOne and monetize (as of now, only Ola is on the platform)

Then the next battle will be those robots!

“Hello, World!’ for Quant Traders

high-frequency-tradingThis is the second blog post on my journey to learn Machine Learning. My first blog post talked about setting up the infrastructure. Now that the infrastructure is up and running, I’m able to get to the business of writing Python code.

Whenever you start to learn ANY programming language the first lesson is usually titled “Hello, World!“. It’s something of a tradition to teach the person the basics of the programming language to output something to the screen which is usually – “Hello, World!”

For quant/algo traders the equivalent of “Hello, World!” is calculating a simple daily moving average (DMA) and building some logic to buy or sell a security based on the DMA parameter.

Below is my “Hello, World!” Will this strategy make you money? Absolutely not. Will it help you build other strategies? Absolutely.

Leaving Apple Island

mrj-high-school-mac

From my high school yearbook (Washington Catholic 1991).

A couple of weeks ago a friend of mine, Sahil, blogged about making the switch from Apple to the Google ecosystem. I haven’t made the jump yet, but I’m on the same trajectory. When I tell people about it, the first question is “why?”

My first memory of an Apple computer was in the early 1980s when a family friend in Chicago had an Apple II and I was mesmerized by it. That green monochrome screen seemed so magical to me. Then for the next 20 years I used Apple computers on and off but was mainly an IBM PC guy.  In 2003, I bought the “lampshade” iMac and started to get hooked into the Apple ecosystem with the iPod, iPod Shuffle and iTunes in 2004. The big move came in 2005 when I bought a MacBook Pro as my “daily driver” and completely ditched the Microsoft clusterf$#% that was Windows.

When the iPhone was announced in January 2007, I knew I had to have it and waited till June when they launched it. By October of that year, I got rid of my BlackBerry and switched to the iPhone. Over the years, I bought more Apple products and slowly accumulated what I call “technical debt.”  As of today, I own the following:

  • iPhone 6
  • iMac
  • MacBook
  • iPad Mini
  • 2 – Apple TVs

Some things just didn’t work as advertised but I was too entrenched in the Apple ecosystem to leave. Case in point, some of the torrent video files I download are in the .mkv container format which you cannot natively play via iTunes and thus can’t steam to an AppleTV. So I was converting (the technical term is transcoding) all those files to an .mp4 format which iTunes could understand. I soon realized I was spending too much time making it all work.

I also noticed that many of the apps I used on my iPhone were by Google and I just loved the software simplicity of Google. So one by one, I moved everything over to Google and currently just using the iPhone 6 for it’s hardware.

  • Email -> Inbox by Gmail
  • iTunes/Music -> Google Play Music
  • Photos -> Google Photos
  • Calendar/iCal -> Google Calendar
  • Notes -> Google Keep
  • Safari -> Google Chrome
  • iCloud Drive -> Google Drive
  • Podcast -> Overcast (non-Google app, but Google is planning to release an update to Google Play Music that will play podcasts)

For streaming video content to my TVs I’m using Plex Media Server on my iMac. And my Sony TVs run Android, so I’m running Plex as an Android app on the TV. Now, I no longer have to convert the files and can natively play any file and stream it to my TV without all that extra work. As of now, I’ve stopped using my Apple TVs.

The first device I will switch out is the iPhone, the OnePlus 5 was just announced but really I’m waiting for the Pixel 2 from Google. Then over time I will switch my iMac and MacBook to Windows 10 based machines and the iPad Mini will get replaced with a Google Pixel C.

When I first started using Apple products I was mesmerized and felt I had reached paradise island. However, after years of being loyal to Apple it’s time to leave the island.

Learning Machine Learning: The Infrastructure

braindata-370x290In 2016, all I was reading about was big data, deep learning, artifical intelligence, machine learning, etc… soon I realized I needed to do more than just read about it. So for 2017, I decided it was time to take a deep dive into Machine Learning and see what all the buzz was about.

I haven’t programmed in 20 years but figured now would be a great time to restart. From all the reading I did in 2016 it was clear that the programming language of choice for Machine Learning was Python. I didn’t want to take a bunch of disconnected courses on Coursera and Udacity to learn about Machine Learning, instead I had a project in mind. When I moved to India 12 years ago, it was to launch an algorithm/quant hedge fund and I was the guy tasked with getting all the technology infrastructure (servers, data feeds, leased lines, datacenter access, etc…) in place and then over time I would learn to build trading algorithms. One thing led to another and I never got around to build those models. Over the years, I felt the algo/quant space was over done and it would be tough to get back into it. However there has been a resurgence with all of the new technologies involving Artificial Intelligence entering the space. So that was my goal, learn Machine Learning to trade the stock market.

I spent the first couple weeks of the new year putting together a plan to accomplish the end goal. The first thing was to take an introduction course on Python from Coursera. In parallel I was researching the algo/quant side and understanding what goes into building models, trading models and risk management. Not only did I want to learn about Machine Learning but whatever I did, I wanted to build it like it was going to be a billon dollar asset management company – highly redundant architecture, quality data feeds and top-notch risk management. It soon became clear this was something that was not going to get built over the weekend!

I was able to breakdown the work into 3 stages:
1. Infrastructure – cloud provider, servers, databases, data feeds, trade execution
2. Research trading models – researching and designing algorithms to produce “alpha”
3. Risk management – once the trade is made, constantly monitoring the position and making sure it fits within the risk model that has been designed. Or as they say within the industry Value at Risk (VaR).

This blog post will talk about the infrastructure and some of the technology I learned along the way.

It quickly became apparent that many of the Machine Learning experts were using something called Jupyter which is an open-source platform to share notebooks and run live Python code. It’s like an online version of an IDE (integrated development environment) that programmers use to build applications.

The next thing was to start getting data and lots of data onto the platform that I had built. For all the crap I talk about Yahoo, they have a pretty good finance section to download historical stock data for Indian stocks. Using pandas, a Python data analysis library, I was able to pull down all the price data I needed.

Some of the technologies I learned and implemented along the way:

  • Amazon Web Services – the cloud provider
  • EC2/Ubuntu – Linux distribution on an EC2 server
  • Let’s Encrypt – secure the server with a free SSL cert
  • Python – programming language
  • Jupyter – online IDE
  • pandas – data analysis library for Python (developed by an AQR employee)
  • Python scripting – used to get the daily price updates from Yahoo
  • RDS/MySQL – database where the price data resides
  • crontab – run the Python script at 2am in the morning
  • crontab.guru – a super simple site to understand the syntax for scheduling cron jobs
  • MySQLWorkBench – Software to interact with the MySQL DB
  • SQL statements – Structured Query Language (SQL) to manage and get data from the DB

Below is a SlideShare document showing the process of setting up the server on AWS:

Part 2 will talk about the research aspect of building trading models – the traditional methods and using the newer Machine Learning tools like Apache SystemML, Caffe2, Microsoft’s CNTK,  TenserFlow and Sciket-learn to name a few.