This directory contains historic market data and code to re-play it to a Diffusion server at the same speed at which it was recorded. The raw market data is stored in CSV files inside ./market-data/
Ensure you have followed step Configure Diffusion URL and credentials in the root README.md
npm install
npm run load
Once the script outputs the following line it has begun re-playing market data at the original speed.
2024-08-15 15:57:15 info: Fast forward by 21,600,000ms complete
-
index.tsscans the contents of./market-dataand builds./Topicfile.json -
load.tsloads./Topicfile.jsonand replays the data within at the same rate is was recorded. To load any time series topics with historic data this script wil fast-forward 6hours of activity before playing the data at original speed. -
vary.tscreates a 2nd data feed from an original. It analyses the original to gather the powers of ten that each instruments varies at, picks the most common, and applies a random value at the same power to each of the numeric fields to create a new believable value. This was used to create theACMEBank.comdatafeed. It does not vary the timestamps.