Permanent open market operations (POMO)

When the US stock market began to fall in the spring of 2020, the Federal Reserve (FED) announced a stimulus plan of about 2.3 trillion dollars. The press called it a “liquidity injection from the Fed.” Interesting concept, money injection.

But how is liquidity injected into the market? How is all this executed?

Permanent Open Market Operations (POMO)

POMO refers to when the Fed (or any central bank) constantly uses the open market to buy and sell securities in order to adjust the money supply. All these operations go to a portfolio called: “system open market account” (SOMA), which is, in a nutshell, the FED’s portfolio.

This mechanism and these practices have existed for decades, but depending on the moment they become more noticeable or invisible.

When does the Fed buy?

I do not know knows, at least I have not found out, what the FED buys, that is if there is a calendar of purchase days and the estimated quantities that the FED intends to put into circulation. The calendar looks like this:

It is important to understand how much positions they open and finally how much are completed (since not all trades are ccompleted). On this page you can see the data of operations launched and executed:

Several purchases a day

As can be seen in the image below, the situation may arise that there are several shopping packages per day, such as May 27, 2020. During the worse days of the market they were opening 6 or 7 packs of operations per day.

What is happening this spring / summer of 2020?

Well, a lot is happening, but focusing on POMOs, what is happening is that there are many people looking at this data and operating based on these money flows (considered “free” by some specialists).

The general opinion is that there is a correlation between the money that is put into circulation by the FED (the daily injection). With this, on the day before a liquidity injection there are people who operate in certain values ​​seeking the rise of the day of the “big injection”. How do they operate and what do they operate on? … well, I don’t know.

I am trying to get data and draw it to understand if this correlation exists or is a simple bias.

This graph is the only interesting one I found but it is from previous years:

FED money to major traders relative to S&P 500

FED money to major traders relative to S&P 500

Regarding 2020, the only graph I found is this, which doesn’t tell me much:

FED daily purchases August / 2019 - May / 2020

FED daily purchases August / 2019 – May / 2020

 

All this “free” money plugged into the market has made many rich, and at a time when COVID-19 has been affecting the economy in very significant ways, Wall Street is doing its own particular August.

This vignette summarizes very well what has happened:

Is 2.3T $ a lot of money or a just a tip?

Well, I don’t know, the GDP of the US in 2019 was about 21 trillion US dollars (9 zeros).

Another important piece of information is to know the impact of the debt, where Trump is not doing so badly:

If you add Ronald Reagan, the data gets very distorted.

If you add Ronald Reagan, the data gets very distorted.

The immediate questions come to my mind are:

  • How long can the Fed be injecting this huge amount of money?
  • Is it really that much money?
  • What will happen when the numbers of POMO trades drop consistently?

More detail

The data in the green graph above where the Fed purchases in 2020 is visualized is very simple and does not tell me much. I took some time and dumped the data into a spreadsheet, and of course, you see more things.

1.- March 12 was when the serious daily injection of money began.

2.- In the first half of June there was a decrease in purchases by the FED, and it caused a correction. This correction was followed by an increase in the dose.

3.- The number of purchase packages is normally 0 or 1, between March 13 and April 7, it was always 5, 6 or 7 packages released. Then the FED spent a few days with 3-4 packages and returned to 1 package per day.

4.- If we divide the accepted quantities of purchases among the launched ones, it gives you the ratio of accepted purchases. I have also made the average of the last 5 days to see if there is something interesting. And if there is, when the average goes down, in a few days the market goes down (as it happened in June). Now at the end of July it has happened again, with what we see what happens during the first fortnight of August.

5.- On April 9th FED announced the 2.3T$ stimulus program. If we sum up the amount between March 13th, the first day with massive purchases, and August 6th, that is Today, then the total amount injected is 1,71T$, that supposes 75% of the original 2,3T$ budget announced.

My opinion about the POMO

This type of operation is very well known in the US. There are traders doing things with this information. For me it is something that requires data, knowledge and time that I do not have, but I always find it interesting to understand what others do, learn and understand the context where we move.

This is not, in any case, a method of saving or investing in the long term.

If there is something that I have not mentioned or is of interest, let me know!

Quantopian concepts

I have invested some hours learning about Quantopian environment and the basic concepts around the platform. The environment is very powerful, so I wanted to gain some basic clarity of the basis.

Quantopian platform

It consists of several linked components, where the main ones are:

  • Quantopian Research platform is an IPython notebook used for research and data analysis during algorithm creation. It is also used for analyzing the past performance of algorithms.
  • The IDE  is used for writing algorithms and kicking off backtests using historical data.
  • Paper trading ability, so you can perform simulations using live data.
  • Alphalens is a Python package for performance analysis of alpha factors which can be used to create cross-sectional equity algorithms.
  • Alpha factors express a predictive relationship between some given set of information and future returns.
  • help: https://www.quantopian.com/help#optimize-title

The workflow

To maximize the use of Quantopian is important to understand how to work on the different steps to achieve your goals.

The basis are the same ones that the ones explained on this post, and that are represented by this diagram:

I did not found a diagram in any place, so I draw my own diagram.

Workflow, step by step

1.Universe Selection : define a subset of tradeable values (stocks/futures); the universe should be broad but have some degree of self similarity to enable extraction of relative value. It should also eliminate hard to trade or prohibited instruments. (Example: select companies with >10B$ revenue and dividend rate >3%).

This is done throught the object named “Pipeline”. The idea is not to limit yourself to a set of specific stocks but define a pipeline of stocks that allow you to quickly and efficiently consider many thousands of companies.

Pipeline allows you to address all companies, then filter them.

2.Single Alpha Factor Modeling:

Initially these 4 words together sounds like chinese to me. So I will try to explain as I understood it: it’s a model composed by a single factor that tries to find a result that has statistical significance (alpha factor).

Not enough?, Ok, I will try to explain some concepts.

First, I need to review some basis of statistics.

What is an alpha factor?

In statistical hypothesis testing, a result has statistical significance when it is very unlikely that it has occurred randomly. The level of significance is commonly represented by the Greek symbol α (alpha). The significance levels of 0.05, 0.01 and 0.001 are common.

What is a factor model?

A model in quantopian is composed by a set of factors; usually it should include:

  • a factor for the market,
  • one or two factors for value/pricing,
  • and maybe a factor for momentum.

Now let’s come back to Quantopian Single Alpha factor Modeling.

It is basically to define and evaluate individual expressions which rank the cross section of equities in your universe. By applying this relationship to multiple stocks we can hope to generate an alpha signal and trade off of it.

This can be done in 2 ways:

  • Manually: Hand crafted alphas. By the moment I will start with this method.
  • Deep Learning: alphas are learned directly, instead of defined by hand (Long-short term memory (LSTM), 1D convolutional nets). I will let this method for later.

Notes:

  • Developing a good alpha signal is challenging (for instance: detect an earning surprise before the formal announcement based on sentiment data).
  • It’s important to have a scientific mindset when doing this exercise.

By being able to analyze your factors in IPython Notebook you can spend less time writing and running global back-tests. It also enables you to annotate assumptions and analyze potential bias.

This is in deed the main function of Alphalens python package: to surface the most relevant statistics and plots about a single alpha factor. This information can tell you if the alpha factor you found is predictive. These statistics cover:

  • Returns Analysis.
  • Information Coefficient Analysis.
  • Turnover Analysis.
  • Sector Analysis.

3.Alpha Combination: you basically combine many single alphas into a final alpha which has stronger prediction power than the best single alpha. Two examples about how to do it:

  • Classifier (E.g.: SVM, random forest).
  • Deep Learning: alphas are learned directly, instead of defined by hand (Long-short term memory (LSTM), 1D convolutional nets).

For simplification I have started just with 1 alpha factor, so I am right now skiping this step.

4.Portfolio Construction: implement a process which takes your final combined alpha and your risk model and produces a target portfolio that minimizes risk under your model. The natural steps to perform it are:

  • Define objective: what you want to maximize.
  • Define constrains: such leverage, turnover, position size…
  • Define risk model: define and calculate the set of risk factors you want to use to constrain your portfolio.

5.Execution: implement a trading process to transition the current portfolio (if any) to the target portfolio.

Simple Moving Average, basis

I have read a couple of texts related to the simple moving average or rolling average, this one explains the basis and the main values used. I have done some tests and I have compared them to understand the use better.

The different articles always have some tips about this analysis:

  • Do not operate based in these signals, use them as control checks.
  • During lateral behavior of the market the signs can be false. They work better when there are major changes.

The test below shows the Amazon trend plus rolling average trends with:

  • short rolling = 10 days and long rolling 50 days
  • short rolling = 20 days and long rolling 100 days
  • short rolling = 5 days and long rolling 20 days

There is a concept where 3 lines are drawn, that is called the triple crossing, where:

  • Short rolling 4 days,
  • Medium rolling 18 days
  • Long rolling 40 days.

This typically happens when a lateral behavior has finished and this is making a lot of investors to go with the flow.

For general understanding of which moving average you should use as guide:

  • 5 days: For the hyper trader. This shorter the SMA the more signals you will receive when trading. The best way to use a 5-SMA is as a trade trigger in conjunction with a longer SMA period.
  • 10 days: popular with the short-term traders; great for swing traders and day traders.
  • 20 days: the last stop on the bus for short-term traders. Beyond 20-SMA you are basically looking at primary trends.
  • 50 days: used by traders to gauge mid-term trends.
  • 200 days: welcome to the world of long-term trend followers. Most investors will look for a cross above or below this average to represent if the stock is in a bullish or bearish trend.