Governance, Decentralized

Code is law.

Define Governance: the act or process of governing or overseeing the control and direction of something (such as a country or an organization).

In this article, I will focus on whether any organization can have decentralized governance, and what does that even mean? And how is this related to cryptocurrencies. Let’s start with a very basic organization, and see whether it can be governed in a decentralized way.

What is an organization anyway?

Say some people want to pool their money and use it for charity. We have ourselves a rudimentary organization. During the organization’s inception, the founders make some bylaws – for example: for any charitable donation to happen, say 2/3rd of the remaining capital in the pool has to approve it. These bylaws are written down formally in a “human language” (the language being a “human language” is important). The organization will register itself with the government of that geographical area (let’s say, a country). In case disputes arise in the future, the courts of that country will interpret the bylaws of the organization, apply the relevant common laws of that country, and with the threat of force, ask the members of the organization to abide by the court’s judgment. We kind of get how this works.

I will call this “centralized governance”, because the dispute resolution is adjudicated by a centralized authority. In an ideal world, this centralized authority is fairly appointed by representatives of the people who were fairly elected by the people to carry out such appointments.

Enter Smart Contracts

If the bylaws were precisely written down in an unambiguous computer language, and deployed on a distributed computer that could not be stopped, or taken over by any single authority – we have a decentralized organization. It’s governance is encoded in the program that was deployed on the distributed computer. Ideally, once deployed, the program cannot be changed, and can be arbitrarily run by anyone forever. Who are the members of this organization? Let’s say the program has a function that accepts money as input, and gives out an equivalent valued token – anyone who makes such a function call is a member of this organization, as they have a stake in the program. Do disputes arise in such an organization? No. To see why the answer is “no”, we have to understand that this system adheres to the maxim: “Code is Law”. The program does exactly what it was programmed to do – there is no randomness or discretion or uncertainty in the execution. This faithful execution of the program obsoletes the idea of dispute resolution.

Ethereum smart contracts are such programs. They are deployed and run on Ethereum, which is a distributed network of computers that ideally cannot be censored or stopped. Ethereum has a richer programming language, along with the notion of a smart contract having monetary deposits, and other arbitrary data. Using this setup, one can write a smart contract that represents the charitable organization that we saw earlier. In fact, back in 2016, when Ethereum was still in its infancy, exactly such an organization was deployed as a smart contract on it. It was called The DAO, or the decentralized autonomous organization. It could accept funds from anyone, and with token holders voting for projects, would fund these projects from the collective pool of funds. Venture capitalists thought that the DAO would disrupt the VC industry itself, and added their own funds into the pool. At its peak, the DAO had 14% of all of ETH pooled inside it (ETH is the native currency of the Ethereum system). I didn’t read the code of the DAO, and am not sure how a project got actual funding – was some ETH moved to the recipient’s address? How would the DAO verify that the recipient actually produced something of value, if that artifact was not native to the blockchain itself? In the cryptocurrency space, it’s important to ask these questions – as the answers are not obvious, and often times hide red flags that indicate possible scams.

But as it turned out, this DAO program itself had a software bug, and that allowed a clever hacker to drain the uninvested funds into their own control. To “fix” this “hack”, people who had enough social clout in the Ethereum ecosystem managed to undo history, and start an alternate timeline where this hack never happened.

What?!?!

How does one undo history and make alternate timelines?

It’s the settlement assurances, stupid1

Let’s start with an example. Let’s say your credit card is stolen, and is used to buy strange things in strange lands. You call your credit card issuer and ask them to undo history, and start an alternate timeline where the theft never happened, and you have a clean slate of your own previous transactions and new transactions. Where did the thief’s transactions go? Turns out that they were never “settled”. In the traditional finance world, very very few transactions are actually “fully settled”. Transactions between countries, or between large banks, or those that are brokered by central banks are considered settled for good, and are truly irreversible. The rest of the world’s transactions can be reversed, if the right people are convinced.

In Ethereum, where code is supposed to be law – alternate timelines should not have been possible. The hacker took out the pooled funds from the DAO because the smart contract allowed that to happen. That’s the bylaws of the contract, and the hacker is playing by the rules. There shouldn’t be a discretionary voice that says “But that’s not the spirit of the law”. Smart contracts are only supposed to respect the word of the law, and not the spirit of the law. Ethereum, in its early days at least, believed that the spirit of the law mattered more than the word of the law, and allowed the DAO hack to be “bailed out”.

Ethereum is just one such “network computer” (blockchain, to keep up with the times) that runs such code-is-law smart contracts. There are other blockchains that claim to do the same, and have varying degrees of centralization that allows the powers-that-be to “bail out” certain contracts if shit his the fan. On the other hand, Bitcoin doesn’t even allow such powerful smart contracts, and the rudimentary smart contracts that it does allow, have never been reversed because some people lost their money. I think it’s an important distinction that makes Bitcoin the most (if not the only) credible blockchain in existence, but that’s just me.

Governance, through code

Coming back to Ethereum smart contracts which act as decentralized autonomous organizations, how can governance rules be changed if all token holders agree to it? We now get into some of the more sophisticated governance models for smart contracts, which can all be coded into the initial smart contract itself. Here’s one popular model:

In our original charity smart contract, we had the initial bylaw that 2/3rds of the total pool had to apply every new donation. Let’s say we want to change this rule to have 3/4 instead of 2/3. While writing the initial smart contract, this particular constant (2/3) is delegated to a different smart contract that is deployed first, and the main smart contract calls this other smart contract to perform it’s actions. In software programming, this is either called “delegation” or “forwarding” or “a pimpl – pointer to an implementation”. The difference between a classic software program that does this, vs a smart contract that does the same thing – is that in a smart contract with decentralized governance, the change in implementation of a functionality has to be voted by token holders. This is how it looks:

  1. The initial smart contract is written in such a way that the following steps are supported.

  2. Someone (doesn’t matter who) codes a new piece of functionality and deploys it on the blockchain. For now, this is dead code, as no one is executing it. But everyone can see what it does.

  3. Someone (again, doesn’t matter who) makes a proposal in the original contract that they would want to call a vote for this new functionality from step (2) to replace the equivalent step in the original code.

  4. There is a timeline for token holders of the smart contract to vote for this proposal. Votes are tallied. The result is known.

  5. If the governance change is approved, there is an additional time window before it comes into effect. Token holders who are unhappy that this change was made can withdraw their capital from the pool by returning or burning the tokens.

  6. The governance change is affected by changing the smart contract implementation of this functionality from the original to the new.

Many smart contracts on Ethereum have the so called “governance token” that allows token holders to change the rules of the smart contract if enough such token holders vote for it.

  1. Uniswap, the popular decentralized exchange on Ethereum, has its own governance token UNI, which allows UNI holders to vote for governance changes like increasing or decreasing the fee taken by the protocol per exchange trade.

  2. Compound, a smart contract for credit issuance on Ethereum, has its own governance token COMP, which allows COMP holders to affect governance changes – like how they recently voted to change their price oracle.

  3. MakerDAO, the smart contract behind the stable coin DAI, has its own governance token MKR, which allows MKR holders to change the parameters of the DAI stablecoin, and how it maintains its 1:1 peg against the USD.

In my naïve unqualified opinion, these governance tokens can sometimes pass the Howey test, and could qualify as securities under some regulatory regime.

What’s in it for me?

Many tokens/coins are available to buy on many cryptocurrency exchanges.

  1. Some are native coins of their own blockchains – like BTC/ETH. Many of these native coins are centralized, issued to investors first, and dumped on the general public later.

  2. Some are ERC-20 tokens on the Ethereum blockchain. They represent governance rights on protocols, and thereby generate cash flow.

  3. Some are tokens on other blockchains. Most blockchains’ native currencies themselves are worth nothing. Tokens that are launched on these blockchains are even trickier.

  4. Some are even more complex tokens issued by smart contracts that govern other smart contracts.

  5. Some tokens are blatantly pointless, and are valuable just as collectibles: remember NFTs?

Some tokens have a point, but are still worth nothing.

Some tokens have a point, and might be worth something.

To keep life simple, one can just buy Bitcoin. If that’s too conservative (it’s not), maybe add ETH to the mix (don’t).

Enjoy the conversation


Previously, on our crypto channel:

define: bitcoin

define: ethereum

Bitcoin is Forever

On NFT’s

So Doge

DeFi for the rest of us

1

Read more here: https://medium.com/@nic__carter/its-the-settlement-assurances-stupid-5dcd1c3f4e41

Global Equities Momentum

A slice of Dual Momentum

Gary Antonacci created the Global Equities Momentum (GEM) model that applied dual momentum to stock and bond indices. It toggles between stocks and bonds using 12-month trailing returns. And when it toggles to “stocks,” it chooses between US equities and International (ex-US) equities based on whichever posted higher returns in the previous 12-months. The model uses the S&P 500 index as a stand-in for US equities and the WORLD ex USA index for international stocks.

Investors can use the ETFs SPY/VOO for the S&P 500, SCHF for World ex-US DMs and AGG for bonds while replicating this strategy.

The best part about this strategy is its simplicity. It takes just 3 inputs and anybody can set it up on Google Sheets. Execution is as simple as it gets because at any given point in time, it is long just one ETF. Also, given that it uses a 12-month look-back, it is less prone to whiplashes, resulting in a lower trading frequency.

Specifications & Expressions

When you automate systematic strategies, you need to nail down its exact specifications. In this case, they are mainly: inputs, look-back periods and traded instruments.

The original version of the Strategy uses the S&P 500 and World ex-US both for inputs and as proxies for the traded instruments. However, there is no reason why they both should be the same. Also, what is so magical about a 12-month look-back period anyway? Why can’t it be 6 -months, a month or an average of the last 6-months?

The Strategy only describes a broad idea with one set of Specifications and Expressions out of a multitude. It can (and should) be adapted to fit one’s risk profile and investment horizon.

The Momentum Expression

The easiest tweak to the original strategy is to swap out the traded equity instruments with their momentum counterparts.

At the final step, when it comes to executing the trade, you can use MTUM, the US Momentum ETF instead of SPY/VOO and IMTM, the DM ex-US Momentum ETF instead of SCHF.

Long-only momentum ETFs are highly correlated to their market-cap counterparts but have the potential to juice returns in bull-markets. Since we are trend-following anyway, why not go a step further up the risk-curve and embrace momentum as well?

This is the basic idea behind our Global Equities Momentum I strategy.

The Look-Back Specification

Picking a look-back for trend-following strategies is fraught with data-mining bias. One could potentially test 100s of periods and pick one that gave the best results historically. The data-mined look-back could even work in forward tests but inexplicably, and suddenly, fail in real portfolios.

The safest thing to do would be to not change the look-back periods outlined in the original research. However, the world would’ve changed since its first publication. How do you strike a balance between the two?

This is what we’ve tried to do in our Global Equities Momentum II strategy.

Long look-backs are slow at reacting to rapidly changing markets. Some might say that this is a bug while some might argue that this is a feature. Shorter look-backs, on the the other hand, can react faster but are prone to head-fakes and whiplashes.

The second version of our GEM strategy tries walk the fine line by taking the average of 6- through 12-month returns. It tries to hew close to the original research while acknowledging that the world has gotten faster since it was first published.

No Free Lunch

While the strategy adapts to the broad, slow-moving macro theme of US equity under-performance vis-à-vis rest-of-the-world (were it to occur,) it is not immune to getting whiplashed due to short and steep market dislocations like the COVID crash of March 2020. The strategy got into bonds just when the equity markets were recovering and stayed there until well-after. It is simply not possible to avoid all landmines when it comes to investing.

While we ran our back-tests, we tried a fair amount of permutations and combinations. Some where discarded in spite of having better risk-adjusted returns because they lacked internal consistency. While some slipped into data-mining territory in spite of our best efforts to avoid it. Readers interested in the process and the code can read through our GEM Collection.



Related: ETFs for Asset Allocation

Synthetic Indices

Popular indices, like NIFTY 50 & MIDCAP 150, are useful if you are benchmarking long-only portfolios. However, if you have a long-short portfolio, then you need a long-short benchmark.

When Are Contrarian Profits Due To Stock Market Overreaction? (Lo, MacKinlay, 1990) describes a naïve portfolio construction process that is fit for purpose.

For momentum, portfolio weights are in proportion of excess returns over an equal-weighted index and for mean-reversion, they are the inverse.

For example, if you subtract the returns of each of the components of the NIFTY 50 index with the returns of NIFTY 50 EQUAL-WEIGHT index and divide by 50, you end up with the portfolio weights for the next day. Each look-back period used to calculate returns will produce a different set of weights (and a different synthetic index.)

As impractical as constructing such a portfolio may seem, they are useful as a benchmark for long-short mean-reversion/momentum portfolios. Here are index returns since April 2020 with 20- and 50-day look-backs.

This is especially interesting if you are looking at market dislocations and subsequent recoveries. Here are indices since June 2019 with 5-, 20- and 50-day look-backs.

Counter-intuitively, naïve mean-reverting long-short seems to out-perform momentum.

ETFs for Asset Allocation

Building blocks for a diversified portfolio

Over the last few years, most brokers in the US have started offering no-frills accounts with zero-brokerage and fractional shares. However, new investors who are just getting started are either over-served by advisors or under-served by social media. In this post, we list out ETFs that every investor should be aware of if they are interesting in building a diversified portfolio.

We filtered for

  • Assets under management (AUM) – larger the better

  • Cost (expense ratio) – lower the better

  • Liquidity and popularity – higher the better

We cover equities, bonds, real-estate and commodities across the US, DM (Developed Markets) and EM (Emerging Markets.)


VTI

The Vanguard Total Stock Market Index Fund ETF is a $250 billion whale of a fund that is probably the only equity ETF a small-ticket first-time investor should consider.

Covering the entire US equity market, it is as passive as they come. With an expense ratio of 3bps (you pay $3 for every $10,000 investment,) it is the cheapest as well.

ETF, Vanguard

AGG

The iShares Core U.S. Aggregate Bond ETF is one of the largest bond ETFs on the planet with $90 billion in assets. It has everything from treasuries, agencies, CMBS and ABS to investment-grade corporates. You pay 4bps for the privilege.

Split your funds 60% into VTI and 40% into AGG and you basically have a portfolio that has traditionally outperformed 99% of the hedge funds out there.

ETF, iShares


With the Big Two out of the way, if you still have some risk appetite and time on your hands, you can reach out for more returns (potentially.)

SCHF

The Schwab International Equity ETF tracks all Developed Markets other than the US. With an AUM of $27 billion and an expense ratio of 6bps, it is a decent equity fund if you feel that US stocks are over valued.

Its largest exposure is to Japanese stocks followed by British, France, Germany, Canada and Switzerland. Unlike some other funds in this space, it also includes South Korea.

One caveat though, the fund is not currency hedged. The topic of buying hedged vs. unhedged ETFs is a topic that we will not get into right now. Suffice to say that hedging is not free – it is a price you pay to insulate yourself from fluctuations and you should weigh the cost vs. its benefits over your investment time horizon.

ETF, Schwab

BNDX

The Vanguard Total International Bond ETF provides exposure to Developed Market (ex-US) investment-grade government and corporate bonds. It is a monster of a fund with $136 billion in assets. An 8bps expense ratio is a wonderful bargain.

The fund is currency hedged.

ETF, Vanguard


We are not fans big fans of EM/FM (Emerging/Frontier Markets) investing from the US through ETFs. In the recent past, these markets have only been a source of risk and not returns. Gains in local currencies, when converted to US Dollars, haven’t compensated for the additional risk. However, for investors who believe that the future is going to be different, these ETFs are worth considering.

EEM, EMXC and FRDM

The iShares MSCI Emerging Markets ETF is perhaps the largest in this space. $32 billion in AUM and a 70bps expense ratio, it is the go-to ETF for EM investors.

However, the wrinkle is that Hong Kong and China form more than 37% of the portfolio. For investors worried about geopolitical risk, this may be a point of concern. This is where EMXC comes in.

The iShares MSCI Emerging Markets ex China ETF is a minnow by comparison (less than $1 billion in AUM) but it doesn’t include China and Hong Kong, making it palatable. However, there’s another wrinkle while investing in EM – some of those countries are ruled by despots. What if you want to invest in EMs that are democratic and respect personal freedom? Enter FRDM.

The Freedom 100 Emerging Markets ETF tracks the Life + Liberty Freedom 100 Emerging Markets Index. The Index is a freedom-weighted EM equity strategy that uses human and economic freedom metrics as primary factors in the investment selection process. And this means excluding China, Hong Kong and India – 3 of the largest markets in EM.

ETF, iShares

EMB

The iShares JP Morgan USD Emerging Markets Bond ETF an index of US-dollar-denominated sovereign debt issued by EM countries. It holds USD-denominated rather than local-currency debt. This eliminates direct currency risk for US investors. With $20 billion in AUM and an expense ratio of 39bps, its an attractive fund for investors looking to diversify into EM bonds.

ETF, iShares


Now that we have equities and bonds out the way, lets look at real estate. A REIT is a publicly traded security that invests in real estate through properties or mortgages. For the most part, in the past, their returns were correlated to interest rates. From investopedia: In a study done by the S&P, which analyzed six periods beginning in the 1970s where the yield of the 10-year Treasury grew significantly, of these six periods of interest rate increases, REIT returns increased during four of them.

VNQ and VNQI

VNQ, The Vanguard Real Estate ETF has about $75 billion in AUM and charges 12bps. It captures much of the US real estate market.

VNQI, Vanguard Global ex-U.S. Real Estate ETF has about $5 billion in assets and an order-of-magnitude larger than the closest alternative. It contains property companies from both developed and emerging countries, excluding the United States. Japan, China and Hong Kong are the top three geographies where it invests. Like with any other EM/FM investments, caveat emptor!


Some investors view gold as a tail-risk and inflation hedge and some prefer to add commodities to their portfolio to ride on emerging market demand. While it is debatable whether these assets live up to their expectations in the future, there have been lengthy stretches in the past where gold and commodities have outperformed other asset classes.

GLD and PDBC

GLD tracks the gold spot price, less expenses and liabilities, using gold bars held in London vaults. With about $65 billion in management and 40bps in expense ratio, its probably the best way to add exposure to the yellow metal in your portfolio.

PDBC holds a diverse basket of futures contracts on 14 commodities across the energy, precious metals, industrial metals and agriculture sectors. Has about $6 billion in AUM and its 59bps expense ratio is a bargain compare to the effort involved in actively managing a futures portfolio in a tax-efficient manner.


There are over 2500 ETFs listed in various US stock exchanges. We hope that our short list of 12 ETFs above helps investors get started. Do watch the discussion below:


Already have a basic portfolio and looking for quantitative strategies on US stocks and ETFs? Head over to freefloat.us

Transfer Entropy

In investing, we are always trying to find the relationship between two entities. For example, to hedge a long portfolio, we typically calculate the “beta” with respect to an index and use that to go short the index. Here, the biggest assumption is that the relationship is linear (or at least, piecewise linear.)

However, relationships in finance are typically non-linear. Using the math behind calculating entropy is one way to overcome the “beta” problem.

Introduction

From Wikipedia: Transfer entropy is a non-parametric statistic measuring the amount of directed (time-asymmetric) transfer of information between two random processes.

It tries to answer a simple question: what the effect of one entity over another, given a lag?

From StackExchange: TE(X↦Y)=0.624 means that the history of the X process has 0.624 bits of additional information for predicting the next value of Y. (i.e., it provides information about the future of Y, in addition to what we know from the history of Y). Since it is non-zero, you can conclude that X influences Y in some way.

Quick Look

Luckily, both R and python have libraries that help calculate transfer entropies between two variables.

Here’s the TE between Stock Futures and the NIFTY with a 500 day lookback and a single-day lag. FLOW_TO is a measure of information flow from the stock to the index and FLOW_FROM is the opposite direction.

Next Steps

This has interesting applications in portfolio risk management. Instead of calculating beta and hoping for the best, we could use TE to get a better understanding of how the individual constituents are affected by the index and hedge only those that have large values.

This post was inspired by Concepts of Entropy in Finance: Transfer entropy. Code and images for this post are on Github.