An open API service indexing awesome lists of open source software.

https://github.com/clojure-finance/clojure-backtesting

Backtesting framework for quantitative investing/trading
https://github.com/clojure-finance/clojure-backtesting

Last synced: 8 months ago
JSON representation

Backtesting framework for quantitative investing/trading

Awesome Lists containing this project

README

          

# Clojure Backtesting Library

A backtesting framework for quantitative investing and trading.

## Requirements

- Java
- Clojure Leiningen

A good [tutorial](https://ericnormand.me/guide/how-to-install-clojure) about installing the above softwares. **Remember to reboot the system after changing the environment path every time.**

## How to install

1. ### Lein REPL

*No need to install extra softwares. **Recommended for new users.***

1. Clone the repo and decompress.

2. Under the directory, run below command in the terminal to start a Lein REPL.

`lein repl`

3. Run the examples in the [`/examples`](/examples) folder line by line in the REPL.

2. ### Gorilla REPL

*Can save strategies in notebooks.*

every time you open Gorilla REPL, run
```
lein gorilla
```

3. ### Try it out online

*Only try out the basic APIs with a small dataset.*

[Online interactive notebook](https://mybinder.org/v2/gh/clojure-finance/clojure-backtesting/binder)

## How to use

1. Go through every examples in the [`/examples`](/examples) folder to get a basic understanding of the system.
2. Documentations for every detailed APIs can be found [here](https://clojure-finance.github.io/clojure-backtesting-website/#part-ii-api-documentation).
3. Learn to use the APIs to write your own strategy!

## Update

Make sure you have the latest version of the code installed by running after each clone:
```
make add_kernel
```

## Report bugs

As we are still working to fully debug the code and create more examples, feel free to report issues in the repository and we appreciate your kind support.

## Development

To start an interactive prompt where you can enter arbitrary code to run in the context of your project:
```
lein repl
```
To run the default `:main` set in `project.clj`:
```
lein run
```
To run all tests written in the `test` namespace:
```
lein test
```