Hello Community!

In his newest book, Trillions, Robin Wigglesworth describes “custom indexes”. For example, if you are religious and you don’t want to invest in guns, alcoholic beverages, or tobacco, you could invest in the S&P500 while excluding stocks from those industries.

We can easily implement this strategy using QuantConnect Lean, ETF Constituents, and Morningstar Fundamental data. First, we find the weight of each security in the SPY ETF that is part of the undesired industry. We then buy SPY and short the undesired stocks. We short the undesired stocks using the same weight they have in the SPY ETF to remove their presence in our portfolio.

The 26th UN Climate Change Conference, COP26, has inspired us to explore the following hypothesis: what if we invest in a custom index that excluded stocks from the Oil and Gas industry since the Paris Agreement (April 22nd, 2016)?

We have found that our index outperformed SPY with a Sharpe Ratio of 0.914 and a maximum drawdown of 32.2%, against the respective values of 0.88 and 34.3% from the benchmark.

Refer to the attached backtest.