mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-12 11:50:11 +08:00
eliminated tornado and pymongo, more package refactoring, test passes
This commit is contained in:
@@ -5,63 +5,11 @@
|
||||
Install the necessary python libraries. Because there are dependencies between the various C packages that don't seem to be handled by ```pip install -r```. So, we provide a helper to install the libraries as listed in requirements.txt and requirements_dev.txt:
|
||||
|
||||
```
|
||||
./ordered_pip.sh requirements_sci.txt #go get coffee, this will compile a heap of C/C++ code
|
||||
./ordered_pip.sh requirements.txt
|
||||
./ordered_pip.sh requirements_dev.txt
|
||||
```
|
||||
|
||||
Navigate to your mongodb installation and start your db server:
|
||||
|
||||
```
|
||||
./bin/mongodb
|
||||
```
|
||||
|
||||
|
||||
Create a development database with sample data, will create one qbt user:
|
||||
|
||||
```
|
||||
python qbt_data_bootstrap.py --user_email=... --password=...
|
||||
```
|
||||
|
||||
To run the qbt against a local mongodb instance, navigate to the source dir and run
|
||||
|
||||
```
|
||||
python qbt_server.py --mongodb_dbname=qbt
|
||||
```
|
||||
|
||||
To see all the available options:
|
||||
|
||||
```
|
||||
python qbt_server.py --help
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
python qbt_data_bootstrap.py --help
|
||||
```
|
||||
|
||||
|
||||
qbt uses tornado to accept synchronous requests for backtesting sessions.
|
||||
The client of a backtesting session first invokes the _backtest_ endpoint:
|
||||
http://serverip/backtest?startdate=<>&enddate=<>...
|
||||
|
||||
qbt will respond with a json object describing the session:
|
||||
|
||||
- backtest id, to be referenced in all further requests
|
||||
- zeromq connection information for the event stream
|
||||
|
||||
A backtesting session is comprised of:
|
||||
|
||||
- REST endpoint to request orders
|
||||
- an event stream delivered via zeromq
|
||||
|
||||
## Pre-requisites
|
||||
You need to have the tornado and pymongo eggs installed:
|
||||
|
||||
easy_install tornado pymongo pyzmq
|
||||
|
||||
You need to have mongodb installed and running. Find your system at http://www.mongodb.org/downloads and set it up.
|
||||
|
||||
You need to have zeromq installed - http://www.zeromq.org/intro:get-the-software.
|
||||
|
||||
### Tooling hints
|
||||
|
||||
Reference in New Issue
Block a user