This commit is contained in:
David Chen
2026-03-14 20:14:33 +08:00
committed by GitHub
parent ab91804be1
commit 05c17f6b5d
16 changed files with 3177 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
## install dependencies
```bash
uv sync
```
## add dependencies
```bash
# prod dependencies
uv add PACKAGES
# dev dependencies
uv add --dev PACKAGES
```
## import dependencies from requirements.txt
```bash
uv add --requirements requirements.txt
```
## format
```bash
uv run isort .
uv run yapf --in-place --recursive . --parallel
```
## run
```bash
uv run --module main
# or
uv sync
source ./.venv/bin/activate
python -m main
```
```bash
uv run jupyter notebook \
--no-browser \
--NotebookApp.password='' \
--NotebookApp.token='' \
--port=3000
```
## clean
```bash
rm -rf ./.venv ./dist
uv cache clean
rm -r "$(uv python dir)"
rm -r "$(uv tool dir)"
```
## todo
- `trading_gateway.submit_order(pos_diff)`
- handle strategy that trades multiple instruments
- leveraged buy-and-hold with position sizing
- use asyncio to run multiple strategies concurrently