WTI Crude Oil goes Negative

When spot prices fall relative to futures prices, traders buy the commodity and store it until it is in greater demand. With the reduction in demand and excessive supply, storage is becoming more scarce and becoming more expensive. The more expensive the storage, the lower the spot price needs to fall before traders will buy and store the commodity. Usually, there is some customer that would be willing to buy at a low price but currently, there is no way to store the oil and very few consumers of oil due to the COVID-19 lockdown. Traders with long positions usually close their contracts and buy new contracts with a longer maturity in order to avoid taking physical delivery. With no buyers, these traders needed to unload their contracts at ridiculous prices to avoid being fined for not taking delivery at the expiration of their contracts.

COVID-19 Economic Forecasts

A very reasonable process when confronting policy decisions is to consider the economic impact of those decisions. Recently, the suggestion of 20% unemployment has been repeated by media because Treasury Secretary Mnuchin used that number when briefing Congress. This was not an estimate based on any kind of model or thoughtful analysis as stated by the secretary himself. I am certain that in the next few weeks there will be numerous estimates of economic impact hopefully with better analysis but none of them will be adequate to support policy decisions.

Many firms have access to high-frequency data on credit card transactions from which they can estimate changes in spending. Most economists neither have access nor are familiar with these data sets. They will try to use examples from the Spanish Flu or from more minor events that have occurred in structurally different global economies through time.

One of the confounding factors in forecasts, is that the US has become accustomed to using markets as a signal for policy. While markets do provide useful information, they also incorporate changes in risk preferences and perception which are often confused with event probabilities. An accurate economic forecast must now factor in policy changes resulting from changes in risk perception which may or may not be related to actual events.

The answer to the economic impact question is that there will be heroic assumptions made on the effectiveness of unknown future health policy. Further heroic assumptions will estimate the interaction of unknown future monetary and fiscal policy with health policy. All of this will be based on the (much more likely) assumption that medical professionals will know more about how COVID-19 is transmitted and will development more effective treatments over time.

We should find comfort in the fact that the lack of certainty is not uncommon. When stakes are low, it is easy to fool ourselves into thinking that the world is certain. During times of crisis, we should remember that the world was never as certain as we thought, but that is OK.

Market Commentary: Morning of 20200316

As a finance professor, you occasionally get questions like these:

“A friend and I were wondering what your opinion was about the Fed dropping close to 0% interest rates. Additionally, we were wondering on what your opinion was on the markets reaction to everything since.”

My response is below:

Most businesses have a revolving line of credit that they draw down in case of emergencies. Banks need to provide cash when they do this and usually it is an idiosyncratic event. Right now, all businesses are maxing out their credit lines which means banks need a lot of cash. The Fed Funds market is a way to push money out to all banks and then to businesses. The reason this should be different than the Financial Crisis is that the Fed also cut the interest paid on Fed deposits which was why banks did not lend in the aftermath of the last crisis. Now, banks have a greater incentive to lend although they will be looking at risk and still may not lend to risky businesses.

Monetary policy is very useful for managing the banking system. Federal Reserve policy cannot change the consumer’s willingness to spend or ability to spend due to supply chain and distribution disruptions. Additionally, the Fed cannot fix any of the fundamental causes of this crisis. On Friday, the markets were reacting to the president’s announcement on the use of fiscal policy and measures for dealing with COVID-19. Over the weekend, it turned out that many of the president’s statements were not entirely true. The positive market reaction on Friday was reversed today. Until there is some progress on COVID-19 management and a fiscal policy response, markets are expecting a longer and more severe economic reaction.

Chicago Board of Trade

After the R/Finance conference, we had the opportunity to visit the Chicago Board of Trade Building. Brian Peterson, one of the conference committee members, gave us a tour of the building and took us up to the rooftop lounge for beers.

During the days of open outcry, the building housed the trading floor with pits for each commodity. With all trading being conducted electronically, the pits have been removed. Depictions of the Roman god of grain, Ceres, are displayed inside as well as a 31 ft statute on top of the building.

As you enter the building, there is the Ceres restaurant and an empty hallway where the pits were located. A wall of original Warhols is located further inside. I included some pictures of the Art Deco elevator doors and mailboxes but there is much more to see.

Ordinary Least Squares

Let’s estimate a stock’s beta and alpha using the CAPM. First prepare the data by calculating stock returns and market returns. Subtract the risk-free rate from both and form a data.frame called “urdata” where ExRet is the excess return on the stock and MktRP is the risk premium on the market. Next, specify the formula for the estimated model and call it “m2”. Use the lm() function to estimate the model and assign the results to a variable called “ols”. Finally, use summary() to see the regression results.

m2=ExRet~MktRP
ols=lm(m2,data=urdata)
summary(ols)

If you are using a lot of fixed effects, try using coef(ols)[1:5,] to get the first 5 rows of coefficients.

The Econometric Cycle

Use OLS
Quick results but assumptions are probably violated

Use Nonparametric Techniques
Results are not general enough because my sample isn’t big enough or lacks certain characteristics

Everything is a State Space Model!
Too many parameters → I don’t own a quantum computer.

Use GMM
Think more; use less parameters → Thinking is hard.

Use OLS
OLS is pretty robust

VPIN in R

This code is an implementation of Volume Synchronized Probability of Informed Trading by Easley, Lopez de Prado, and O’Hara (2012) published in the Review of Financial Studies. Easley et al. argue that the CDF of VPIN indicates order flow toxicity. This is their explanation of the flash crash in 2010. You can see slides to my R/Finance 2014 presentation on the topic.

This version of the code is not particularly fast and they are plenty of opportunities for a better programmer than me to tune it up for speed.

#### VPIN calculation #########################################################
#install.packages('fasttime',repos='http://www.rforge.net/')
require(data.table); require(fasttime); require(plyr)
# Assuming TAQ data is arranged in 1 year stock csv files
stock=fread('/TAQ_data.csv'); stock=stock[,1:3,with=FALSE]
setnames(stock,colnames(stock),c('DateTime','Price','Volume'));
stock[,DateTime:=paste(paste(substr(DateTime,1,4),substr(DateTime,5,6),
    substr(DateTime,7,8),sep='-'),substr(DateTime,10,17))]
setkey(stock,DateTime);
stock[,DateTime:=fastPOSIXct(DateTime,tz='GMT')]
stock=as.xts(stock)
# Now we have an xts data frame called 'stock' with a DateTime index and... 
# two columns: Price and Volume
# Vbucket=Number of volume buckets in an average volume day (Vbucket=50)
VPIN=function(stock,Vbucket) {
  stock$dP1=diff(stock[,'Price'],lag=1,diff=1,na.pad=TRUE)
  ends=endpoints(stock,'minutes')
  timeDF=period.apply(stock[,'dP1'],INDEX=ends,FUN=sum)
  timeDF$Volume=period.apply(stock[,'Volume'],INDEX=ends,FUN=sum)
  Vbar=mean(period.apply(timeDF[,'Volume'],INDEX=endpoints(timeDF,'days'),
    FUN=sum))/Vbucket
  timeDF$Vfrac=timeDF[,'Volume']/Vbar
  timeDF$CumVfrac=cumsum(timeDF[,'Vfrac'])
  timeDF$Next=(timeDF[,'CumVfrac']-floor(timeDF[,'CumVfrac']))/timeDF[,'Vfrac']
  timeDF[timeDF[,'Next']<1,'Next']=0
  timeDF$Previous=lag(timeDF[,'dP1'])*lag(timeDF[,'Next'])
  timeDF$dP2=(1-timeDF[,'Next'])*timeDF[,'dP1'] + timeDF[,'Previous']
  timeDF$Vtick=floor(timeDF[,'CumVfrac'])
  timeDF[,'Vtick']=timeDF[,'Vtick']-diff(timeDF[,'Vtick']); timeDF[1,'Vtick']=0
  timeDF=as.data.frame(timeDF); timeDF[,'DateTime']=row.names(timeDF)
  timeDF=ddply(as.data.frame(timeDF),.(Vtick),last)
  timeDF=as.xts(timeDF[,c('Volume','dP2','Vtick')],
    order.by=fastPOSIXct(timeDF$DateTime,tz='GMT'))
  timeDF[1,'dP2']=0
  timeDF$sigma=rollapply(timeDF[,'dP2'],Vbucket,sd,fill=NA)
  timeDF$sigma=na.fill(timeDF$sigma,"extend")
  timeDF$Vbuy=Vbar*pnorm(timeDF[,'dP2']/timeDF[,'sigma'])
  timeDF$Vsell=Vbar-timeDF[,'Vbuy']
  timeDF$OI=abs(timeDF[,'Vsell']-timeDF[,'Vbuy'])
  timeDF$VPIN=rollapply(timeDF[,'OI'],Vbucket,sum)/(Vbar*Vbucket)
  timeDF=timeDF[,c('VPIN')]; return(timeDF)
}
out=VPIN(stock,50)
###############################################################################

Here is what the original file looks like:

1993-01-04 09:35:25,10.375,5300,40,0,,N
1993-01-04 09:36:49,10.375,25000,40,0,,N
1993-01-04 09:53:06,10.375,100,40,0,,N
1993-01-04 10:04:13,10.375,200,40,0,,N
1993-01-04 10:04:20,10.375,100,40,0,,N
1993-01-04 10:24:42,10.375,1000,40,0,,N
1993-01-04 10:25:19,10.375,600,40,0,,N
1993-01-04 11:31:04,10.5,10000,40,0,,N
1993-01-04 12:13:09,10.5,200,0,0,,M
1993-01-04 12:13:38,10.5,200,0,0,,M

Benchmark Investing Stock Selection

A particular insurance company’s investment department measures stock performance against the S&P500 index on an annual basis. The portfolio is long only with no derivatives. The portfolio manager eases into new positions and takes smaller positions outside of the index. The department operates on a monthly trading schedule where all trades for the next month are set within the last week of the current month. Regardless of how much the portfolio outperforms its benchmark, full bonuses are paid based on the trailing three years of performance. This compensation plan is ridiculous for any institutional or individual investor paying for active management and the following is a short example of why that is true.

Imagine that we need to improve performance over the next month or so and identify two stocks for possible purchase. Both have sufficient liquidity with attractive fundamentals and good management but one is a small cap stock outside of the index and the other is a large cap stock in the S&P500. Using multiple valuation methods, we determine that the small cap stock is cheaper than the large cap stock and therefore has a higher expected return. The small cap value stock is also likely to have greater price volatility than the large cap index name. This is intuitive if we assume that over the long term, all stocks revert to some constant information ratio. With a greater expected return, we would assume greater price volatility relative to the large cap stock.

If this were your portfolio and you wanted to maximize long run returns, you would prefer to buy the small cap stock. Unfortunately, this is not what the portfolio manager or equity analyst would like to do. The portfolio manager is primarily concerned with risk. He believes that initiating a new position in a small cap stock is riskier than adding to an existing position in the large cap stock in the index and he is right in the sense that it will increase tracking error due to the higher price volatility of the small cap stock combined with being outside of the index. He is also wrong in the sense that a larger tracking error is only a problem if you are buying more stocks with negative alpha than with positive alpha. I will also be generous in assuming that the portfolio manager does not believe that holding a stock in the past reduces uncertainty in future returns. This is a industry wide problem to be addressed another day. The equity analyst will also prefer the large cap stock to the small cap stock even if his/her compensation is completely performance based. The reason for this is that the position size that the portfolio manager is willing to take is insufficient to provide any meaningful performance improvement. Therefor, it is better to get a small performance boost from a larger position in an index stock than a minimal performance improvement from the small cap stock.

Ultimately, this results in a mediocre enhanced index fund run by overpaid managers. People who make their career on this business model will argue that the portfolio is a broadly diversified, actively managed, low risk, blah blah blah. I usually don’t catch the rest due to the amount of quacking emanating from their non-indexed index portfolio. The bottom line is that if over 90% of your investments are inside the benchmark index and your tracking error is infinitesimal, you are running an index fund and should be paid accordingly. For more articles on the unintended consequences of performance benchmarks, please refer to Beating the Market Part 1 and Part 2.

Value Creation

I hear a lot of opinions on how economic value is created. Some of these opinions are supported by secondhand anecdotal evidence and most of them are used to support various political or social positions. Some of the most absurd theories on value creation even come from wealthy and/or successful people so someone without a business education may be forgiven for believing that this is a philosophical question that can only be answered through a belief in some set of principles. I would like to articulate why there is an objective reality to value creation. It has very little bearing on any political or social position and absolutely nothing to do with faith.

Value is created through the decision making process. This process need not be rational; the only thing that matters is success. As in warfare, winning by skill, preparation, accident, luck, or for the wrong reasons are all sufficient. Unfortunately, in this framework, there is an objective definition of success and it requires two ingredients. The first ingredient is an understanding of the money generated from a new venture and the second is understanding the price of the money necessary to start and maintain the project. Success is defined as a project that generates a rate of return greater than the cost of the money that is required for the project. That is it. Full stop.

While the concept is simple, there is also an objective methodology for calculating success. Future cash flows must be discounted at the cost of capital which is the rate at which you obtain the capital necessary to start and run the business. Oftentimes this rate is uncertain so the best estimate is used and the results are tested to see if changes in this rate affect the decision to go ahead with the project. The internal rate of return is the constant rate at which a series of positive and negative cash flows can be discounted such that the net present value of these cash flow are zero. This can also be described as the discount rate at which the manager is financially indifferent to taking on a new project. If that discount rate is greater than your cost of capital then you undertake the project.

Whether managers know this process or not, this is the only method of creating economic value. Improving on this process requires either lowering your cost of capital by getting money at a lower interest rate or by increasing the present value of the cash flows generated from the project. This can be achieved by reducing the investment in the project, getting the cash flows earlier, or increasing the growth rate in cash flows.

Correlation Graph

Earlier this week, I saw a message in my Twitter feed talking about an unusual correlation pattern between the S&P 500 and the Dow. Unfortunately, the graph produced by the Greg Mankiw recommended site AssetCorrelation.com was grossly inaccurate showing periods of zero correlation between the indices. A few lines of code using the Quantmod package in R can easily replicate the functionality of the site and a prudent analyst can simply load a more reliable data source before arriving at any conclusions. This script takes data from Yahoo finance but you can easily use Google finance or load your own data.