Data set · version 1.0.0 · CSV
The EcoFinLearn teaching dataset
By Sitraka Forler · Lecturer, Durham Business SchoolUpdated 16 Oct 2026 About this site
The three tables behind the SQL lessons, exactly as the in-browser sandbox loads them: daily prices, a trade ledger and US macro releases. Every learner sees the same rows, so a result can be quoted, checked and cited. The prices and trades are synthetic; the macro figures are real, each with the day it was published.
1.Files
| File | Coverage |
|---|---|
| equity_prices.csv2,600 rows · 129 KB · Synthetic | Daily open, high, low, close and volume for AAPL, MSFT, JPM, GS, SPY2022-01-03 to 2023-12-29 |
| trade_ledger.csv200 rows · 8 KB · Synthetic | Fills booked by four desks: ticker, side, quantity, price2022-01-10 to 2023-08-30 |
| macro_indicators.csv42 rows · 1 KB · Real | US CPI inflation (25 monthly releases) and the Fed policy rate (17 FOMC decisions)released 2021-12-15 to 2024-01-11 |
The README repeats this page in plain text, for anyone who downloads the files without it.
2.Synthetic or real
Prices and trades are synthetic. The tickers are real symbols, but the numbers are not market data: they come from a seeded random walk and must not be read as, or compared with, historical prices. They give the queries something of the right shape to work on. The generator uses a fixed seed, plain arithmetic and a calendar computed in UTC, so it produces the same file, to the last digit, on every machine and in every timezone.
Macro figures are real. Each CPI value and each Fed decision was read from the official publication and checked on 16 October 2026. Each row carries two dates, the way research databases store fundamentals: ref_period, the month the figure describes, and release_date, the day it became public. A backtest that joins on the first sees numbers before they existed.
3.Data dictionary
| Column | Meaning |
|---|---|
| tickertext | AAPL, MSFT, JPM, GS or SPY (labels only) |
| trade_datedate | Every weekday from 2022-01-03 to 2023-12-29; exchange holidays are not removed (520 days per ticker) |
| open_pricedecimal, USD | Opening price, within 0.25% of the previous close |
| high_pricedecimal, USD | Session high, never below open or close |
| low_pricedecimal, USD | Session low, never above open or close |
| close_pricedecimal, USD | Closing price; the walk moves between -0.96% and +1.04% a day |
| volumeinteger, shares | 1,000,000 to 9,999,999 |
| Column | Meaning |
|---|---|
| trade_idinteger | 1 to 200 |
| tickertext | Round-robin over the five tickers |
| trade_datedate | Every third calendar day, so some fills fall on a weekend and match no price row |
| sidetext | SELL for every third trade, otherwise BUY |
| quantityinteger, shares | 100 to 999 |
| pricedecimal, USD | Fill price, 100 to 500; not tied to the equity_prices level |
| desktext | Equities-US, Equities-EU, Macro or Quant |
| Column | Meaning |
|---|---|
| indicator_nametext | CPI_YoY or FedFunds |
| ref_periodmonth | The month the figure refers to (YYYY-MM) |
| release_datedate | The day the figure became public |
| valuedecimal, percent | The published figure |
| prior_valuedecimal, percent | The previous figure of the same series |
CPI_YoY is the 12-month percent change of the CPI for All Urban Consumers (CPI-U), all items, U.S. city average, not seasonally adjusted, as printed in the headline of the BLS release (8:30 a.m. Eastern Time). That index is not revised, so the first published figure is still the official one. FedFunds is the upper bound of the federal funds target range set at each scheduled FOMC meeting, holds included, dated by the statement (2:00 p.m. Eastern Time); the new range takes effect the next day.
4.The macro releases
The whole of macro_indicators. Read across a row: the figure for Jun 2022, 9.1%, was not known until 13 Jul 2022.
| ref_period | release_date | value |
|---|---|---|
| 2021-12 | 2022-01-12 | 7.0 |
| 2022-01 | 2022-02-10 | 7.5 |
| 2022-02 | 2022-03-10 | 7.9 |
| 2022-03 | 2022-04-12 | 8.5 |
| 2022-04 | 2022-05-11 | 8.3 |
| 2022-05 | 2022-06-10 | 8.6 |
| 2022-06 | 2022-07-13 | 9.1 |
| 2022-07 | 2022-08-10 | 8.5 |
| 2022-08 | 2022-09-13 | 8.3 |
| 2022-09 | 2022-10-13 | 8.2 |
| 2022-10 | 2022-11-10 | 7.7 |
| 2022-11 | 2022-12-13 | 7.1 |
| 2022-12 | 2023-01-12 | 6.5 |
| 2023-01 | 2023-02-14 | 6.4 |
| 2023-02 | 2023-03-14 | 6.0 |
| 2023-03 | 2023-04-12 | 5.0 |
| 2023-04 | 2023-05-10 | 4.9 |
| 2023-05 | 2023-06-13 | 4.0 |
| 2023-06 | 2023-07-12 | 3.0 |
| 2023-07 | 2023-08-10 | 3.2 |
| 2023-08 | 2023-09-13 | 3.7 |
| 2023-09 | 2023-10-12 | 3.7 |
| 2023-10 | 2023-11-14 | 3.2 |
| 2023-11 | 2023-12-12 | 3.1 |
| 2023-12 | 2024-01-11 | 3.4 |
| ref_period | release_date | value |
|---|---|---|
| 2021-12 | 2021-12-15 | 0.25 |
| 2022-01 | 2022-01-26 | 0.25 |
| 2022-03 | 2022-03-16 | 0.50 |
| 2022-05 | 2022-05-04 | 1.00 |
| 2022-06 | 2022-06-15 | 1.75 |
| 2022-07 | 2022-07-27 | 2.50 |
| 2022-09 | 2022-09-21 | 3.25 |
| 2022-11 | 2022-11-02 | 4.00 |
| 2022-12 | 2022-12-14 | 4.50 |
| 2023-02 | 2023-02-01 | 4.75 |
| 2023-03 | 2023-03-22 | 5.00 |
| 2023-05 | 2023-05-03 | 5.25 |
| 2023-06 | 2023-06-14 | 5.25 |
| 2023-07 | 2023-07-26 | 5.50 |
| 2023-09 | 2023-09-20 | 5.50 |
| 2023-11 | 2023-11-01 | 5.50 |
| 2023-12 | 2023-12-13 | 5.50 |
5.Sources and licence
- US Bureau of Labor Statistics, Consumer Price Index news releases (archive). Every CPI_YoY value and release date, read from the release itself, e.g. cpi_07132022.htm for June 2022.
- FRED, series CPIAUCNS (CPI-U index, not seasonally adjusted). Index levels used to cross-check the 12-month changes.
- Federal Reserve Board, FOMC meeting calendars and statements. The date of each FedFunds row: the day the statement was released.
- FRED, series DFEDTARU (federal funds target range, upper limit). The FedFunds values; FRED moves to the new level on the effective date, the day after each statement.
macro_indicators: works of the US federal government (Bureau of Labor Statistics, Board of Governors of the Federal Reserve System), in the public domain in the United States. Please cite the original publishers as well.
equity_prices, trade_ledger and the documentation: Creative Commons Attribution 4.0 (CC BY 4.0). Credit Sitraka Forler, EcoFinLearn, with a link to this page.
6.How to cite
Cite the version you used; a new version gets a new number and this page keeps its address.
Forler, S. M. (2026). EcoFinLearn teaching dataset: synthetic equity prices and trades with point-in-time US macro releases (Version 1.0.0) [Data set]. EcoFinLearn. https://ecofinlearning.com/data
@misc{forler_ecofinlearn_teaching_data_2026,
author = {Forler, Sitraka M.},
title = {{EcoFinLearn teaching dataset: synthetic equity prices and trades with point-in-time US macro releases}},
year = {2026},
version = {1.0.0},
publisher = {EcoFinLearn},
howpublished = {\url{https://ecofinlearning.com/data}},
note = {Data set. Macro figures from the US Bureau of Labor Statistics and the Federal Reserve Board; prices and trades are synthetic}
}No DOI has been registered for this dataset yet; until one is, cite the version and the URL.
7.Lessons that use it
Every SQL lesson runs on these tables in your browser, with nothing to install.
- Your First QuerySQL Foundationsprices · macro
- Counting Rows with COUNT(*) and WHERESQL Foundationsprices
- SELECT, WHERE and ORDER BY BasicsSQL Foundationsprices
- GROUP BY: Portfolio Summary by TickerSQL Foundationstrades
- Joining Prices to TradesSQL Foundationsprices · trades
- CTEs · Structured SQLSQL Foundationsprices
- CASE WHEN: Conditional Logic in SQLSQL Foundationstrades
- Subqueries: Find Above-Average StocksSQL Foundationsprices
- SQL Date Filtering & Monthly ReturnsAdvanced Finance SQLprices
- SQL Window Functions: 20-Day Moving Average & VolatilityAdvanced Finance SQLprices
- Rolling CAPM Beta in SQLAdvanced Finance SQLprices
- Point-in-Time Macro JoinAdvanced Finance SQLprices · macro
- RSI-14 in Pure SQLAdvanced Finance SQLprices
- Multi-CTE SQL Pipeline: Portfolio AnalyticsAdvanced Finance SQLprices
- SQL Interview Questions for Finance AnalystsAdvanced Finance SQLprices
The audit step of the Quantitative Equity Research Report (capstone) starts from the same price table.