How to generate Federal Reserve Statements with AI

All you need is 25 years’ worth of Fed text data, Python and OpenAI’s new deep learning language model labelled “too dangerous to release”

It even works for Shakespeare

AI-generated Shakespeare


Data and tools

A typical statement by the Federal Reserve, retrieved from its website

More details on data cleaning

Exploratory data analysis

For immediate release\n\n\n\n\n\n\r\nThe Federal Open Market Committee decided today to ease the stance of monetary policy slightly, expecting the federal funds rate to decline 1/4 percentage point to around 5-1/4 percent.\r\n\r\n\tThe action was taken to cushion the effects on prospective economic growth in the United States of increasing weakness in foreign economies and of less accommodative financial conditions domestically.
\r\n\r\n\tThe discount rate remains unchanged at 5 percent.\n\nThe discount rate remains unchanged at 5 percent.\n\n1998 Monetary policy\n\n Home | News and events\nAccessibility\n\nLast update: September 29, 1998, 2:15 PM
Total word count:  62,820
Total article count: 169

Average number of words per article: 371
[('Committee', 1237),  ('inflation', 931),  ('rate', 776),  ('economic', 746),  ('market', 544),  ('Federal', 516),  ('condition', 461),  ('percent', 458),  ('continue', 440),  ('price', 438),  ('growth', 432),  ('remain', 400),  ('federal', 392),  ('fund', 385),  ('policy', 366)]

Loading and fine-tuning the GPT-2 language model

The results: AI-generated Fedspeak

Giving the algorithm a prefix to start a statement

How to trip up the model and spot fake text? Try “Trump”

Head of Quantamental Analytics @MarexSpectron . Machine learning. Quant strategy. Commodities. Python 🐍. Ex-hedge fund PM. PhD @UniofOxford . Views my own.