Admin

ENV: … Market:
Loading status cards…

Automation & triggers

Heavy jobs: what they do, where to click, and who triggers them (you, API, or cron). Copy in webShares/admin_automation_catalog.py.

Control Where How triggered Notes
Strategy experiments (rank & backtest candidates) Strategies tab → workbench
Manual API

Started from the UI, or by scripts posting to the API.

Runs deterministic backtests on the ranked shortlist for a chosen day—different weights, filters, or horizons—and stores each outcome as a recorded run. Endpoints: /api/experiments/run/, /api/experiments/design/, /api/experiments/recent/. No cron job in this repo starts these automatically.
Effectiveness reports (timing, ranking, recommendations, liquidity) Operational reporting (CLI/API)
Scheduled API Manual

After live candidate generation, or on demand via management command/API.

Persists the Candidates shortlist daily via `persist_daily_candidate_shortlist`, then computes investment-outcome cohort reports via `compute_effectiveness_reports`. Staff API: /api/reports/effectiveness/. Automatically invoked at the end of `generate_live_candidates` unless `--skip-shortlist-persist`.
Outcome measurement (effectiveness → optimisation signals) Strategies tab → Model Center (outcome signals API)
Scheduled API

Weekly cron via scripts/scRunOutcomeMeasurement.sh (Saturday 07:45).

Primary path: `manage.py run_outcome_measurement` persists OptimizationOutcomeSignal rows and applies planner_state deltas on lane configs — no approve/reject queue. Staff APIs: /api/model-center/outcome-signals/ and /api/model-center/outcome-signals/dashboard/. See docs/plans/optimization-operating-model.md.
Model Center retest automation (retired) Removed — use Strategy optimiser below
Retired

Retired Phase C. Cron line removed from scripts/crontab-current.conf.

RETIRED: champion-vs-challenger retest removed. `/api/model-center/automation/*` returns HTTP 410; `manage.py run_model_center_automation` is a no-op. Use Strategy optimiser and outcome signals instead. See docs/plans/optimization-operating-model.md.
Strategy optimiser (primary policy search) Strategies tab → Automated policy search / Regression config
Primary Scheduled API

Host cron drains the queue after close; UI sets global Automation On/Off (cron executes, not in-app timer).

PRIMARY: searches weights, triggers, and (eventually) shortlist gates; one promotion recommendation per lane. Host runs `manage.py run_strategy_optimization_schedule` via scRunStrategyOptimisationTick.sh (weekdays 23:30 due check + drain; 03:00 queue safety net — see scripts/crontab-current.conf). Manual enqueue: POST /api/model-center/optimization/trigger/. Global toggle: POST /api/model-center/optimization/automation/. Outcome signals steer planner_state before due runs.
After-hours batch (prices, analysis, mail) This page → Daily close pipeline
Shortcut Same as cron

Same workload as the nightly cron; this tile reruns it on demand.

Downloads prices, refreshes analysis, updates watchlists, and sends summary mail for the post-close routine. Host wrappers and recovery flows are described in scripts/README.md (for example scStockBatchRunClose.sh, scRecoverMissedCloseBatch.sh).
Live candidate refresh This page → Daily close pipeline
Shortcut After rankings

Normally follows the ranking step after close; use this to regenerate sooner.

Rebuilds the saved candidate rows the workspace reads from. scripts/README.md explains generate_live_candidates and how it relates to the overnight batch.
Trading dry-run This page → Command Execution
Manual

Started manually from here unless you wire your own cron.

Runs trading-batch checks without sending live orders—useful before trusting automation.
Platform regression tests This page → Command Execution
Manual

Started manually from here unless you wire your own cron.

Runs the pytest suite through the legacy menu runner.

Optimisation pipeline

Can outcome measurement and policy search run? Pipeline issues here block optimisation — funnel and ranking actions live on the Strategies tab.

Loading outcome signals…

Regression Test Results

FAILED

Test Output:

Regression test suite started in the background (PID 2424934).
Log: /var/www/system/web/runtime/logs/production/shares.log
This job can take longer than the web server request limit (120s). Refresh this page after a few minutes to see log output and completion status.

Close stage: Analyze & rank

Close stage: analyze and rank background job.
Log: /var/www/system/web/runtime/logs/production/shares.log

--- Log tail ---
[ADMIN_BG_JOB_START] job_key=close_stage_analyze_and_rank pid=2425162 label="Close stage: analyze and rank"
[2026-06-15 21:27:49]  [    INFO]  [          scStockSelect.py _spawn_admin_background_command] [  357]  Close stage: analyze and rank spawned in background: pid=2425162 log=/var/www/system/web/runtime/logs/production/shares.log
[2026-06-15 21:27:49]  [    INFO]  [          scStockSelect.py menuSelection             ] [  773]  menuSelection completed in 0.060s (level=2, pick=11, tab=default)
Traceback (most recent call last):
  File "/var/www/system/web/envs/development/lib/python3.12/site-packages/django/core/management/__init__.py", line 255, in fetch_command
    app_name = commands[subcommand]
               ~~~~~~~~^^^^^^^^^^^^
KeyError: 'close_stage_analyze_rank'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/www/system/web/development/manage.py", line 21, in 
    main()
  File "/var/www/system/web/development/manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/var/www/system/web/envs/development/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/var/www/system/web/envs/development/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/www/system/web/envs/development/lib/python3.12/site-packages/django/core/management/__init__.py", line 262, in fetch_command
    settings.INSTALLED_APPS
  File "/var/www/system/web/envs/development/lib/python3.12/site-packages/django/conf/__init__.py", line 89, in __getattr__
    self._setup(name)
  File "/var/www/system/web/envs/development/lib/python3.12/site-packages/django/conf/__init__.py", line 76, in _setup
    self._wrapped = Settings(settings_module)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/www/system/web/envs/development/lib/python3.12/site-packages/django/conf/__init__.py", line 190, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "", line 1387, in _gcd_import
  File "", line 1360, in _find_and_load
  File "", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'config.settings.production'
[ADMIN_BG_JOB_EXIT] job_key=close_stage_analyze_and_rank pid=%s code=%s
2425162
1

Exit: n/a

Close stage: portfolio assessment

Close stage: portfolio assessment background job.
Log: /var/www/system/web/runtime/logs/production/shares.log

--- Log tail ---
[ADMIN_BG_JOB_START] job_key=close_stage_portfolio_assessment pid=2424883 label="Close stage: portfolio assessment"
[2026-06-15 21:25:46]  [    INFO]  [          scStockSelect.py _spawn_admin_background_command] [  357]  Close stage: portfolio assessment spawned in background: pid=2424883 log=/var/www/system/web/runtime/logs/production/shares.log
[2026-06-15 21:25:46]  [    INFO]  [          scStockSelect.py menuSelection             ] [  773]  menuSelection completed in 0.457s (level=2, pick=13, tab=default)
Traceback (most recent call last):
  File "/var/www/system/web/envs/development/lib/python3.12/site-packages/django/core/management/__init__.py", line 255, in fetch_command
    app_name = commands[subcommand]
               ~~~~~~~~^^^^^^^^^^^^
KeyError: 'run_portfolio_assessment'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/www/system/web/development/manage.py", line 21, in 
    main()
  File "/var/www/system/web/development/manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/var/www/system/web/envs/development/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/var/www/system/web/envs/development/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/www/system/web/envs/development/lib/python3.12/site-packages/django/core/management/__init__.py", line 262, in fetch_command
    settings.INSTALLED_APPS
  File "/var/www/system/web/envs/development/lib/python3.12/site-packages/django/conf/__init__.py", line 89, in __getattr__
    self._setup(name)
  File "/var/www/system/web/envs/development/lib/python3.12/site-packages/django/conf/__init__.py", line 76, in _setup
    self._wrapped = Settings(settings_module)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/www/system/web/envs/development/lib/python3.12/site-packages/django/conf/__init__.py", line 190, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "", line 1387, in _gcd_import
  File "", line 1360, in _find_and_load
  File "", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'config.settings.production'
[ADMIN_BG_JOB_EXIT] job_key=close_stage_portfolio_assessment pid=%s code=%s
2424883
1

Exit: n/a

Live Candidate Generation Results

FAILED

Command Output:

Live candidate generation command started in the background (PID 2425388).
Log: /var/www/system/web/runtime/logs/production/shares.log
This job can take longer than the web server request limit (120s). Refresh this page after a few minutes to see log output and completion status.