Monthly Intelligent Advisory Review #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Monthly Advisory Review | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| as_of: | |
| description: "Report date. Defaults to current UTC date when empty." | |
| required: false | |
| type: string | |
| previous_report_path: | |
| description: "Optional previous advisory report JSON path inside advisor repository checkout." | |
| required: false | |
| default: "" | |
| type: string | |
| political_events_path: | |
| description: "Path inside PoliticalEventTrackingResearch." | |
| required: false | |
| default: "data/live/political_events.csv" | |
| type: string | |
| political_watchlist_path: | |
| description: "Path inside PoliticalEventTrackingResearch." | |
| required: false | |
| default: "data/live/political_watchlist.csv" | |
| type: string | |
| ai_signal_path: | |
| description: "Path inside AiLongHorizonSignalPipelines." | |
| required: false | |
| default: "data/output/latest_signal.json" | |
| type: string | |
| theme_momentum_path: | |
| description: "Optional path inside AiLongHorizonSignalPipelines. Empty disables theme momentum context." | |
| required: false | |
| default: "data/output/theme_momentum_snapshot.json" | |
| type: string | |
| schedule: | |
| - cron: "20 13 1 * *" | |
| jobs: | |
| build-monthly-review: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout advisor repository | |
| uses: actions/checkout@v6 | |
| with: | |
| path: advisor | |
| - name: Checkout political event repository | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: QuantStrategyLab/PoliticalEventTrackingResearch | |
| path: political-events | |
| - name: Checkout AI shadow repository | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: QuantStrategyLab/AiLongHorizonSignalPipelines | |
| path: ai-long-horizon | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Install advisor package | |
| working-directory: advisor | |
| run: python -m pip install -e . | |
| - name: Build monthly report and review artifact | |
| working-directory: advisor | |
| env: | |
| INPUT_AS_OF: ${{ github.event.inputs.as_of || '' }} | |
| PREVIOUS_REPORT_PATH: ${{ github.event.inputs.previous_report_path || '' }} | |
| POLITICAL_EVENTS_PATH: ${{ github.event.inputs.political_events_path || 'data/live/political_events.csv' }} | |
| POLITICAL_WATCHLIST_PATH: ${{ github.event.inputs.political_watchlist_path || 'data/live/political_watchlist.csv' }} | |
| AI_SIGNAL_PATH: ${{ github.event.inputs.ai_signal_path || 'data/output/latest_signal.json' }} | |
| THEME_MOMENTUM_PATH: ${{ github.event.inputs.theme_momentum_path || 'data/output/theme_momentum_snapshot.json' }} | |
| run: | | |
| set -euo pipefail | |
| AS_OF="${INPUT_AS_OF:-$(date -u +%F)}" | |
| mkdir -p data/output/monthly_advisory_review | |
| THEME_ARGS=() | |
| if [ -n "${THEME_MOMENTUM_PATH}" ] && [ -f "../ai-long-horizon/${THEME_MOMENTUM_PATH}" ]; then | |
| THEME_ARGS=(--theme-momentum "../ai-long-horizon/${THEME_MOMENTUM_PATH}") | |
| fi | |
| python scripts/build_advisory_report.py \ | |
| --as-of "${AS_OF}" \ | |
| --cadence monthly \ | |
| --political-events "../political-events/${POLITICAL_EVENTS_PATH}" \ | |
| --political-watchlist "../political-events/${POLITICAL_WATCHLIST_PATH}" \ | |
| --ai-signal "../ai-long-horizon/${AI_SIGNAL_PATH}" \ | |
| "${THEME_ARGS[@]}" \ | |
| --output-json "data/output/monthly_advisory_review/advisory_report_${AS_OF}.json" \ | |
| --output-md "data/output/monthly_advisory_review/advisory_report_${AS_OF}.md" | |
| REVIEW_ARGS=( | |
| --current-report "data/output/monthly_advisory_review/advisory_report_${AS_OF}.json" | |
| --output-json "data/output/monthly_advisory_review/monthly_review_${AS_OF}.json" | |
| --output-md "data/output/monthly_advisory_review/monthly_review_${AS_OF}.md" | |
| ) | |
| if [ -n "${PREVIOUS_REPORT_PATH}" ] && [ -f "${PREVIOUS_REPORT_PATH}" ]; then | |
| REVIEW_ARGS+=(--previous-report "${PREVIOUS_REPORT_PATH}") | |
| fi | |
| python scripts/build_monthly_review.py "${REVIEW_ARGS[@]}" | |
| - name: Upload monthly review artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: monthly-advisory-review | |
| path: advisor/data/output/monthly_advisory_review/ | |
| if-no-files-found: error |