Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/empirical-soft/empirical-lang
A language for time-series analysis
https://github.com/empirical-soft/empirical-lang
programming-language time-series-analysis
Last synced: 16 days ago
JSON representation
A language for time-series analysis
- Host: GitHub
- URL: https://github.com/empirical-soft/empirical-lang
- Owner: empirical-soft
- License: other
- Created: 2019-05-19T23:36:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-21T21:34:14.000Z (over 3 years ago)
- Last Synced: 2024-08-01T00:38:27.686Z (3 months ago)
- Topics: programming-language, time-series-analysis
- Language: C++
- Homepage: https://www.empirical-soft.com/
- Size: 9.02 MB
- Stars: 168
- Watchers: 8
- Forks: 13
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
## About Empirical
[Empirical](https://www.empirical-soft.com/) is a language for time-series analysis. It has statically typed Dataframes with integrated queries and builtin timestamps.
## Examples
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](https://www.empirical-soft.com/) for more examples and full documentation.
## Building Empirical
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` or `make.bat` for an easy workflow.
| | POSIX | Windows |
| --- | ----- | --------|
| debug build | `make` | `make.bat` |
| production build | `make prod` | `make.bat prod` |
| run tests | `make test` | `make.bat test` |
| deploy binary | `make deploy` | `make.bat deploy` |
| clean build | `make clean` | `make.bat clean` |Additionally, POSIX has `make website`.
While the actual code is all C++, there are code generators that need the JVM ([ANTLR](https://www.antlr.org)) and Python ([ASDL](https://github.com/empirical-soft/asdl4cpp)). These generators are included in this repo, so there is nothing to download.
The build is statically linked, so no libraries are needed to distribute the resulting binary.
## Structure
The code for Empirical is structured as follows:
- `src/` - source code for Empirical
- `tests/` - regression tests
- `doc/` - documentation
- `cmake/` - CMake files
- `scripts/` - build scripts
- `thirdparty/` - open-source dependencies## Contributing
See the [Contributor's Notes](CONTRIBUTING.md). There is also the [Maintainer's Notes](MAINTAINING.md) for the curious.
## License
[Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.en.html) (AGPL) with the [Commons Clause](https://commonsclause.com).
A proprietary license is available to vendors and customers that need more commercial-friendly terms.