Knowledge Seeker
  • Home
  • Articles

Algorithms 101 (Seven Minutes to Read)

2/17/2012

 
The biggest difference between an algorithm program and a standard software program like MicroSoft Word, is the algorithm can make decisions for itself while standard software programs do what’s told to do. A good way to look at it is like a child versus a consultant. You wouldn’t ask a child for advice instead you’d tell the child what to do. Whereas an algorithm software program is more like having a professional consultant who you could ask questions of and let her give you advice. 

Let’s take a look at a regular software program like MicroSoft Word. With just a click of a button you can add bullet points, bold your text, change the color of your font, increase the size of your font, print the document, etc. The software program just sits back and waits for a command from you and then it executes it. It doesn’t have to think for itself, the programmer did the thinking for it. This is more like a child parent relationship.

Algorithm programs are way more sophisticated. Algorithms would get bored if they waited for you to click a button on your computer and then it did exactly what’s told. Instead they prefer to be presented problems like: where’s the best location to put a 45,000 square foot store, which brokerage firm is getting ready to make a large stock transaction and how can I beat them to the trade? What’s neat about algorithms (and scary) is they can learn from mistakes and modify their next approach. Unlike a regular software program it continues to improve on its own.

A question like: “Where is the best location to put a 45,000 sq. foot store?” requires a bunch of different variables (i.e. anchor tenant, city’s economic strength, competitive activity, demographics, desired traffic flow & volume, employee capabilities, etc.). This is exactly what algorithms love because the program has to weigh a lot of different factors and not all of them carry the same weight as the others. The program might see that almost every variable looks good but it might drop the location all together if the traffic volume isn’t there and/or cars couldn’t get in and out of the location easily.      

Algorithms were first used by engineers, mathematicians, and physicists but now they’re being used all over the place; for example in stealth technology. Our physicists and scientists worked together to come up with a way to prevent radar waves from detecting our aircraft. What they did (in layman’s terms) was place hundreds of thousands of transmitters all over the aircraft. They then created an algorithm that randomly turns these transmitters on and off and it does it in an unrecognizable pattern that changes in milliseconds.

With the above in mind, when a radar operator sends out a radar wave it starts going crazy because there’s stuff all over the place. One second it senses objects coming from one direction and then a second later it’s no longer there. What ends up happening is the radar wave gets too confused to know there’s a single, large object in the sky so it returns to the operator with nothing to report. So as the radar operator takes a sip of Coke, a 156 ton bomber flies by heading for its target. Amazing!

Another application for algorithms is in the stock market. There’s a whole other world behind the scenes filled with information specialists, network engineers, physicist (I believe there’s over 2,000), scientists, software programmers, etc., and they’re the ones making the brokerage firms money. Having knowledge about which stocks to buy and sell isn’t nearly as important as executing the trade before another broker does. Beating brokers to trades is called Algo Trading.

There’re a lot of reasons they use algorithms and one of these is so they can hide large trades. For example they can put in a purchase order for 1,000,000 shares of Procter & Gamble and unless they do something about it, the other brokers are going to know the position they’re taking; also known as tipping your hand. So instead of making the move for a million shares in one block, the algorithm breaks the trades down into thousands of different trades to where their move would be less noticeable. Then just as the trade gets ready to be executed the algorithm bundles the million share order back together again.

This is the same concept stealth technology uses. As brokers send out their own algorithms looking for large stock trades, the broker executing the trade uses their algorithm to break the trade apart so their competition can’t figure out what they’re doing. But knowing what a competitor is doing means nothing unless they’ve got the speed they need to beat their competitor to the trade.

The reason they want to get in on a trade before the other broker is so they can buy in at the price the other firm is expecting to pay. Usually when a firm decides to make a move on a stock they have what they want to pay and they have a little fluff built in so if the stock price goes up a little from what they originally saw, the trade would still go through.

Let’s say the firm was expecting to pay $30 a share but without their knowledge a competitor sniffed out what they were doing and bought the 1,000,000 shares before they did. By the time they execute a trade the price might’ve moved to $31 a share. They’ll make the purchase and they won’t know who drove the price up.

What’s funny is the broker who snuck in on the deal could sell their shares immediately back for $31 and their competitor would be the one buying the stock. Nobody would know this is going on though. So in a matter of milliseconds they bought and sold shares and made $1,000,000. The best part is they did nothing but turn loose their algorithm and it did all the work. If a brokerage firm gets burned like this a few times they can usually figure out that an algorithm has their number. They then write a script that goes after their competitor’s algorithm and takes it out of commission. The game goes on and on.

Stock brokers are now trying to use their algorithms to find other ones in the system and then trip them up temporarily. If it’s successful, it only throws the algorithm off for milliseconds but that fractional amount of time is usually enough to take a bad day in the market and turn it into a good one. Could you imagine if your success or failure was determined by milliseconds? If it were me, I’d buy the I.T. department coffee, donuts, gifts; whatever they wanted to make them happy!

It’s all about the speed. They buried an 825 mile optic cable between the Chicago Stock Exchange and the New York Stock Exchange. They can now trade thousands of shares in a round trip trade transaction in only 13.3 milliseconds. Wow!

With speed being so important to these brokers they’ve figured out the closer they get to New York City’s internet hub, the faster they can be. NYC’s internet hub is in the famous Carrier Hotel. The hotel was sold several years ago and gutted in order to put massive computer systems and optic cabling in. Every internet cable from the northeast taps in to the Carrier Hotel.

With this in mind, three savvy brokerage firms purchased buildings close to the Carrier Hotel and set up their own network hubs along with sophisticated algorithms. Because of what they did, they’re around eight microseconds faster than some of the other firms who are just five blocks further away from the hotel. With their increased speed and effective algorithms they can tear the other brokers apart.

I’ll give you just two more quick examples of algorithms in action. Netflix has tried several programs using artificial intelligence. They wanted an algorithm which could successfully pick videos for their customers. Their latest algorithm called Pragmatic Chaos is now selecting 60% of the videos which are ordered. What’s amazing is that the algorithm was only making good picks less than 30% of the time but it kept improving on its own to where it’s now 60% successful.  

This one is really wild. Hollywood asked a couple of scientist to come up with a way to predict movie sales. The scientist realized they could do it and started a company in Los Angeles called Epagogix. They developed an algorithm that lets the studio know how long their movie will run along with total box office sales. It must be working as Epagogix is still in business.

I’ll wrap up with something alarming. In 2010 the stock market temporarily lost around 9% of its value. You probably didn’t hear about it (I didn’t), but it was called the Flash Crash of 2:45. To this day, they haven’t agreed upon what happened. Their best guess is that a couple of algorithms got into a fight and tripped up the rest of the system. It corrected itself before the end of the day.

We can’t help ourselves so we’ll continue to create programs that don’t need human intervention because artificial intelligence keeps getting more and more sophisticated. This means a computer will be able to take millions of variables and come up with a decision that’s better than we could. This reminds me of 2001: A Space Odyssey. Scary!


Comments are closed.

    Author: John Mann

    Picture

    Archives

    March 2023
    February 2023
    January 2023
    December 2022
    November 2022
    October 2022
    September 2022
    August 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    February 2022
    January 2022
    December 2021
    November 2021
    October 2021
    September 2021
    August 2021
    July 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2020
    March 2020
    February 2020
    January 2020
    December 2019
    November 2019
    October 2019
    September 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    June 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    April 2015
    March 2015
    February 2015
    December 2014
    November 2014
    October 2014
    September 2014
    August 2014
    July 2014
    June 2014
    May 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013
    October 2013
    September 2013
    August 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    February 2013
    January 2013
    December 2012
    November 2012
    October 2012
    September 2012
    August 2012
    July 2012
    June 2012
    May 2012
    April 2012
    March 2012
    February 2012

    RSS Feed

Proudly powered by Weebly