Skip to content

Latest commit

 

History

History
169 lines (107 loc) · 3.5 KB

File metadata and controls

169 lines (107 loc) · 3.5 KB

Docker Deployment

This project runs as a background market-scanner worker. It does not need an inbound HTTP port, so the Compose service intentionally publishes no host ports.

First Run

cp config/config.example.json config/config.json
cp .env.example .env
docker compose up -d --build

Edit .env with local secrets before starting the service. config/config.json and .env are ignored by git and should not be committed.

For Alpaca paper trading credentials, keep the trading endpoint separate from the market-data endpoint:

ALPACA_TRADING_BASE_URL=https://paper-api.alpaca.markets/v2
ALPACA_USE_PAPER=true
ALPACA_DATA_FEED=iex

Local Markdown Output

When Discord or email is not configured, notification batches are still written as Markdown files under:

local_reports/YYYY-MM-DD/HHMMSS-notifications.md

The same run also keeps JSON state under analysis/.

The background worker only runs stock-alert scan cycles during its configured market-hours window (4:00 AM to 1:00 PM America/Los_Angeles). Outside that window, use the manual commands below to inspect the current screening state.

Once per weekday, the worker also writes a local combined screening report between 6:00 and 6:25 AM America/Los_Angeles (about 9:00-9:25 AM US/Eastern) so there is a pre-open report ready before the regular session starts:

local_reports/YYYY-MM-DD/HHMMSS-screening-all.md

Manual Report

Run one immediate local report without waiting for the market-hours loop:

docker compose exec breakoutanalysis python scripts/run_manual_report.py --sample-if-empty --limit 1

--sample-if-empty is for validation only: if strict breakout filters find no candidate, the report uses the top raw screener row and marks it as a manual sample in the Markdown file.

The manual command also writes a full screener pipeline report:

local_reports/YYYY-MM-DD/HHMMSS-screening.md
local_reports/YYYY-MM-DD/HHMMSS-screening.json

To generate only the all-market screening report:

docker compose exec breakoutanalysis python scripts/run_screening_report.py

Before 9:30 AM US/Eastern, auto uses the premarket gapper screener. To avoid confusing a narrow premarket report with the broader market scan, use:

docker compose exec breakoutanalysis python scripts/run_screening_report.py --screener all
docker compose exec breakoutanalysis python scripts/run_screening_report.py --screener market

Language And Model

Set these in .env:

ANALYSIS_OUTPUT_LANGUAGE=zh-CN
LLM_CURRENT_MODEL=gemini-2.5-pro

OpenAI-compatible models are also supported:

OPENAI_BASE_URL=https://your-openai-compatible-endpoint.example/v1
LLM_CURRENT_MODEL=gpt-5.5

Useful Commands

docker compose ps
docker compose logs -f breakoutanalysis
docker compose restart breakoutanalysis
docker compose down

Performance enhancement

Refactoring

Refactoring

Performance enhancement

Added documentation

Code improvement

Code improvement

Small fix

Improvement

Small fix

增强功能

添加验证

添加日志记录

改进错误处理

重构代码

增强功能 - 79

更新文档 - 107

增强功能 - 188

更新文档 - 7

重构代码 - 36

添加日志记录 - 77

优化性能 - 83

改进错误处理 - 138

更新文档 - 150

重构代码 - 155

添加日志记录 - 162

优化性能 - 267

重构代码 - 388

添加日志记录 - 461

添加日志记录 - 470

重构代码 - 533

补充提交 954