|
| 1 | +# QuantStrategyPlugins |
| 2 | + |
| 3 | +Open sidecar strategy plugins for QuantStrategyLab runtimes. |
| 4 | + |
| 5 | +The repository emits JSON signal artifacts that are consumed through |
| 6 | +`quant_platform_kit.common.strategy_plugins`. Platform repositories such as |
| 7 | +Interactive Brokers, Schwab, LongBridge, and Firstrade only load artifacts and |
| 8 | +send notifications; plugin research and signal generation live here. |
| 9 | + |
| 10 | +## What Is Public |
| 11 | + |
| 12 | +- Plugin source code and synthetic tests. |
| 13 | +- The artifact schema used by platform runtimes. |
| 14 | +- Example local TOML config with placeholder paths. |
| 15 | + |
| 16 | +## What Stays Out |
| 17 | + |
| 18 | +- Broker credentials, tokens, account IDs, and SMTP settings. |
| 19 | +- GCS bucket names, Cloud Run service names, and production deploy workflows. |
| 20 | +- Generated `data/output` artifacts and proprietary runtime configuration. |
| 21 | +- Non-public datasets. Tests use synthetic price histories. |
| 22 | + |
| 23 | +## Plugins |
| 24 | + |
| 25 | +- `crisis_response_shadow`: black-swan defense observer for leveraged US equity |
| 26 | + strategies. It writes shadow-mode artifacts and never calls brokers. |
| 27 | +- `taco_rebound_shadow`: research-only rebound-budget observer. The generic |
| 28 | + runner keeps it gated until promotion criteria are met. |
| 29 | + |
| 30 | +## Usage |
| 31 | + |
| 32 | +Run a plugin config: |
| 33 | + |
| 34 | +```bash |
| 35 | +qsp-run-strategy-plugins --config docs/examples/strategy_plugins.example.toml |
| 36 | +``` |
| 37 | + |
| 38 | +Build a crisis response artifact directly from a local price-history CSV: |
| 39 | + |
| 40 | +```bash |
| 41 | +qsp-build-crisis-response-shadow-signal \ |
| 42 | + --prices data/input/price_history.csv \ |
| 43 | + --as-of 2026-05-22 \ |
| 44 | + --output-dir data/output/tqqq_growth_income/plugins/crisis_response_shadow |
| 45 | +``` |
| 46 | + |
| 47 | +Generated artifacts include `latest_signal.json`, dated JSON, dated CSV, and |
| 48 | +an evidence CSV. `latest_signal.json` is the file platform runtimes mount via |
| 49 | +`*_STRATEGY_PLUGIN_MOUNTS_JSON`. |
| 50 | + |
| 51 | +## Local Checks |
| 52 | + |
| 53 | +```bash |
| 54 | +python -m pip install -e '.[test]' |
| 55 | +python -m pytest -q |
| 56 | +ruff check . |
| 57 | +``` |
0 commit comments