{"id":1137,"name":"open-climate-investing","description":"Application and data for analyzing and structuring portfolios for climate investing.","url":"https://github.com/opentaps/open-climate-investing","last_synced_at":"2026-04-09T20:02:25.495Z","repository":{"id":37910683,"uuid":"394405521","full_name":"opentaps/open-climate-investing","owner":"opentaps","description":"Application and data for analyzing and structuring portfolios for climate investing.","archived":false,"fork":false,"pushed_at":"2022-10-20T23:35:21.000Z","size":41565,"stargazers_count":50,"open_issues_count":9,"forks_count":14,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-03-28T15:43:00.269Z","etag":null,"topics":["climate-change","climate-data","esg","factor-analysis","fama-french","finance","hacktoberfest","hacktoberfest2021","modern-portfolio-analysis","modern-portfolio-theory","stock","stock-market"],"latest_commit_sha":null,"homepage":"https://climate-investing-book.opensourcestrategies.com/v/main/book","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opentaps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-09T18:53:57.000Z","updated_at":"2026-02-16T05:43:26.000Z","dependencies_parsed_at":"2023-01-19T14:17:38.493Z","dependency_job_id":null,"html_url":"https://github.com/opentaps/open-climate-investing","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/opentaps/open-climate-investing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentaps%2Fopen-climate-investing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentaps%2Fopen-climate-investing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentaps%2Fopen-climate-investing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentaps%2Fopen-climate-investing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opentaps","download_url":"https://codeload.github.com/opentaps/open-climate-investing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentaps%2Fopen-climate-investing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31364574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T15:19:21.178Z","status":"ssl_error","status_checked_at":"2026-04-03T15:19:20.670Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"opentaps","name":"opentaps","uuid":"79276703","kind":"organization","description":null,"email":null,"website":null,"location":null,"twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/79276703?v=4","repositories_count":4,"last_synced_at":"2023-03-05T03:28:09.010Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/opentaps","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-15T05:12:11.304Z","updated_at":"2023-03-05T03:28:09.026Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opentaps","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opentaps/repositories"},"packages":[],"commits":{"id":1254633,"full_name":"opentaps/open-climate-investing","default_branch":"main","total_commits":573,"total_committers":7,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":81.85714285714286,"dds":0.47120418848167545,"past_year_total_commits":0,"past_year_total_committers":0,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":0.0,"past_year_dds":0.0,"last_synced_at":"2026-04-07T19:02:11.845Z","last_synced_commit":"8ac01b650d9133f90a64ebed84bb24d376cb5616","created_at":"2023-03-27T11:50:19.359Z","updated_at":"2026-04-07T19:01:58.531Z","committers":[{"name":"Si Chen","email":"sichen@opensourcetrategies.com","login":null,"count":303},{"name":"Jeremy Wickersheimer","email":"jwickers@gmail.com","login":"jwickers","count":132},{"name":"Matthew Bowler","email":"matt.bowls@gmail.com","login":"mattbowler","count":78},{"name":"Si Chen","email":"1706353+sichen1234","login":"sichen1234","count":46},{"name":"Ignacio Mangini","email":"ignacio.mangini43@gmail.com","login":"Igna43","count":8},{"name":"Konstantin Rybalko","email":"konstantin.rybalko@gmail.com","login":"rybalko","count":5},{"name":"hai-yr","email":"wyer@usc.edu","login":"hai-yr","count":1}],"past_year_committers":[],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentaps%2Fopen-climate-investing/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-09T00:00:23.197Z","repositories_count":6212625,"commits_count":911269218,"contributors_count":35167410,"owners_count":1143411,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"opentaps/open-climate-investing","html_url":"https://github.com/opentaps/open-climate-investing","last_synced_at":"2026-02-01T11:03:51.899Z","status":"error","issues_count":30,"pull_requests_count":1,"avg_time_to_close_issue":2612535.380952381,"avg_time_to_close_pull_request":12236.0,"issues_closed_count":21,"pull_requests_closed_count":1,"pull_request_authors_count":1,"issue_authors_count":3,"avg_comments_per_issue":1.6666666666666667,"avg_comments_per_pull_request":0.0,"merged_pull_requests_count":1,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"created_at":"2023-05-09T10:41:11.009Z","updated_at":"2026-02-01T11:03:51.899Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentaps%2Fopen-climate-investing","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentaps%2Fopen-climate-investing/issues","issue_labels_count":{},"pull_request_labels_count":{},"issue_author_associations_count":{"CONTRIBUTOR":26,"COLLABORATOR":3,"NONE":1},"pull_request_author_associations_count":{"CONTRIBUTOR":1},"issue_authors":{"sichen1234":26,"mattbowler":3,"clintonTE":1},"pull_request_authors":{"hai-yr":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-01T00:00:08.271Z","repositories_count":14037064,"issues_count":34584035,"pull_requests_count":113175312,"authors_count":11213073,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{},"past_year_pull_request_authors":{},"maintainers":[{"login":"mattbowler","count":3,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/mattbowler"}],"active_maintainers":[]},"events":{"total":{"WatchEvent":7},"last_year":{"WatchEvent":2}},"keywords":["climate-change","climate-data","esg","factor-analysis","fama-french","finance","hacktoberfest","hacktoberfest2021","modern-portfolio-analysis","modern-portfolio-theory","stock","stock-market"],"dependencies":[],"score":6.023447592961033,"created_at":"2023-09-11T11:54:37.049Z","updated_at":"2026-04-09T20:02:25.496Z","avatar_url":"https://github.com/opentaps.png","language":"JavaScript","category":"Sustainable Development","sub_category":"Sustainable Investment","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"# open-climate-investing\r\n\r\nThis project's mission is to make climate investing actionable.  It includes both open source software and a free book to help you identify relative value trades, optimize portfolios, and structure benchmarks for climate aligned investing.\r\n\r\n## The Software\r\n\nThe software is a multi-factor equity returns model which adds a climate factor, or Brown Minus Green, to the popular Fama French and Carhart models.  See the [short video](https://youtu.be/0sdhTd0E9s0)\n\nThis additional Brown Minus Green (BMG) return factor could be used for a variety of climate investing applications, including:\r\n- Calculate the market-implied carbon risk of a stock, investment portfolio, mutual fund, or bond based on historical returns\r\n- Determine the market reaction to the climate policies of a company\r\n- Optimize a portfolio to minimize carbon risk subject to other parameters, such as index tracking or growth-value-sector investment strategies.\r\n\n### Setting It Up\n\nInstall the required python modules (use `pip3` instead of `pip` according to your python installation):\r\n```\r\npip install -r requirements.txt\r\n```\r\n\r\nInitialize the Database using:\r\n```\r\npython3 scripts/setup_db.py -R -d\n```\r\n\n### Trying It Out\n\nLet's get the historical stock prices and returns of the MSCI World Index and its constituent sectors:\n```\npython scripts/get_stocks.py -f data/msci_etf_sector_mapping.csv \npython scripts/get_stocks.py -f data/msci_constituent_details.csv\n```\n\nNow let's calculate the risk factor loadings for these stocks using 60 months of monthly data at a time:\n```\npython scripts/get_regressions.py -d -f data/msci_etf_sector_mapping.csv -s 2010-01-01 -e 2021-01-31 --frequency MONTHLY -n DEFAULT -i 60 -b\npython scripts/get_regressions.py -d -f data/msci_constituent_details.csv -s 2010-01-01 -e 2021-01-31 --frequency MONTHLY -n DEFAULT -i 60 -b\n``` \n\nNext, let's create a daily version of the BMG climate risk series based on the difference between the stocks XOP (brown) and SMOG (green):\n\n```\npython scripts/bmg_series.py -n XOP-SMOG -b XOP -g SMOG -s 2018-01-01 -e 2022-02-01 --frequency DAILY\n```\n\nFinally, let's calculate the risk factor loadings for stocks using 2 years of daily data.  This will take a long time:\n```\npython3 scripts/get_regressions.py -d -f data/msci_etf_sector_mapping.csv -s 2018-01-01 -e 2021-01-31 --frequency DAILY -i 730 -n XOP-SMOG -b\npython3 scripts/get_regressions.py -d -f data/msci_constituent_details.csv -s 2018-01-01 -e 2021-01-31 --frequency DAILY -i 703 -n XOP-SMOG -b\n```\n\r\n### Viewing the Results\r\n\r\nFollow directions from the [dashboard README page](ui/README.md) to look at your results.\n\r\n## The Book\r\n\r\nThe included [free book on climate investing](book/README.md) explains both climate investing concepts and how to use this project.  You can also [read it online at gitbook](https://app.gitbook.com/@opentaps/s/open-climate-investing/v/main/book).\r\n\r\n## Project Files\n\n- [scripts/](scripts/README.md) contains the python scripts used to run the models.\n- [ui/](ui/README.md) contains the dashboard.\n- [data/](data/README.md) contains the data files for the models and a list of their sources.\n- [R/](R/README.md) contains R scripts which were used to develop the models. \n- [book/](book/README.md) is the included book on climate investing.\r\n\r\n## References\r\n- [Constructing and Validating Climate Risk Factors from ESG Data: an Empirical Comparison](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3967613)\r\n- [Carbon Risk Management (CARIMA) Manual](https://assets.uni-augsburg.de/media/filer_public/ad/69/ad6906c0-cad0-493d-ba3d-1ec7fee5fb72/carima_manual_english.pdf)\r\n- [A Practitioner's Guide to Factor Models](https://www.cfainstitute.org/en/research/foundation/1994/a-practitioners-guide-to-factor-models)\r\n- [The Barra US Equity Model (USE4)](http://cslt.riit.tsinghua.edu.cn/mediawiki/images/4/47/MSCI-USE4-201109.pdf)\r\n- [Network for Greening the Financial System, Case Studies of Environmental Risk Analysis Methodologies](https://www.ngfs.net/sites/default/files/medias/documents/case_studies_of_environmental_risk_analysis_methodologies.pdf)\n\n#### Get Updates\n\n[Sign up](https://opentaps.org/subscribe) for our email newsletter to get updates on this book and the [Open Climate Investing project](https://github.com/opentaps/open-climate-investing).\r\n\n#### Disclaimer\n\n_This content is published for informational purposes only and not investment advice or inducement or advertising to purchase or sell any security.  See [full disclaimer](book/Disclaimer.md) and [license](LICENSE)._\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":["volttron","blockchain-network","blockchain-technology","climate","dlt"],"project_url":"https://ost.ecosyste.ms/api/v1/projects/1137","html_url":"https://ost.ecosyste.ms/projects/1137"}