Markets with frictions: transaction costs and liquidity risk