Empirical is a language for time-series analysis. It has statically typed Dataframes with integrated queries and builtin timestamps.
Read CSV files and infer their types (at compile time!):
>>> let trades = load("trades.csv"), quotes = load("quotes.csv")
Compute a one-minute volume-weighted average price (VWAP):
>>> from trades select vwap = wavg(size, price) by symbol, bar(timestamp, 1m)
Get the most recent quote for each trade:
>>> join trades, quotes on symbol asof timestamp
Get the closest event within three seconds:
>>> join trades, events on symbol asof timestamp nearest within 3s
See the website for more examples and full documentation.
The build is handled by CMake. There are some scripts to help with the process, both for POSIX (
*.sh) and Windows (
*.bat). These can be called by
make.bat for an easy workflow.
Additionally, POSIX has
The build is statically linked, so no libraries are needed to distribute the resulting binary.
The code for Empirical is structured as follows:
src/- source code for Empirical
tests/- regression tests
cmake/- CMake files
scripts/- build scripts
thirdparty/- open-source dependencies
A proprietary license is available to vendors and customers that need more commercial-friendly terms.