Weekly Market Update: May 18 2020

May 18, 2020

[fusion_builder_container hundred_percent=”no” equal_height_columns=”no” menu_anchor=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” background_color=”” background_image=”” background_position=”center center” background_repeat=”no-repeat” fade=”no” background_parallax=”none” parallax_speed=”0.3″ video_mp4=”” video_webm=”” video_ogv=”” video_url=”” video_aspect_ratio=”16:9″ video_loop=”yes” video_mute=”yes” overlay_color=”” video_preview_image=”” border_size=”” border_color=”” border_style=”solid” padding_top=”” padding_bottom=”” padding_left=”” padding_right=””][fusion_builder_row][fusion_builder_column type=”1_6″ spacing=”” center_content=”no” link=”” target=”_self” min_height=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” hover_type=”none” border_size=”0″ border_color=”” border_style=”solid” border_position=”all” border_radius=”” box_shadow=”no” dimension_box_shadow=”” box_shadow_blur=”0″ box_shadow_spread=”0″ box_shadow_color=”” box_shadow_style=”” padding_top=”” padding_right=”” padding_bottom=”” padding_left=”” margin_top=”” margin_bottom=”” background_type=”single” gradient_start_color=”” gradient_end_color=”” gradient_start_position=”0″ gradient_end_position=”100″ gradient_type=”linear” radial_direction=”center” linear_angle=”180″ background_color=”” background_image=”” background_image_id=”” background_position=”left top” background_repeat=”no-repeat” background_blend_mode=”none” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” filter_type=”regular” filter_hue=”0″ filter_saturation=”100″ filter_brightness=”100″ filter_contrast=”100″ filter_invert=”0″ filter_sepia=”0″ filter_opacity=”100″ filter_blur=”0″ filter_hue_hover=”0″ filter_saturation_hover=”100″ filter_brightness_hover=”100″ filter_contrast_hover=”100″ filter_invert_hover=”0″ filter_sepia_hover=”0″ filter_opacity_hover=”100″ filter_blur_hover=”0″ last=”no”][/fusion_builder_column][fusion_builder_column type=”2_3″ layout=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” border_position=”all” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding_top=”” padding_right=”” padding_bottom=”” padding_left=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” center_content=”no” last=”no” min_height=”” hover_type=”none” link=””][fusion_text]

U.S. Markets:

The major U.S. indexes retreated as investors reacted to bleak economic data and multiple warnings of further weakness ahead.  The declines were most pronounced in small-caps and slower-growing value stocks.  Health care and consumer shares held up relatively well, while energy stocks lagged despite a rise in oil prices.

The Dow Jones Industrial Average declined 646 points to finish the week at 23,685—a decline of -2.7%.  The technology-heavy NASDAQ Composite retreated the least, at -1.2%.

By market cap, the large cap S&P 500 gave up -2.3%, while the mid cap S&P 400 and small cap Russell 2000 fell a much larger -5.8% and -5.5%, respectively.

International Markets:

Major international markets were a sea of red last week.  Canada’s TSX declined -2.2%, while the United Kingdom’s FTSE retreated -2.3%.

The situation was worse on Europe’s mainland with France’s CAC 40 falling ‑6.0% and Germany’s DAX giving up -4.0%.

China’s Shanghai Composite fell -0.9%, while Japan’s Nikkei declined -0.7%.

As grouped by Morgan Stanley Capital International, developed markets were off -3.0%, while emerging markets ended down -2.2%.


Commodities
:

Precious metals, usually thought to be “defensive”, obligingly rose in the face of weakness in the equities markets.  Gold rose 2.5% to $1756.30 an ounce, while Silver surged a larger 8.2% to $17.07 an ounce.

Oil rose for a third consecutive week.  West Texas Intermediate crude oil finished the week up 12.8% to $29.52 per barrel.

The industrial metal copper, viewed by some analysts as a barometer of world economic health due to its wide variety of uses, finished the week down -3.1%.


U.S. Economic News
:

The number of Americans seeking first-time unemployment benefits pulled back last week, but the reading still remained above 2 million amid coronavirus shutdowns.  The Labor Department reported initial claims for unemployment insurance declined by 195,000 to 2.981 million, exceeding economists’ expectations of 2.7 million.  While filings declined for a sixth straight week, they continued to run in the millions.

Weekly readings of unemployment claims continue to be more than 10 times the number recorded at the start of the year.  Continuing claims, which counts the number of Americans already receiving unemployment benefits, increased by 456,000 to an unprecedented 22.833 million.  That number is reported with a one-week delay.

Sentiment among the nation’s small business owners continued to deteriorate significantly in the wake of the coronavirus and its associated economic lockdown.  The National Federation of Independent Business (NFIB) reported its Small Business Optimism Index fell 5.5 points to 90.9 last month.

However, the report wasn’t nearly as bad as economists’ expectations of a reading of just 84.8.  In the details of the report, while sales expectations plunged 30 points to -42 – the lowest level in the NFIB’s 46-year history – small-business owners reported they nonetheless expect business conditions to improve in the near future.  The index of expected business conditions six months from now climbed 24 points.  “Owners’ optimism about future conditions indicates they expect the recession to be short-lived,” the NFIB said.

Sales at U.S. retailers collapsed a record -16.4% in April amid a severe recession and widespread stay-at-home orders.  The consensus was for “just” a -12.3% decline.  Nearly all categories dropped by double digits.

Furniture, electronics, and apparel sales all fell by more than 50%.  Food store sales, which had gone up the previous month, fell by -13.1% in April.

The smallest declines were at building materials and garden supply stores as consumers took the extra time at home to work on homes and gardens.  Online sales was the lone retail category that posted an increase–up 8.4%.  On an annual basis, retail sales were down -7.6%–the steepest decline since September of 2009.

Prices at the consumer level posted their biggest decline since 2008.  Consumer prices declined -0.8% last month, led by tumbling gasoline prices.  The reading matched consensus forecasts.  Stay-at-home orders in large parts of the country kept Americans off the roads and curbed the need to fuel up.  Yet prices also fell by record amounts for a variety of other goods and services.  Clothes, auto insurance, hotel rooms, and plane tickets also showed record price drops.  However, the price of some high-demand goods did show increases.

The cost of groceries jumped +2.6% as Americans dined at home.  On an annual basis, the pace of inflation slowed to just 0.3% from 1.5% in March and 2.5% at the beginning of the year.  Core inflation, which strips out the cost of food and energy, fell a record -0.4% last month.  It was the first back-to-back decline in the core rate in 37 years.

At the wholesale level, prices had their largest decline on record as the coronavirus slowed the economy and crushed demand.  The Bureau of Labor Statistics reported the wholesale cost of goods and services sank -1.3% in April.  Economists had expected just a -0.5% drop.  The decline last month was its third negative reading in a row and the largest since the government reconfigured its wholesale report in 2009 to include financial services and healthcare.

On an annual basis, the rate of wholesale inflation turned negative for the first time since 2015, tumbling to -1.2% in April.  Plunging oil prices drove much of the decline in wholesale costs in April.  Gasoline prices sank almost -57%, the largest decline since the government began keeping track in 1947.

There was a tentative sign of a potential bottom in manufacturing in the New York area, according to the latest data from the New York Federal Reserve.  The NY Fed’s Empire State General Business Conditions index rebounded 29.7 points in May to -48.5, as factory activity contracted for a third straight month–but at a less severe rate.  Still, the reading is the second-lowest on record.  Economists had expected a reading of -65.

In the details, shipments, new orders, and employment all bounced off the previous month’s record lows.  Of note, the Expectations Index jumped 22.1 points (the most since April 2009) to 29.1–a ten-month high.  The reading indicates that manufacturers expect activity to sharply recover in the next six months.

Chart of the Week

April retail sales showed a decline in every category, topping out at a -78.8% decline in the “Clothing and Accessories” category.  Every category but one, that is.

The lone retail category to gain ground in April was “Nonstore Retailers”, kind of a roundabout way of saying “online sellers”. Led by Amazon, online retailers have seen a big jump in sales.

In the first quarter, Amazon reported sales jumped 26% year-over-year as consumers flocked to its site. The sales volume was so high that the company temporarily halted delivery for non-essential items and has hired an additional 175,000 workers, with still more being sought. And Amazon founder and CEO Jeff Bezos could become earth’s first trillionaire: the firm Comparisun predicts that Bezos could reach such an astounding level of wealth by 2026, if his wealth continues to increase at the pace of the past 5 years.

Riverbend Indicators Update

Counting-up of the number of all our indicators that are ‘Up’ for U.S. Equities, the current tally is that two of four are Positive, representing a multitude of timeframes (two that can be solely days/weeks, or months+ at a time; another, a quarter at a time; and lastly, the {typically} years-long reading, that being the Cyclical Bull or Bear status).

The CBOE S&P 500 Volatility Index (VIX) looks to be on the verge of reversing from its downward trend. We may start to see daily trading ranges begin to rise again, as well as higher volatility levels in both equity and fixed income markets.

Short term sector rotation continues, as relative strength among sectors continues to change on a month to month basis.

The Week Ahead

Monday: U.S. NAHB Housing Market Index 35 exp, 30 prior

Tuesday: German ZEW Economic Sentiment 30.0 exp, 28.2 prior U.S. Building Permits 1.00 mln, 1.35 mln prior Fed Chair Powell Testifies

Wednesday: Canadian CPI m/m N/A exp, -0.6% prior Australian Flash Manufacturing PMI N/A exp, 44.1 prior FOMC Meeting Minutes

Thursday: Jobless Claims U.S. Unemployment Claims 2400k exp, 2981k prior U.S. Flash Manufacturing PMI 37.5 exp, 36.1 prior U.S. Existing Homes Sales 4.31 mln exp, 5.27 mln prior Fed Chair Powell Speaks

Friday: Eurozone PMIs French Flash Services PMI 28.8 exp, 10.2 prior German Flash Manufacturing PMI 39.0 exp, 34.5 prior

[/fusion_text][fusion_code]PHN0eWxlPgogI19mb3JtXzE3M18geyBmb250LXNpemU6MTRweDsgbGluZS1oZWlnaHQ6MS42OyBmb250LWZhbWlseTphcmlhbCwgaGVsdmV0aWNhLCBzYW5zLXNlcmlmOyBtYXJnaW46MDsgfQogI19mb3JtXzE3M18gKiB7IG91dGxpbmU6MDsgfQogLl9mb3JtX2hpZGUgeyBkaXNwbGF5Om5vbmU7IHZpc2liaWxpdHk6aGlkZGVuOyB9CiAuX2Zvcm1fc2hvdyB7IGRpc3BsYXk6YmxvY2s7IHZpc2liaWxpdHk6dmlzaWJsZTsgfQogI19mb3JtXzE3M18uX2Zvcm0tdG9wIHsgdG9wOjA7IH0KICNfZm9ybV8xNzNfLl9mb3JtLWJvdHRvbSB7IGJvdHRvbTowOyB9CiAjX2Zvcm1fMTczXy5fZm9ybS1sZWZ0IHsgbGVmdDowOyB9CiAjX2Zvcm1fMTczXy5fZm9ybS1yaWdodCB7IHJpZ2h0OjA7IH0KICNfZm9ybV8xNzNfIGlucHV0W3R5cGU9InRleHQiXSwjX2Zvcm1fMTczXyBpbnB1dFt0eXBlPSJkYXRlIl0sI19mb3JtXzE3M18gdGV4dGFyZWEgeyBwYWRkaW5nOjZweDsgaGVpZ2h0OmF1dG87IGJvcmRlcjojOTc5Nzk3IDFweCBzb2xpZDsgYm9yZGVyLXJhZGl1czo0cHg7IGNvbG9yOiMwMDAgIWltcG9ydGFudDsgZm9udC1zaXplOjE0cHg7IC13ZWJraXQtYm94LXNpemluZzpib3JkZXItYm94OyAtbW96LWJveC1zaXppbmc6Ym9yZGVyLWJveDsgYm94LXNpemluZzpib3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CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgbm9fZXJyb3IgPSBmYWxzZTsKICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZWxlbXMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgaWYgKGVsZW1zW2ldLmNoZWNrZWQpIG5vX2Vycm9yID0gdHJ1ZTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKCFub19lcnJvcikgewogICAgICAgICAgdG9vbHRpcCA9IGNyZWF0ZV90b29sdGlwKGVsZW0sICJQbGVhc2Ugc2VsZWN0IGFuIG9wdGlvbi4iKTsKICAgICAgICB9CiAgICAgIH0gZWxzZSBpZiAoZWxlbS50eXBlID09J2NoZWNrYm94JykgewogICAgICAgIHZhciBlbGVtcyA9IGZvcm1fdG9fc3VibWl0LmVsZW1lbnRzW2VsZW0ubmFtZV0sIGZvdW5kID0gZmFsc2UsIGVyciA9IFtdOwogICAgICAgIG5vX2Vycm9yID0gdHJ1ZTsKICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGVsZW1zLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICBpZiAoZWxlbXNbaV0uZ2V0QXR0cmlidXRlKCdyZXF1aXJlZCcpID09PSBudWxsKSBjb250aW51ZTsKICAgICAgICAgIGlmICghZm91bmQgJiYgZWxlbXNbaV0gIT09IGVsZW0pIHJldHVybiB0cnVlOwogICAgICAgICAgZm91bmQgPSB0cnVlOwogICAgICAgICAgZWxlbXNbaV0uY2xhc3NOYW1lID0gZWxlbXNbaV0uY2xhc3NOYW1lLnJlcGxhY2UoLyA/X2hhc19lcnJvciA/L2csICcnKTsKICAgICAgICAgIGlmICghZWxlbXNbaV0uY2hlY2tlZCkgewogICAgICAgICAgICBub19lcnJvciA9IGZhbHNlOwogICAgICAgICAgICBlbGVtc1tpXS5jbGFzc05hbWUgPSBlbGVtc1tpXS5jbGFzc05hbWUgKyAnIF9oYXNfZXJyb3InOwogICAgICAgICAgICBlcnIucHVzaCgiQ2hlY2tpbmcgJXMgaXMgcmVxdWlyZWQiLnJlcGxhY2UoIiVzIiwgZWxlbXNbaV0udmFsdWUpKTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKCFub19lcnJvcikgewogICAgICAgICAgdG9vbHRpcCA9IGNyZWF0ZV90b29sdGlwKGVsZW0sIGVyci5qb2luKCc8YnIvPicpKTsKICAgICAgICB9CiAgICAgIH0gZWxzZSBpZiAoZWxlbS50YWdOYW1lID09ICdTRUxFQ1QnKSB7CiAgICAgICAgdmFyIHNlbGVjdGVkID0gdHJ1ZTsKICAgICAgICBpZiAoZWxlbS5tdWx0aXBsZSkgewogICAgICAgICAgc2VsZWN0ZWQgPSBmYWxzZTsKICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZWxlbS5vcHRpb25zLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIGlmIChlbGVtLm9wdGlvbnNbaV0uc2VsZWN0ZWQpIHsKICAgICAgICAgICAgICBzZWxlY3RlZCA9IHRydWU7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9IGVsc2UgewogICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBlbGVtLm9wdGlvbnMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgaWYgKGVsZW0ub3B0aW9uc1tpXS5zZWxlY3RlZCAmJiAhZWxlbS5vcHRpb25zW2ldLnZhbHVlKSB7CiAgICAgICAgICAgICAgc2VsZWN0ZWQgPSBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAoIXNlbGVjdGVkKSB7CiAgICAgICAgICBlbGVtLmNsYXNzTmFtZSA9IGVsZW0uY2xhc3NOYW1lICsgJyBfaGFzX2Vycm9yJzsKICAgICAgICAgIG5vX2Vycm9yID0gZmFsc2U7CiAgICAgICAgICB0b29sdGlwID0gY3JlYXR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IGVsc2UgaWYgKGlucHV0LnR5cGUgPT0gJ3JhZGlvJyB8fCBpbnB1dC50eXBlID09ICdjaGVja2JveCcpIHsKICAgICAgICAgICAgKGZ1bmN0aW9uKGVsKSB7CiAgICAgICAgICAgICAgdmFyIHJhZGlvcyA9IGZvcm1fdG9fc3VibWl0LmVsZW1lbnRzW2VsLm5hbWVdOwogICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcmFkaW9zLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBhZGRFdmVudChyYWRpb3NbaV0sICdjbGljaycsIGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICB2YWxpZGF0ZV9maWVsZChlbCwgdHJ1ZSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKGlucHV0KTsKICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQudGFnTmFtZSA9PSAnU0VMRUNUJykgewogICAgICAgICAgICBhZGRFdmVudChpbnB1dCwgJ2NoYW5nZScsIGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIHZhbGlkYXRlX2ZpZWxkKHRoaXMsIHRydWUpOwogICAgICAgICAgICB9KTsKICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQudHlwZSA9PSAndGV4dGFyZWEnKXsKICAgICAgICAgICAgYWRkRXZlbnQoaW5wdXQsICdpbnB1dCcsIGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIHZhbGlkYXRlX2ZpZWxkKHRoaXMsIHRydWUpOwogICAgICAgICAgICB9KTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICAgIHJlbW92ZV90b29sdGlwcygpOwogICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IGFsbElucHV0cy5sZW5ndGg7IGkgPCBsZW47IGkrKykgewogICAgICB2YXIgZWxlbSA9IGFsbElucHV0c1tpXTsKICAgICAgaWYgKG5lZWRzX3ZhbGlkYXR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c2UgdGhpcyB0cmljayB0byBnZXQgdGhlIHN1Ym1pdCBidXR0b24gJiBkaXNhYmxlIGl0IHVzaW5nIHBsYWluIGphdmFzY3JpcHQKICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI19mb3JtXzE3M19zdWJtaXQnKS5kaXNhYmxlZCA9IHRydWU7CiAgICAgICAgICAgIHZhciBzZXJpYWxpemVkID0gX2Zvcm1fc2VyaWFsaXplKGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdfZm9ybV8xNzNfJykpOwogICAgICB2YXIgZXJyID0gZm9ybV90b19zdWJtaXQucXVlcnlTZWxlY3RvcignLl9mb3JtX2Vycm9yJyk7CiAgICAgIGVyciA/IGVyci5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKGVycikgOiBmYWxzZTsKICAgICAgX2xvYWRfc2NyaXB0KCdodHRwczovL3JpdmVyYmVuZGludmVzdG1lbnRtYW5hZ2VtZW50LmFjdGl2ZWhvc3RlZC5jb20vcHJvYy5waHA/JyArIHNlcmlhbGl6ZWQgKyAnJmpzb25wPXRydWUnKTsKICAgIH0KICAgIHJldHVybiBmYWxzZTsKICB9OwogIGFkZEV2ZW50KGZvcm1fdG9fc3VibWl0LCAnc3VibWl0JywgZm9ybV9zdWJtaXQpOwp9KSgpOwoKPC9zY3JpcHQ+[/fusion_code][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container][fusion_builder_container hundred_percent=”no” hundred_percent_height=”no” hundred_percent_height_scroll=”no” hundred_percent_height_center_content=”yes” equal_height_columns=”no” menu_anchor=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” status=”published” publish_date=”” class=”” id=”” border_size=”” border_color=”” border_style=”solid” margin_top=”” margin_bottom=”” padding_top=”” padding_right=”” padding_bottom=”” padding_left=”” gradient_start_color=”” gradient_end_color=”” gradient_start_position=”0″ gradient_end_position=”100″ gradient_type=”linear” radial_direction=”center” linear_angle=”180″ background_color=”” background_image=”” background_position=”center center” background_repeat=”no-repeat” fade=”no” background_parallax=”none” enable_mobile=”no” parallax_speed=”0.3″ background_blend_mode=”none” video_mp4=”” video_webm=”” video_ogv=”” video_url=”” video_aspect_ratio=”16:9″ video_loop=”yes” video_mute=”yes” video_preview_image=”” filter_hue=”0″ filter_saturation=”100″ filter_brightness=”100″ filter_contrast=”100″ filter_invert=”0″ filter_sepia=”0″ filter_opacity=”100″ filter_blur=”0″ filter_hue_hover=”0″ filter_saturation_hover=”100″ filter_brightness_hover=”100″ filter_contrast_hover=”100″ filter_invert_hover=”0″ filter_sepia_hover=”0″ filter_opacity_hover=”100″ filter_blur_hover=”0″][fusion_builder_row][/fusion_builder_row][/fusion_builder_container]

By John Rothe, CMT

Founder & Chief Investment Officer

Riverbend Investment Management

Stay Connected