Part of epic: #31
Depends on: #38 (WatchlistManager must exist first)
What
Add --sector and --sector all arguments to pipeline_v2.py so users can run the pipeline across a full GICS sector instead of specifying individual tickers. Preserves existing --tickers behaviour.
CLI usage
# Run pipeline across all Technology sector tickers
python pipeline_v2.py --sector technology
# Run across all 11 sectors (deduplicating cross-listed names)
python pipeline_v2.py --sector all
# Existing behaviour preserved
python pipeline_v2.py --tickers AAPL MSFT NVDA
Implementation
parser.add_argument('--sector', type=str, default=None,
help='GICS sector name or "all" to run across full sector universe')
# In main:
if args.sector:
wm = WatchlistManager()
if args.sector == 'all':
tickers = wm.get_all_tickers()
else:
tickers = wm.get_sector(args.sector)
if not tickers:
raise ValueError(f'Unknown sector: {args.sector}. Available: {wm.list_sectors()}')
elif args.tickers:
tickers = args.tickers
else:
tickers = WatchlistManager().get_sector('technology') # sensible default
Acceptance Criteria
Part of epic: #31
Depends on: #38 (WatchlistManager must exist first)
What
Add
--sectorand--sector allarguments topipeline_v2.pyso users can run the pipeline across a full GICS sector instead of specifying individual tickers. Preserves existing--tickersbehaviour.CLI usage
Implementation
Acceptance Criteria
--sector technologyruns pipeline on all 8 Technology tickers--sector allruns on full deduplicated universe without crashing--sector nonexistentraises clear ValueError with list of valid sectors--tickersflag still works (no regression)--sectorwith 3 usage examples