Uknj.github.io Thoughts, observations and more...

Book Review! Business Adventures, by John Brooks.

The first of what will hopefully be many reviews of books that I find intriguing and/or entertaining. This article will cover a brief summary of the first chapter of the book, and any thoughts/opinions I may have along with relevant links.

Business Adventures is quite an old book, having been published in 1969. Regardless, I still found several facts surprisingly relevant to modern businesses and believe that the information and knowledge collected can be used even in the 21st century.

The author, John Brooks (1920–1993) was a writer and longtime contributor to The New Yorker magazine, where he worked for many years as a staff writer, specializing in financial topics. Brooks was also the author of several books, both fiction and non-fiction, the best known of which was an examination of the financial shenanigans of the 1960s Wall Street bull market.[1]

Bill Gates has claimed it is “The best business book I’ve ever read”. It was first given to him by Warren Buffet back in 1991.[2] Bill Gates has reviewed the book and it can be found here. He even provides a free download to one of the chapters.

Chapter 1: The Fluctuation.

This chapter covered the flash crash of 1962 in particular, the May 28th/29th crash. The chapter opens with a brief history of the stock exchange and then goes on to give information on the drop in the Dow Jones and the volumes of trades which occurred and compare them briefly to the 1929 crash for the week of May 21st to May 25th. After a brief explanation of how news of trades was communicated back in the day (a truly interesting method and prone to making easy mistakes during high volume times), the writer goes into detail about the delays occurring on the stock exchange ticker and the panic that was slowly taking over investors. After going on to mention the potential effect(s) of mutual funds and margin calls on the stock market, Brooks continues the story as the stock market goes into tuesday. Europe which was effectively behind New York by 24 hours had experienced the shockwaves of yesterday, with several stock markets making massive losses. The big question at the time was would the avalanche of market drops continue. However, as it transpired during the first few hours of trading, the market did not stop its free fall, with practically no purchasers of certain stock and plenty of sellers.

But by a little past mid day, the market was on the upswing. Due to the large delay on the stock exchange ticker, share prices were 1 hour behind, giving the impression that prices were still low whereas the reality was that a buying panic was slowly beginning to take place. After an analysis on the reason the stock market was turning and an enthralling mention about American Telephone & Telegraph (now known as AT&T) and it being one of the key reasons the stock market turned.

Brooks finally ended the story with a mention about the inefficiency of the stock exchange in that era, with orders getting lost, delays between recieving the customers buy/sell order and being able to execute it. Nowadays it is hoped that such things can be avoided with the use of the internet and modern day technology.

Despite this flash crash being over 50 years ago, the psychology of the modern day investor appears to have remained the same.

For another interesting take on the crisis, and how it related to the flash crash of 2010, please read this WSJ article WSJ article. In addition, there are some news paper articles (also WSJ) from 1962, providing a detailed account of what was ocurring at the time.

  1. Abreast of the Market
  2. The Market Plunge
  3. Heller Says Economic Prospects Provide No Basis for Sharp Stock Market Drop
  4. SEC Probes Market to See if the ‘Pros’ Helped Trigger Drop

This is the first part in a series that will summarize and review the book Business Adventures by John Brooks.

Citations:

[1]Wikipedia
[2]GatesNotes

Ardupilots and Ultrasounds!

As part of my degree, I was asked to design and build an autonomously controlled ground vehicle with a team. The big caveat was that it was all to be done within a budget of 250 GBP.

Note: This included construction of chassis and electronics etc etc.

The design method we decided to use for the navigation was to use an Ardupilot. In order to avoid obstacles, we settled upon using ultrasonic sensors. This was because they were suitable for the required location (outdoors with little to no chance of interference) and that the Ardupilot firmware could navigate based on such devices see here.

However upon further research it was discovered that the Ardupilot only directly supported only a few ultrasonic rangefinders. The cheapest of these was 30USD (almost 20 GBP) and would take a large chunk out of our already tight budget. (The ardupilot and GPS cost roughly in the location of 50GBP combined). While researching ultrasonic sensors I came accross the HC-SR04 sensor, these cost $2 each and were much cheaper. Since they were so cheap, I ordered some to figure out if they could be used in conjunction with the APM.

I discovered through trial, error and research that the APM only accepted analogue voltage, PWM would not work. The HC-SR04 however worked by measuring the time the pulse took to return see documentation. Running on an Arduino and using the equation given in the documentation example, the distance to the object could be returned. However this was still a far cry from the voltage required by the APM to operate. It might have been possible to modify the firmware on the APM to work directly with the ultrasonic sensor, however this would have been much too time consuming for our needs.

We therefore decided to output the voltage as PWM values from an Arduino, convert it to steady voltage and input it to the APM.

In order to convert the PWM to voltage, we used a DAC (Digital to analogue converter). The one that proved most suitable for the job was the LTC2644. Subsequently, the circuit was buildt for the LTC2644 as shown in the documentation.IN^A and IN^B were the PWM outputs from the Arduino respectively, and V^OUTA and V^OUTB were the pins that will go into the Ardupilot. NB: I could only get one of the ultrasound sensors to actually communicate with the APM, however both do output steady voltage and should in theory work.

I then connected the the V^OUT into the APM as shown here, where the Voltage and Ground were the standard voltage ground connections on the Arduino and Pin 3 was the V^OUT. After setting up the parameters correctly, the ultrasound sensor worked fine.

The code uses an equation (the map function) that converts the distance into PWM values. This mapping will vary based on the distance of the sensor we are emulating. This line of code (map(ultraleft.Ranging(CM), 0, 431, 0, 70)) uses the map function is based on the 10m sensor and according to its datasheet, “For the 10 meter sensors (MB1260, MB1261, MB1360, MB1361), this pin outputs analog voltage with a scaling factor of (Vcc/1024) per 2 cm. A supply of 5V yields ~4.9mV/2cm., and 3.3V yields ~3.2mV/2cm.” After some maths the above map function can be derived. Somewhat arbitrarily I used a maximum of 431 for the value that the HC-SR04 sensor will return as I found that when approaching the maxmimum value of 5m the sensor would appear to give somewhat erratic values.

I do believe that the function can still be optimized, however for a ground based rover it is accurate enough. I will at some point upload the table of values/settings used for the APMw, will update when it is done. EDIT 30/08/2015: This is now done, please check the relevant git commit.

If you have any improvements to the code, please do make a pull request.

Happy Hacking, Uknj