Tobacco giants, fossil fuel companies and weapons makers have typically been among those to have been excluded from sustainable portfolios.