All Eyes On The Fed

Apr 27, 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″ layout=”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 columns=”” column_min_width=”” column_spacing=”” rule_style=”default” rule_size=”” rule_color=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=””]

U.S. Markets:

Most of the major indexes fell moderately last week as investors digested first-quarter earnings reports and the plunge in oil prices.  The Dow Jones Industrial Average gave up 467 points to finish the week at 23,775, a decline of -1.9%.  The technology-heavy NASDAQ Composite gave up just -0.2% finishing at 8,635.

By market cap, the large cap S&P 500 declined -1.3%, while the mid cap S&P 400 fell -0.7%.  The small cap Russell 2000 went the other way, finishing the week in the green, up 0.3%.

International Markets:

Canada’s TSX was the only major international market to finish in the green for the week, rising 0.4%.  The United Kingdom’s FTSE gave up -0.6%, while France’s CAC 40 and Germany’s DAX declined -2.3% and -2.7%, respectively.

In Asia, China’s Shanghai Composite fell -1.1% and Japan’s Nikkei gave up -3.2%.

As grouped by Morgan Stanley Capital International, developed markets fell -1.0% while emerging markets declined -1.9%.

Commodities:

Precious metals were mixed last week with Gold rising 2.2% to $1735.60 per ounce, while silver declined -0.2% to $15.26 an ounce.

Carnage continued in the crude oil market, West Texas Intermediate crude plunged over 32% last week, finishing the week at $16.94 per barrel.  The expiring futures contract for oil actually went negative early in the week, wiping out many traders in the process.

The industrial metal copper, viewed by some analysts as a barometer of global economic health, declined -0.3%, just its first down week in the last five.

U.S. Economy:

The number of Americans applying for first-time unemployment benefits fell by 810,000 to 4.4 million, but claims remained far above the levels from just five weeks ago.  Economists had expected a reading of 4.3 million.

The cumulative number of first-time unemployment benefits over the past five weeks has soared to 26.453 million as businesses shuttered across the country in the wake of COVID-19.  The spike in unemployment has likely pushed the jobless rate to between 15% and 20%, economists estimate.

Continuing claims, which counts the number of Americans already receiving unemployment benefits, came in at a record 15.967 million.

The housing market, a stalwart of the U.S. economy, finally caved under the pressure of social distancing and stay-at-home policies: existing home sales plunged 8.5% in March—its largest decline since November of 2015.  Economists had expected a decline of only 7.5%.  From the same time last year, home sales were still up 0.8%, but that was the slowest pace since last July.

By region, sales declined across the country, led by a double-digit decline in the West.  Despite the weaker demand, months of available supply picked up only slightly to 3.4 from 3.0 months as inventories remained tight.  Despite the drop in existing home sales, prices continued to rise, up 8.0% year-over-year.

New home sales, likewise, declined 15.4% last month to a 627,000 annual rate—their steepest decline since July 2013.  The reading is a ten-month low and below the consensus of a 647,000 unit rate.  Sales fell across the country, led by the Northeast and West regions with drops in the 40% range.

New home inventory ticked up 2.8% to 333,000 units.  However, months of available supply, which relates inventory to current demand, jumped by 1.2 months to 6.4, as demand for new homes weakened significantly.  Prices, however, did not budge much.  On a year-over-year trend basis, the median new home price increased 4.7%, while the mean price was up 2.8%

The sentiment of the nation’s consumers appeared to stabilize toward the end of this month after suffering its biggest decline on record.  The University of Michigan reported that the final reading of its consumer-sentiment survey in April edged up 0.8 point to 71.8.  The final reading reflected hopes among Americans that the economy will improve later in the year after the early onslaught from the coronavirus.

The stabilization in consumer sentiment mirrors the results of a similar weekly survey by Morning Consult.  Of interest, Americans recognize the dire state of the economy at present – the portion of the sentiment survey that examines how Americans view the present has plunged 40.5 points over the past two months.  Yet another part of the survey that gauges attitudes for the coming six months has fallen by just half as much.  The divergence indicates consumers expect the economy to improve later in the summer.

The latest data from Markit showed both of its flash Purchasing Managers Indexes (PMI) continued to plummet this month.  Markit’s PMI for services and manufacturing showed a stunning collapse in U.S. business activity at the start of the second quarter as many service and production businesses remained closed.

The Services PMI plunged 12.8 points to 27.0—a record low, while the Manufacturing PMI dropped 11.6 points to 36.9—its lowest level since March 2009.  Both domestic and foreign demand plummeted reflecting the global nature of the pandemic.  Furthermore, purchasing managers do not expect a recovery anytime soon–business sentiment regarding the outlook for the next 12 months slumped to a record low.

The Chicago Fed reported its National Activity Index (CFNAI) sank a record 4.25 points to -4.19 last month—its lowest reading since January of 2009.  The index’s smoothed three-month average dropped 1.67 points to -1.47.  The report noted both the CFNAI and its trend are consistent with a deep recession.

Furthermore, the cyclical slowdown implies falling inflationary pressures.  All four of the broad categories of indicators made negative contributions with production and employment declines faring the worst.  Of the 85 individual indicators tracked by the CFNAI, 65 made negative contributions reflecting the very wide breadth of the contraction.

Chart of the Week:

With the price of oil in the spotlight once again, it may surprise you that overall the price of gas, even when it was much higher than the current relatively low value, is still relatively cheap per gallon compared to several other consumer products.

What’s the most expensive fluid that any consumer is likely to ever buy?  Printer ink – and it’s not even close.

No wonder they seem to practically give away the darn printers themselves!  (Chart from First Trust)

Market Indicators:

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 S&P 500 Index continues to have trouble rising above its 50-day moving average — a possible indication that investors are waiting to see what the Fed may say during this week’s Federal Reserve Meeting.

In addition, approximately a fifth of the S&P 500 index will be reporting earnings this week, including some market-moving names.

Among S&P 500 sectors, Healthcare, Consumer Discretionary, and Communication Services continue to show the highest levels of relative strength vs the SPX:

However, on a weekly basis, the strength in equity names — that are historically more in line with market direction (no defensive or hard asset sectors) — is starting to erode vs cash for the first time since the March 23rd lows.

The Week Ahead:

Monday: Bank of Japan Monetary Policy Statement

Tuesday: U.S. CB Consumer Confidence 90.1 exp, 120.0 prior Earnings: GOOG, UPS, CAT, MMM, SBUX, AMD

Wednesday: U.S. Growth U.S. Advance GDP q/q -3.9% exp, +2.1% prior U.S. Pending Home Sales m/m -11.0% exp, +2.4% prior FOMC Meeting and Statement China Manufacturing PMI 51.0 exp, 52.0 prior Earnings: MSFT, BA, ADM, GD, FB, TSLA,

Thursday: Blue-Chip Earnings German Retail Sales m/m -8.4% exp, +1.2% prior U.S. Unemployment Claims 3500k exp, 4427k prior U.S. Personal Spending m/m -4.2% exp, +0.2% prior U.S. Chicago PMI 38.0 exp, 47.8 prior Earnings: AMZN, AAPL, AAL, MO, CMCSA

Friday: U.S. ISM Manufacturing PMI 36.7 exp, 49.1 prior Earnings: XOM, CVX, ABBV, CLX

(Sources:  All index- and returns-data from Yahoo Finance; news from Reuters, Barron’s, Wall St. Journal, Bloomberg.com, ft.com, guggenheimpartners.com, zerohedge.com, ritholtz.com, markit.com, financialpost.com, Eurostat, Statistics Canada, Yahoo! Finance, stocksandnews.com, marketwatch.com, wantchinatimes.com, BBC, 361capital.com, pensionpartners.com, cnbc.com, FactSet.)

[/fusion_text][fusion_code]PHN0eWxlPgogI19mb3JtXzE3M18geyBmb250LXNpemU6MTRweDsgbGluZS1oZWlnaHQ6MS42OyBmb250LWZhbWlseTphcmlhbCwgaGVsdmV0aWNhLCBzYW5zLXNlcmlmOyBtYXJnaW46MDsgfQogI19mb3JtXzE3M18gKiB7IG91dGxpbmU6MDsgfQogLl9mb3JtX2hpZGUgeyBkaXNwbGF5Om5vbmU7IHZpc2liaWxpdHk6aGlkZGVuOyB9CiAuX2Zvcm1fc2hvdyB7IGRpc3BsYXk6YmxvY2s7IHZpc2liaWxpdHk6dmlzaWJsZTsgfQogI19mb3JtXzE3M18uX2Zvcm0tdG9wIHsgdG9wOjA7IH0KICNfZm9ybV8xNzNfLl9mb3JtLWJvdHRvbSB7IGJvdHRvbTowOyB9CiAjX2Zvcm1fMTczXy5fZm9ybS1sZWZ0IHsgbGVmdDowOyB9CiAjX2Zvcm1fMTczXy5fZm9ybS1yaWdodCB7IHJpZ2h0OjA7IH0KICNfZm9ybV8xNzNfIGlucHV0W3R5cGU9InRleHQiXSwjX2Zvcm1fMTczXyBpbnB1dFt0eXBlPSJkYXRlIl0sI19mb3JtXzE3M18gdGV4dGFyZWEgeyBwYWRkaW5nOjZweDsgaGVpZ2h0OmF1dG87IGJvcmRlcjojOTc5Nzk3IDFweCBzb2xpZ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IGlmICghZWxlbXNbaV0uY2hlY2tlZCkgewogICAgICAgICAgICBub19lcnJvciA9IGZhbHNlOwogICAgICAgICAgICBlbGVtc1tpXS5jbGFzc05hbWUgPSBlbGVtc1tpXS5jbGFzc05hbWUgKyAnIF9oYXNfZXJyb3InOwogICAgICAgICAgICBlcnIucHVzaCgiQ2hlY2tpbmcgJXMgaXMgcmVxdWlyZWQiLnJlcGxhY2UoIiVzIiwgZWxlbXNbaV0udmFsdWUpKTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKCFub19lcnJvcikgewogICAgICAgICAgdG9vbHRpcCA9IGNyZWF0ZV90b29sdGlwKGVsZW0sIGVyci5qb2luKCc8YnIvPicpKTsKICAgICAgICB9CiAgICAgIH0gZWxzZSBpZiAoZWxlbS50YWdOYW1lID09ICdTRUxFQ1QnKSB7CiAgICAgICAgdmFyIHNlbGVjdGVkID0gdHJ1ZTsKICAgICAgICBpZiAoZWxlbS5tdWx0aXBsZSkgewogICAgICAgICAgc2VsZWN0ZWQgPSBmYWxzZTsKICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZWxlbS5vcHRpb25zLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIGlmIChlbGVtLm9wdGlvbnNbaV0uc2VsZWN0ZWQpIHsKICAgICAgICAgICAgICBzZWxlY3RlZCA9IHRydWU7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9IGVsc2UgewogICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBlbGVtLm9wdGlvbnMubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgaWYgKGVsZW0ub3B0aW9uc1tpXS5zZWxlY3RlZCAmJiAhZWxlbS5vcHRpb25zW2ldLnZhbHVlKSB7CiAgICAgICAgICAgICAgc2VsZWN0ZWQgPSBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBp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AgICAgICAgICAgfSk7CiAgICAgICAgICAgIGFkZEV2ZW50KGlucHV0LCAnaW5wdXQnLCBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICB2YWxpZGF0ZV9maWVsZCh0aGlzLCB0cnVlKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0LnR5cGUgPT0gJ3JhZGlvJyB8fCBpbnB1dC50eXBlID09ICdjaGVja2JveCcpIHsKICAgICAgICAgICAgKGZ1bmN0aW9uKGVsKSB7CiAgICAgICAgICAgICAgdmFyIHJhZGlvcyA9IGZvcm1fdG9fc3VibWl0LmVsZW1lbnRzW2VsLm5hbWVdOwogICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcmFkaW9zLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBhZGRFdmVudChyYWRpb3NbaV0sICdjbGljaycsIGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICB2YWxpZGF0ZV9maWVsZChlbCwgdHJ1ZSk7CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKGlucHV0KTsKICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQudGFnTmFtZSA9PSAnU0VMRUNUJykgewogICAgICAgICAgICBhZGRFdmVudChpbnB1dCwgJ2NoYW5nZScsIGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIHZhbGlkYXRlX2ZpZWxkKHRoaXMsIHRydWUpOwogICAgICAgICAgICB9KTsKICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQudHlwZSA9PSAndGV4dGFyZWEnKXsKICAgICAgICAgICAgYWRkRXZlbnQoaW5wdXQsICdpbnB1dCcsIGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIHZhbGlkYXRlX2ZpZWxkKHRoaXMsIHRydWUpOwogICAgICAgICAgICB9KTsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgIH0KICAgIHJl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gPSB3aW5kb3cuX29sZF9zZXJpYWxpemU7CiAgfSk7CiAgdmFyIGZvcm1fc3VibWl0ID0gZnVuY3Rpb24oZSkgewogICAgZS5wcmV2ZW50RGVmYXVsdCgpOwogICAgaWYgKHZhbGlkYXRlX2Zvcm0oKSkgewogICAgICAvLyB1c2UgdGhpcyB0cmljayB0byBnZXQgdGhlIHN1Ym1pdCBidXR0b24gJiBkaXNhYmxlIGl0IHVzaW5nIHBsYWluIGphdmFzY3JpcHQKICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI19mb3JtXzE3M19zdWJtaXQnKS5kaXNhYmxlZCA9IHRydWU7CiAgICAgICAgICAgIHZhciBzZXJpYWxpemVkID0gX2Zvcm1fc2VyaWFsaXplKGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdfZm9ybV8xNzNfJykpOwogICAgICB2YXIgZXJyID0gZm9ybV90b19zdWJtaXQucXVlcnlTZWxlY3RvcignLl9mb3JtX2Vycm9yJyk7CiAgICAgIGVyciA/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