51 lines
1.8 KiB
Markdown
51 lines
1.8 KiB
Markdown
# Trading Bot
|
|
|
|
Python trading bot project using machine learning to decide which assets should be held. The bot is intended to trade through the IBKR API, beginning with paper trading and potentially supporting real trades later behind explicit safeguards.
|
|
|
|
## Project Status
|
|
|
|
This repository is at the planning and scaffolding stage. The machine learning model, trading parameters, asset universe, and risk rules will be designed later.
|
|
|
|
## Main Parts
|
|
|
|
1. Training data collection
|
|
2. Model generation and training
|
|
3. Trading bot using the trained model
|
|
4. Optional read-only web UI for trading status
|
|
|
|
## Environment
|
|
|
|
Use `mise` to manage Python and `uv` to manage Python packages.
|
|
|
|
```sh
|
|
mise install
|
|
mise exec -- uv sync
|
|
mise exec -- uv run python --version
|
|
```
|
|
|
|
The current local Python version is pinned in `.mise.toml`.
|
|
|
|
## Dependencies
|
|
|
|
Runtime dependencies are declared in `pyproject.toml`.
|
|
|
|
- `ib-insync` for the IBKR API connection.
|
|
- `pandas` for tabular candle data handling.
|
|
- `pyarrow` for Parquet file support.
|
|
|
|
## Trading Safety
|
|
|
|
The default target is paper trading. Real trading should only be added later with explicit configuration, clear documentation, and tests around order generation and broker integration.
|
|
|
|
Do not commit secrets such as IBKR credentials, account identifiers, API tokens, or private configuration.
|
|
|
|
## Documentation
|
|
|
|
See [docs/README.md](docs/README.md) for the initial architecture notes and decision log.
|
|
|
|
The first data collection design note is [docs/data-fetcher.md](docs/data-fetcher.md), and the first training dataset contract is [docs/training-dataset.md](docs/training-dataset.md).
|
|
|
|
The first dataset generation notebook is [notebooks/spy_direction_dataset.ipynb](notebooks/spy_direction_dataset.ipynb).
|
|
|
|
Manual test instructions for the IBKR fetcher skeleton are in [docs/manual-test/README.md](docs/manual-test/README.md).
|