Exxon Mobil Inc. /zigman2/quotes/204455864/composite XOM +0.22% said it expects higher oil and gas and chemical prices to boost fourth-quarter earnings, but it is also expecting to write down $18 to $20 billion of upstream assets. In a regulatory filing, the oil giant said chemical margins would improve by $200 million to $400 million from the third quarter, while downstream margins would range from down $100 million to up $100 million. Changes in liquids prices would boost upstream earnings by up to $400 million from the third quarter. Exxon has posted losses for three straight quarters, battered by weak oil and gas prices, a slump in demand caused by the coronavirus pandemic and a big natural gas play in the acquisition of shale producer XTO Energy that has proven to be badly-timed. The company will report fourth-quarter earnings on Feb. 2. Shares were up 0.8% premarket, but have fallen 42% in the year to date, while the Dow Jones Industrial Average /zigman2/quotes/210598065/realtime DJIA -0.89% has gained 6.6% and the S&P 500 /zigman2/quotes/210599714/realtime SPX -1.10% has gained 15.5%.