  We study risk-sharing equilibria with general convex costs on the agents'
trading rates. For an infinite-horizon model with linear state dynamics and
exogenous volatilities, we prove that the equilibrium returns mean-revert
around their frictionless counterparts - the deviation has Ornstein-Uhlenbeck
dynamics for quadratic costs whereas it follows a doubly-reflected Brownian
motion if costs are proportional. More general models with arbitrary state
dynamics and endogenous volatilities lead to multidimensional systems of
nonlinear, fully-coupled forward-backward SDEs. These fall outside the scope of
known wellposedness results, but can be solved numerically using the
simulation-based deep-learning approach of Han, Jentzen and E (2018). In a
calibration to time series of prices and trading volume, realistic liquidity
premia are accompanied by a moderate increase in volatility. The effects of
different cost specifications are rather similar, justifying the use of
quadratic costs as a proxy for other less tractable specifications.
