Monday, March 16, 2020

COVID-19 in TN - "ITS THE SLOPE STUPID"


Situation


I have been away for two weeks in East Tennessee, when I drove back to Nashville on Thursday evening. I was struck by how light traffic was in downtown. On Friday morning my daughter's school notified us that after spring break they are suspending in person classes and shifting to online distance learning mode for two weeks. People were leaving grocery store with $600-$700 shopping bills (Yes Kroger had limited toilet paper to 3 rolls per shopper).

Reaction


My initial reaction was that the authorities and people were over reacting. I was thinking of the economic damage voluntary or involuntary 'lock downs' may cause. I also wasn't sure if we had enough data to justify these actions. So I decided to dig into the data.

The Data Set

I created a simple data set from daily 2 pm Tweets of TN Department of Health that shows number of total cases  in TN and cases in Williamson and Davidson counties that make the bulk of Nashville area population. This data set is shown below.

Data Analysis


First thing that struck me is why are we not publishing the data graphically? A simple line chart or a bar chart over time would go a long way. It will tell us the relative magnitude of the cases in different counties. It will also tell if the pace of new infections detected was increasing or decreasing. The chart below shows Total TN cases and cases in Williamson and Davidson counties over the last 1 week or so.

As we can see from the chart above, the slope (or change per day in number of cases) is increasing, in both TN as a whole and Davidson in particular. The data for Willliamson seems to indicate a stable if not flattening curve. Another was to look at data is to plot change in number of cases (or new cases) per day and the trend becomes even more clear.



Takeaways

Time and again I found it much more useful to see data as a time series and not individual pieces of data. When you look at increasing pace of COVID-19 infections, I am no longer in doubt that pretty dramatic measures have to be taken to prevent the spread of COVID-19 Virus. These may include closure of schools, public events, travel restrictions, work from home, practicing healthy hygiene etc. etc.. Irrespective of how we got here it is more important to focus on what we can do in the future.

(Note: These are my personal views and do not represent the views of my employer)

Sunday, February 9, 2020

Is your business losing money in spite of strong volume? How to make money without becoming slave to volume?






Over the past 20 years I have been involved in a number of businesses many in various stages of turnarounds. I have seen or executed both successful and unsuccessful turnarounds. Often the failures taught me more than successes did. By sharing this methodology and lessons learned I hope to make it easier for today’s leaders to tackle such situations. [AY1] 
I am sharing a simple process that analyzes profitability of products, and lays out specific steps to improve profitability through a combination of culling, margin improvement and volume growth.

The paradox of too much volume

Often sites or companies are in a difficult situation where no matter how much they increase the volume their profits do not go up. Reducing fixed costs also has little effect. The company is also short on availability of working capital. This results in either high cost of borrowing money for working capital or not having enough cash to fund safety inventory to enable smooth operations.
To identify if we have a margin spread problem, we start with a product profitability analysis. This example is for a manufacturing business. It can be applied to service delivery business as well except a majority of the costs will be for labor. For those who are unaccustomed to the financial terms please refer to the Profitability Basics and Glossary section at the end of the blog.

Collecting the necessary data

For an accurate analysis it is important to have good data. Most accounting systems (if kept up) should have this data that the company or site accounting or business finance group should be able to provide. You can typically use the last twelve month of data or a more recent period (say last 2 quarters) if there has been a big change in profitability. Specifically:
Volume and Price of products sold
Revenue from products
Actual raw material consumed per unit of product (not standard but from usage)
Average raw material cost (RMC)
Variable labor allocated for each unit of product
Labor rate fully burdened
Total plant or allocated fixed costs for the line  

Analyzing the data for profitability

The first test of profitability is: Are we generating sufficient variable margin to cover the fixed costs? Let us say the plant produces 6 different products with varying variable margin as in Table I below:

Table 1: Initial data set for profitability analysis

We do some data manipulation calculating variable margin generated by each product and also calculating VM % or Variable Margin as a % of Revenue. As long as the cumulative variable margin (18,700) is greater than the plant fixed costs the business should have positive gross margin. For the business to be truly profitable the gross margin should exceed the SG&A expenses. Next we sort the data with descending order of variable margin%.



Table 2: Re-sorted data with cum. margin and volume

Note the entire data set is sorted with VM% as the key, declining from 23% to -31%. We next calculate the cumulative volume and cumulative Variable Margin and plot Cumulative Variable Margin vs. Cumulative Volume. The results are show in Fig. 1.

C
 
 
Figure 1; Initial Product profitability Curve

The variable margin to volume curve can be divided into three sections.
Section A is the healthy margin section. With increase in volume variable margin goes up. So by bringing additional volume you will generate additional variable margin thus covering more of your fixed costs.
Section B is the low to flat growth section. With every additional volume you get very little increase in variable margin. While the overall impact of these products is positive given the low variable margin these products are not very attractive.
Section C is the negative variable margin section. The products do not have positive variable margin and you lose more money as you sell more. These products are the biggest opportunity for improving overall profitability of the business.

Key actions to improve profitability

Now that we have identified the profitability of various products and ‘leakage’ of profits due to certain products, it is time to deal with the ‘problem children.’


Fix or fire the underperformers

There are two ways to deal with these types of products (section C). Either you raise prices, or if customers are not willing to accept the price increase, stop making those products. If you go to your customers and tell them that you are losing money (cash not profits) over these products you will get a sympathetic ear. If customer sees value in this product they will (grudgingly) accept a price increase for these products, especially if you make an effort to take some cost out of the product. If the customers are not taking a price increase then give them 3-6 months (at a higher price) to reformulate, redesign or find equivalent parts elsewhere. Never cut off a customer with too short a notice. They will remember you and make sure you don’t get new business in the future


Enhance the profitability of low margin products

Once you got rid of (or straightened) the tail, your next step is to improve the profitability of the middle section (section B)By looking at raw materials reformulation, using cheaper alternatives, or finding alternate suppliers you can improve profitability. Some targeted and reasonable price increases, while difficult, are not impossible to get.  Next review the yield/defect rates for these parts and work with quality and manufacturing functions to improve yields for low yield productsOften the low profitability is due to high labor costs or high raw material costs.

Disproportionate resources for high margin products

Once you have addressed the low margin and negative margin products you are left with mostly products that show good margin growth with increasing volume. Your goal is to try to grow business by targeting customers and regions where we have low share for these products compared to elsewhere in the market. Invest disproportionate sales and marketing resources in selling these products for the low share customers and regions. The more you sell these products with high profitability, the more variable margin you will generate. This results in better fixed cost absorption and improved gross margin.

An example case study

Let’s take the above example and implement the steps describe above. First we look at section C. Let’s say we were not able to raise those prices sufficiently and decided to stop making the two products: ‘prod5’ and ‘prod6. We then look at products in section B and successfully raise the price by 5%. In the near term we leave the highly profitable products in section A as they are. The net results of these changes are shown in the Table 3 below.




Table 3: product data after pricing actions

The impact on variable margin is dramatic. The cumulative variable margin increases from 18,700 to 23,875 an increase of 27% with only a single price increase of 5% and eliminating the negative margin products. The higher margin is coming from 21.5% lower volume. This lower volume would also mean the business needs less cash to operate due to lower inventory and receivables and generates more margin. What’s not to like?! The new profitability curve is shown in Fig. 2:
Figure 2: Improved profitability curve


Key takeaways and recap

 Profitability is the number one measure of the health of an enterprise. Businesses that have low profitability cannot attract capital, are often working capital intensive, and do not generate enough margin to justify future investments in plant, technology and process improvement. A simple methodology is presented that calculates product profitability,

  • .     Raise prices or stop selling negative variable margin products.

  • .     Improve profitability of low margin products through a combination of raw material cost reduction, improved yield and price adjustments.
  • .     Invest disproportionate resources in promoting and selling high margin products in customers and regions where you have low share.
The results can be quite dramatic and lead to significant improvement in profitability. Thus for the same receivables and inventory you generate disproportionate cash allowing you to pay down debt and invest in your business. Ultimately it results in sound sleep for the owner and job security for the employees.

*******************************************************
Profitability basics

Those who don't have a financial or business background below I have defined some terms and lay out the basic math of profitability.
The profitability of a manufacturing operation at the plant or site level is measured as the gross margin in the Income Statement. It is defined by.

Gross Margin = Volume x (Unit Price – Raw material cost – variable labor) – (Fixed labor + Depreciation + fixed manufacturing costs).
If we group the terms together:
Gross Margin =( Volume x Price – Volume x variable cost) – Fixed cost
The first term in the right is often referred to as ‘variable margin,’ ‘margin spread’ or ‘contribution margin’.  We will abbreviate it as “VM”.
Gross Margin = Variable Margin – Fixed costs

Glossary
           
Volume
Number of Units Produced
Price
Net Price per unit after rebates and discounts
Revenue
Volume x Price
Raw Material Costs
Variable cost per unit of raw materials used

Labor hours per unit x labor cost/hr * (1+benefit rate)
Fixed labor
Fully burdened Variable labor labor costs  including ovhd labor, supervision
Fixed Plant cost
Plant utilities, insurance, maintenance cost and labor etc.



Sunday, December 1, 2019


The Impact of Tariffs on Consumers, Businesses and The Economy
                                               Hemant W. Dandekar

A few friends and colleagues have asked me about the US-China trade war and the impact of tariffs on consumers and businesses and the broader economy. So I decided to put my thoughts on paper, guided by writings of well known economists such as Ben Bernake[1].  So the questions I am trying to answer are:

1.      What are tariffs? Are they the only form of trade protectionism or are there others?
2.      What is the justification behind imposing tariffs?
3.      How do tariffs affect businesses and the broader economy?
4.      What evidence do we have of the impact of tariffs?

Tariffs and other forms of trade protectionism.

Prof Guarino from Rutgers outlines the various forms of trade protectionism in his blog[2]. Trade protectionism is certainly not limited to just tariffs, other forms such as quotas, subsidies, local content requirements, exchange rate controls etc. are quite prevalent.
1.      Tariffs: Tariffs are taxes imposed on goods imported from countries or trading blocks. They can be a fixed fee per unit or a % of value of the good. Tariffs are a form of import tax and are collected by government. Tariffs are means to restrict imports of goods and services and are meant to protect industries producing such goods.
2.      Quotas: Quotas are a restriction on the number or amount of certain goods or commodities. Usually these are enforced by issuing import licenses to individuals or companies.
3.      Subsidies: They are government payment to producers. They can be in the form of cash payments, low interest loans, tax breaks, free training for workers, land/manufacturing space etc. Subsidies provide cash, reduce manufacturing costs and allow domestic companies to compete against more efficient foreign competition or allow domestic companies to export to foreign markets.
4.      Local content requirements: Government may require a manufacture good to have say a 75% local content or face tariffs or quotas.
5.      Exchange rate controls: Countries can sell their currency (or adopt loose fiscal policies) in the open market to create lower exchange rates. This causes the good that are exported to be cheaper and imports more expensive, thus encouraging exports and discouraging imports.

Justification for trade protectionism

Governments have used a number of justifications for invoking trade restrictions.  These include:
1.      Protecting Jobs and Industries: This is the most common argument If unlimited imports are allowed domestic manufactures will suffer (if they have a higher cost structure than foreign competitors). This will cause them to cut back production. This will lead to loss of economies of scale and eventually manufacturers will shut down and it will severely impact GDP.
2.      National Security: Certain industries are crucial inputs for the defense industry such as high tech electronics, semi-conductors, supercomputers, aviation components etc.  By protecting defense industry from foreign competition a country’s existence is assured.
3.      Protecting startups:  Economies nurturing nascent industries which are well established in other countries, argue for protecting startups to give them time to establish themselves before they face foreign competition. Otherwise, they may not survive if they compete against well entrenched foreign competition.

Impact of Tariffs / Trade Protectionism

For the sake of simplifying arguments we will assume that the economy being affected is an ‘open economy.’ An open economy is one where there is no restriction of flow of goods both exports and imports. In an ‘open economy’ the price of a good is the same as the equilibrium world price defined by global supply and demand.

1.      Impact on goods and consumers: If a tariff is imposed, the price of the good is equal to world price plus tariff. The government collect the tariff as a tax. The consumer  pays more (as more often then not the business passes on the tax to the consumer especially if it is a unique good), resulting in a reduction in consumer demand. The domestic producer is better off, as the producer produces more and gets paid more for the good. The foreign exporter is worse off, as due to demand drop fewer goods are imported. If voluntary or involuntary import quotas are imposed, it benefits the holder of import license who can charge more for the good since supply is limited. Tariffs are inefficient as they force production to a higher cost producer and depress consumption, thus reducing the overall economic pie. An alternative is free trade where the winners (for e.g. consumers or retail stores) can compensate the losers (worker training for new horizon industries) so that everyone is better off.
2.      Impact on broader economy: If consumers have to pay more then it will likely trigger inflation. Similarly producers who import raw materials for producing goods have to pay more resulting in either lower margins (resulting in cost cutting or layoffs) or passing on the higher prices to consumers. This can also result in inflation. Startups may never mature: If startups don’t face foreign competition they will never know when they are at world class (quality and/or cost structure). In essence they will never grow up and the economy will suffer due to misallocation of resources. If due to protectionism trading partners will take reciprocal actions and impose tariffs on all trade leading to lack of free trade and a trade war. Availability of goods will be restricted across many sectors of the economy. This will result in higher prices, inflation and drop in demand. Exports will also become more expensive and as a result exports will drop.  Both of these would lead to drop in GDP. Eventually this will lead to a global recession.

The consensus among economists is that in the short run trade restrictions may help some industries / sectors of the economy, they do more harm (lower exports, higher prices) than good in the long run. Free trade leads to specialization and allocation of resources to the most efficient player. Governments should build mechanism to distribute the surplus created by free trade to help dislocated workers to learn and apply new skills in new industries.

Real world evidence of the impact of tariffs

In January 2018 the Trump administration imposed a 20% tariff on the first 1.2 M washing machines and 50% tariff on all subsequent units, imported in the US from all countries. A recent study by researchers University of Chicago [3] showed that in February 2019 the average price of a washer and dryer went up 12 % (they are often sold in pairs). Foreign producers (LG/Samsung) made plans to produce them in the US thus potentially creating 1600 jobs and Whirlpool said it will add an additional 200 workers. The government collected $82 Million in import taxes. However, these new jobs came at a steep price: after taking into account government collections, consumers paid on an average $817,000 per job!
The series of tariff announcements by the Trump administration and the counter tariffs by China has started a trade war between the two countries.  This has begun to show in the slowdown of the GDP of both US and China. According to IMF China’s real GDP growth rate is likely to slow from 6.6% in 2018 to 6.1% in 2019. The corresponding figures for the US are 2.9% in 2018 to 2.4% in 2019. Granted, not all of these reductions in real GDP are due to the trade war (for e.g. waning effect of fiscal stimulus due to tax cuts), but it does contribute to the economic slowdown, due to reduction in demand in industries such as auto, aircraft, agriculture, farm equipment etc.

Conclusion

The above examples show that there is a substantial price to pay for imposing tariffs, both the cost to consumers and to the overall economy. However, it is important to note that some of these steps may be necessary as there are inherent trade barriers that countries such as China already had in place, such as subsidies in terms of land and easy credit, exchange rate controls, not to mention subsidies by allowing theft of intellectual property. We as a nation have to be cognizant of this and also be aware of the costs we are willing/need to pay in the short run for our trade partners to eliminate these trade controls in the long run.

References

1.      Frank R. H., Bernake, B. S., ‘Protectionist Policies: Tariffs and Quotas’, in Principles of Micro-Economics, 2nd Ed, McGraw Hill, Irvin (2004).
2.      Guarino, A. S.,’ The Economic Effects of Trade Protectionism,’ Focus Economics.com Blog, March 1, (2018).
3.      Flaaen Aaron, Hortaçsu Ali, and Tintelnot Felix, ” Effects of US Trade Policy: The Case of Washing Machines” Beckman Friedman Initiative University of Chicago, April 2019

Note: These are my personal views and do not represent the views or positions of my employer..

Friday, February 3, 2017

A mobile phone activated remote switch to turn on an appliance

The Need: I have been playing with Raspberry PI interfaced sensors that send data to the cloud from our home or in a manufacturing plant using a WiFi or Ethernet link to the Internet. Unfortunately, WiFi networks can be flaky and one doesn’t always have Internet available at all locations especially remote areas. My friend Sanjay who is an avid pilot and who has multiple airplanes parked in a cold hanger outside of Detroit suburbs had a need. Since he didn’t have an internet connection at his hanger, he wanted a cell phone activated switch that would turn on a ‘heater blanket’ that would warm up his airplane engine while he was driving up to the hanger. This way he would have a warm plane waiting for him. The challenge was to do this remotely by cell phone.

Search for a solution/platform

My first decision was whether to use Raspberry Pi or Arduino. I had used Raspberry Pi before but didn’t have much experience interfacing Raspberry Pi with GSM. The interface required a lot of shell programming. The connection of Arduino with the GSM chip appeared to be more straightforward and didn’t have major operating system steps. Plus I visited my brother in India who is an expert in microcontrollers. He showed me a installation of  a GPS/GSM board  for Arduino that would transmit constant location data. It used a SIM 800 chip. However, communicating with the GSM board required knowing and using a number “AT” commands, which seemed tedious. He suggested I look for a board that has a built in library of routines, that would do all the phone functions for me. We quickly came across the FONA 808 platform from Adafruit. Not only does it have a high quality board, it also comes with extensive library that one can utilize for making calls, sending and receiving text messages etc. I didn’t really need a GPS functionality but ordered a board with GPS capability just in case I need it later for another project.

I ordered a FONA 808 from Adafruit and also a Arduino Uno and a headset so that I could make voice calls Besides the FONA 808 I ordered a LiPoly battery, an indoor GPS and a flexible GSM antenna both with uFl connector and a TING SIM card that has low rates using a T-Mobile 2G network that runs GSM. USmobile also has some attractive low cost plans with low voice/data/sms usage as well.

Time to put everything together

I started soldering the pins for the FONA 808 board. After soldering a number of small Arduino boards this wasn’t  that difficult. I did use magnifying glass on a stand so that I could see the locations where I needed to solder the pins without damaging the board or the chip. The biggest challenge was trying to fit the uFL antenna’s on the board. The GSM antenna went  on easily. Unfortunately, the GPS antenna socket got bent and I no longer have that functionality!! Next time I will use a different antenna holder or be more careful with the installation.

I loaded the FONA library and was able to download a test program on the Arduino. By Christmas day I was sending and receiving messages and also able to make phone calls using my Samsung headphone/mic. I now had a working 2G cell phone on the T-Mobile GSM network.

Now that I had a working phone it was time to break down the project into  a series of steps. These were:
  1.  Learn how to turn on a relay on or off using the Arduino microcontroller.
  2. Receive a SMS message from another phone to Arduino through the GSM board.
  3. Parse SMS message on the Arduino and identify the “ON/OFF” command.
  4. Convert ON/OFF message to a command that turns on and off a relay switch.
  5. Attach a sensor to the Arduino and send temperature readings from the “engine” to the activating cell phone.


Turning on a relay: I used source code/board design from a Sparkfun kit.  I connected a electromechanical relay to two LEDs – a yellow for ON  and a red for OFF. The relay was activated when a ‘digitalwrite’ signal was sent to a relaypin either as a HIGH or a LOW. This message was sent to a transistor which either sends an ON or OFF signal to the relay. I was able test to test the functionality of the relay using a separate test sketch (see attached video), where the relay repeatedly comes on or off every few seconds.

Receive messages and parsing them: The next step was to receive messages on the Arduino controller using the FONA  board. Once I connected the Transmit (TRX) pin of the FONA with the Receive (RX) switch of the Arduino board (and vice versa) and powered the FONA board with a 5V and Ground for power from the Arduino board, the FONA was able to connect with a local cell phone tower and establish a GSM connection. This shows up as a blinking blue light. I used a FONA_SMS_Response example sketch from the FONA library.  The sketch receives a text message and sends an acknowledgement to the sender. From this code one can save the text message received and the CallerID of the phone that sent the activation SMS message.

Now that I had established the SMS functionality it was time to ‘recognize’ the SMS text.  It was easier to get input from the library as a character array then convert it to a ‘string’ object using the ‘String’ function. Once you have a string object you can manipulate it using a number of string functions such as substring. I had two code words embedded in my text message one for ON and the other for OFF. This ensures that the program only responds to a pre-programmed mobile number of the owner. My daughter asked that in case we get a text from an unauthorized phone we send them an electronic “Boo!” I was able to modify the original code for receiving messages and to it the command recognition section and a relay activation section.

An additional functionality was to periodically send the temperature of the ‘engine’ using a DHT22 sensor that senses both temperature and humidity. This sensor is connected to the Arduiono board through a digital pin 8. I included two libraries in my code the ‘DHT.h’ library for the temperature humidity sensor and ‘Adafruit_FONA.h’ for the SMS/Phone functionality of the FONA 808 card. The sensor sends temperature in F. the temperature reading is converted to a two decimal character string.  This character string is appended to a descriptor header “Relay On, Temp(F)=” and sent by return SMS to the phone number.  [I am still working on incorporating the time functionality in Arduino (someday through a working GPS card) so that the Arduino can periodically send a text message with temperature of the engine. The combined setup looks like below.
Figure 1 Complete setup - Arduino Uno, FONA 808 (foreground) a relay switch and a DHT sensor

Real World test: Now it was time to test a real world application. I bought a 5V relay module on eBay that can turn on or off a 110 V/10A electrical connection. I spliced open a two prong extension cord and connected one of the spliced ends to the middle slot and one to ‘Normal Open’ (NO) setting. I connected a lamp to the switch and was able to turn on and off the lamp using a SMS message!! In real life instead of a lamp the relay will turn on/off a 500 W heater blanket on the airplane.

Later on one evening my friend Sanjay was able to send a text message from Detroit suburbs to my relay and turn it on remotely.

All in all it was a very satisfying project to finished. I learned a lot about GSM hardware and string manipulation in C, to parse text commands out of SMS text. I also learned about relays. Finally, I discovered the world of inexpensive 2G cell phone plans where one can get 100 mins of talk and text for less than $10/month – what a huge difference compared to a $70-$80/month Verizon or AT&T plan.

Future Development

  1.        Activate the GPS chip to receive time and send out periodic SMS of the temperature of the         engine.
  2.        Shut off the relay when temperature reaches a certain value.
  3.        Instead of using SMS use a GPRS connection with a web server where the user can log into the web server and turn on or off the relay. It would be more heavy on data usage.