Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Algorithms for Ethical Investors - Is there an easy(ish) way to incorporate social / environmental responsibility into an algorithm?

I tend to prefer investing in 'ethical' or 'socially responsible' businesses (although I realize that term is relative!) That tends to mean I prefer equities that aren't involved with arms, tobacco, heavy polluting industry and that provide basic (and hopefully better) rights for workers and that takes steps to reduce environmental impact.

Is there a way to incorporate social responsibility / ethical data algorithmically? For example, using data from somewhere like: http://www.climatecounts.org/scorecard_sectors.php?id=13 - If I can find good socially / ethically responsible measures, I am assuming I could incorporate those using Fetcher (providing I can get it into a CSV format.)

I am guessing that another alternative would be to provide an overall 'pool' of equities that have been determined to be socially responsible to an algorithm (so say 50 stocks) and then have the algorithm carry out analysis on those on a regular basis and combine that with other signals to determine whether to buy, hold or sell.

Any insight anyone can provide would be much appreciated!

10 responses

Paul, I really like this question, it's good to hear that your bottom line includes the social value added by a company.

I'm optimistic, but I think that as time rolls on, corporate social responsibility is only going to become more important to investors. As more investors scrutinize the environmental/social value a company adds, it strengthens a feedback loop that incentivizes companies to add social value because it brings them investors.

Sustainability issues are common to everybody, in other words, they're problems that can't be ignored. As they become more immediately relevant, more money will have to be thrown at them. I think that in the long run, investing in the companies leading that charge will be a good financial investment, not just an investment in your conscience.

I'm not sure how you would go about using social responsibility data algorithmically. It's a subjective topic that is hard to quantify because everybody has different values, but here is some links you might find useful.

The Triple Bottom Line Tool

Measuring the Effects of Corporate Social Responsibility

KLD, a social responsibility ETF (I bought this yesterday)

Dow Jones Sustainability Indicies

Valuing corporate social responsibility: McKinsey Global Survey Results

Please share any updates and sources of information as you look into this.

Best,
David

Second David's comments, this is a really interesting area. In my experience there are a number of quantified data sources aimed at helping investors incorporate Environmental, Social and Governance (ESG) components into their investment processes, but they tend to be proprietary content sources that come with an industrial/professional asset management price tag.

I wasn't able to get at the DJSI constituents for example, though it looks like its possible for students to make an academic request for this data (along with signing an NDA).

I know that (my former employer) Thomson Reuters bought a company called Asset4 that collects a wide range of ESG indicators, and interestingly they do appear to now offer a portal that makes at least some of this data accessible to individuals. It's still not free though and I'd certainly make no claims on whether it's value would outweigh the cost ($600/year), but possibly the tour and/or 30 day free trial would be interesting (http://www.trcri.com/index.php?page=regjoin)

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Paul, here's a quick and dirty script to scrape the website you provided. It should be fairly easy to convert "scores" to a CSV (csv.DictWriter). Beware I didn't implement any error checking (bad me).

from bs4 import BeautifulSoup  
import re  
import urllib2

url = "http://www.climatecounts.org"  
content = urllib2.urlopen(url + "/scorecard_overview.php").read()  
soup = BeautifulSoup(content)  
sectors = soup.find_all(href=re.compile("scorecard_sectors.php"))

scores = {}  
for sector in sectors:  
    sector_content = urllib2.urlopen(url + sector.get("href"))  
    sector_soup = BeautifulSoup(sector_content)  
    # Use sector name as dict index  
    sector_title = sector_soup.find(id="sector_title_h1").get_text().strip()  
    scores[sector_title] = {}  
    # This weird looking thing is getting the company names and scores on each sector and pairing them.  
    companies = sector_soup.find_all(attrs={"class": ["scoredcard_sector_company", "scoredcard_sector_scorenum"]})  
    companies = [companies[i:i + 2] for i in range(0, len(companies), 2)]  
    for company in companies:  
        scores[sector_title][company[0].get_text().strip()] = int(company[1].get_text().strip())  
print scores  

Paul, great idea, to follow and add to Nelson's comments, check out Kimono Labs at https://kimonolabs.com. It's a new service that allows you to create a structured API from a website with predictable data structures such as the one you listed above. BeautifulSoup is a nice scraper, but Kimono gives you another option for getting at that data.

Good luck!

db

Folks, there didn't seem to be one decent list of CSR securities, so I am creating one, I have reviewed a number of different websites and CSR measures and am currently collating all of the data together on ethically responsible businesses. Once I am done cleansing the data and filling in information, I will make it publicly available to all Quantopian members via a Google Spreadsheet and may also create a public Google Finance Portfolio with all of the businesses listed (so that financials are updated live).

So far I have around 500 securities sourced from the following areas:

  • Robeco/Dow Jones Sustainability Index
  • The Reputation Institute
  • CSR Hub
  • Sustainable Business Green Investing Guide
  • New Alternatives Fund
  • Sustainable and Green Initiatives Fortune
  • World's most admired companies for CSR

The securities are from many different industries - Food, retail, manufacturing, consultancy, clean energy, new technology, biotech, pharma etc.

I plan to include the business name, industry, ticker, stock ID and fundamentals - The idea is that then other quants can use the information to build algorithms that will invest in CSR stocks. I expect to have the information ready over the next couple of days.

Good idea Paul.
Social benchmark in business is as important and interesting as the government through government securities.

This demand Governmental Bonds SID.
For example, the World Bank indicators included in universal indicator Climate Change, because the end result is the interaction between businesses, governments and society that seek to increase the per capita income, per capita income and per capita revenues are reflected in the country's rating.

http://goo.gl/gxCEfX

You may want to use the Newsweek Green Rankings as a source too....http://www.newsweek.com/green/americas-greenest-companies-2014

Nice! I love data! Thanks Paul, I will incorporate it.

NP. I'm really intrigued and interested in your work here...look forward to seeing your progress.

Hi all, I have now created the first iteration of the CSR spreadsheet - Details here.