poetry install
To get a demo stack please run the docker-compose
stack:
cd ./docker-compose/
docker compose up -d --build
This will build and run a showcase including:
- grafana and a pre-populated PYRE dashboard
- postgresql database with the following schemas:
orders
: table storing your market ordersstock_data
: table storing your market values
- crawler to periodically fetch latest market data
- pyre rest API to interact with the database
- init container to insert a bunch of order for demo purposes
To work with your data, you could either:
- replace demo orders.yaml with your own data (every field is mandatory)
- create your own, remove the init container from the stack and run
PYRE_ENDPOINT=http://localhost:8000 pyre order bulk your/own/orders.yaml
Both need to access postgre db:
PYRE_DB_URL
(example:my-postgresql:5432/my-db-name
): postgre host, port, db name comboPYRE_DB_USER
(example:pyre-user
): postgre db userPYRE_DB_PASSWORD
(example:pyre-secret
): postgre db password
PYRE_ENDPOINT
(example:http://my-api-host:8000
): protocol, host, port combo forpyre
rest API. (Notice the protocol (http(s)://
) is mandatory)
CLI is (or should be) self documented
poetry run pyre --help
[TODO] Simulation entrypoint needs to be documented
# Simulate DCA investment strategy over 100 simulations
poetry run pyre simulate dca \
--symbol '^990100-USD-STRD' \
--amount 3000 \
--seed 50000 \
--start-date 2024-06-01 \
--duration 17 \
-n 100