-
Notifications
You must be signed in to change notification settings - Fork 0
200 lines (161 loc) · 7.31 KB
/
Copy pathingest.yml
File metadata and controls
200 lines (161 loc) · 7.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
name: Ingest SPY data
on:
workflow_dispatch:
schedule:
- cron: "30 22 * * 1-5"
jobs:
ingest:
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
fail-fast: false
env:
SPY_DB_PATH: data/spy_truth.db
SYMBOL: SPY
INTRADAY_TIMEFRAME: "15Min"
INTRADAY_BARS_TABLE: spy_bars_15m
ALPACA_API_KEY: ${{ secrets.ALPACA_API_KEY }}
ALPACA_API_SECRET: ${{ secrets.ALPACA_API_SECRET }}
ALPACA_TIMEOUT: 120
ALPACA_RETRIES: 6
ALPACA_FAIL_OPEN: 1
FINRA_CLIENT_ID: ${{ secrets.FINRA_CLIENT_ID }}
FINRA_CLIENT_SECRET: ${{ secrets.FINRA_CLIENT_SECRET }}
FRED_API_KEY: ${{ secrets.FRED_API_KEY }}
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pandas numpy matplotlib yfinance
- name: Python quality gate
run: |
python scripts/utils/lint_python.py scripts tests
- name: Unit tests
run: |
python -m unittest discover -s tests -v
- name: Python industry-standard audit
run: |
python scripts/utils/audit_code_quality.py
- name: Initialize pipeline health
run: |
mkdir -p outputs/health
rm -f outputs/health/warnings.log
echo "pipeline_start=$(date -u)" > outputs/health/run_state.txt
- name: Ingest SPY daily bars
run: |
python scripts/ingest_spy_daily.py
- name: Ingest SPY intraday (15m) from Alpaca
continue-on-error: true
run: |
python scripts/ingest_spy_intraday_alpaca.py || echo "WARN: intraday ingest degraded" >> outputs/health/warnings.log
- name: Aggregate options positioning metrics (0-1 DTE)
continue-on-error: true
run: |
DTE_MIN=0 DTE_MAX=1 python scripts/aggregate_options_positioning_metrics.py || echo "WARN: 0-1 DTE positioning degraded" >> outputs/health/warnings.log
- name: Aggregate options positioning metrics (2-3 DTE)
continue-on-error: true
run: |
DTE_MIN=2 DTE_MAX=3 python scripts/aggregate_options_positioning_metrics.py || echo "WARN: 2-3 DTE positioning degraded" >> outputs/health/warnings.log
- name: Build liquidity regime (daily)
run: |
python scripts/build_liquidity_regime_daily.py
- name: Build open resolution regime (intraday)
continue-on-error: true
run: |
python scripts/build_open_resolution_regime_intraday.py || echo "WARN: open resolution regime degraded" >> outputs/health/warnings.log
- name: FINRA darkpool overlay
continue-on-error: true
run: |
python scripts/ingest_finra_darkpool_overlay.py || echo "WARN: FINRA overlay degraded" >> outputs/health/warnings.log
- name: FRED macro overlays
continue-on-error: true
run: |
python scripts/ingest_fred_overlays.py || echo "WARN: FRED overlay degraded" >> outputs/health/warnings.log
- name: Build regime (daily)
run: |
python scripts/build_regime_spy_daily.py
- name: Build canonical auction expectancy dataset
continue-on-error: true
run: |
python scripts/build_auction_expectancy_events.py || echo "WARN: auction expectancy build degraded" >> outputs/health/warnings.log
- name: Classify auction fill paths
continue-on-error: true
run: |
python scripts/classify_fill_paths.py || echo "WARN: fill path classification degraded" >> outputs/health/warnings.log
- name: Measure gap excursions
continue-on-error: true
run: |
python scripts/measure_gap_excursions.py || echo "WARN: gap excursion metrics degraded" >> outputs/health/warnings.log
- name: Build conditional expectancy matrix
continue-on-error: true
run: |
python scripts/build_conditional_expectancy_matrix.py || echo "WARN: conditional expectancy matrix degraded" >> outputs/health/warnings.log
- name: Build SharpEdge 2.1 confidence matrix
continue-on-error: true
run: |
python scripts/build_confidence_weights.py || echo "WARN: confidence weighting engine degraded" >> outputs/health/warnings.log
- name: Build SharpEdge 2.1 risk decision layer
continue-on-error: true
run: |
python scripts/build_risk_decision_layer.py || echo "WARN: risk decision layer degraded" >> outputs/health/warnings.log
- name: Build regime×pressure×DTE expectancy
continue-on-error: true
run: python scripts/analysis/expectancy_engine.py
- name: Publish SharpEdge 2.0 report
continue-on-error: true
run: |
python scripts/publish_sharpedge_2_report.py || echo "WARN: SharpEdge 2.0 report degraded" >> outputs/health/warnings.log
- name: Build Robinhood FVG monitor handoff
continue-on-error: true
run: |
python scripts/build_robinhood_fvg_monitor.py || echo "WARN: Robinhood FVG monitor degraded" >> outputs/health/warnings.log
- name: Run deterministic controller
continue-on-error: true
run: |
python scripts/agents/controller_agent.py || echo "WARN: deterministic controller degraded" >> outputs/health/warnings.log
- name: Build Agentic AI v1 decision contract
continue-on-error: true
run: |
python scripts/agents/agent_v1_decision.py || echo "WARN: agentic AI v1 contract degraded" >> outputs/health/warnings.log
- name: Build operator brief MVP
continue-on-error: true
run: |
python scripts/agents/operator_brief.py || echo "WARN: operator brief degraded" >> outputs/health/warnings.log
- name: Build operator session review
continue-on-error: true
run: |
python scripts/agents/operator_session_review.py || echo "WARN: operator session review degraded" >> outputs/health/warnings.log
- name: Build morning open dashboard
continue-on-error: true
run: |
python scripts/agents/morning_open_dashboard.py || echo "WARN: morning open dashboard degraded" >> outputs/health/warnings.log
- name: Build Robinhood beta execution handoff
continue-on-error: true
run: |
python scripts/agents/robinhood_beta_execution.py || echo "WARN: Robinhood beta execution degraded" >> outputs/health/warnings.log
- name: Commit updated DB + outputs
continue-on-error: true
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add data/ outputs/ sql/ scripts/ || true
git diff --staged --quiet && echo "No changes to commit" && exit 0
git commit -m "Daily pipeline + SharpEdge 2.1 risk allocation engine" || true
git push || true
- name: Final pipeline state
if: always()
run: |
echo "PIPELINE COMPLETE"
if [ -f outputs/health/warnings.log ]; then
echo "WARNINGS DETECTED:"
cat outputs/health/warnings.log
else
echo "NO WARNINGS"
fi