This repository contains the A-share industry trend selector.
Industry-first trend selection strategy.
- Selects strong industries first
- Selects stocks from chosen industries
- Uses Tushare as the primary data source
- Uses AkShare as a fallback when Tushare does not return usable data
- Keeps local caches under
.hist_cache/to speed up repeated runs - Outputs Excel reports with
industry,stock, anddiagnosticssheets
Run:
.venv/bin/python a_share_trend_selector.pyUse the project virtual environment:
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
export TUSHARE_TOKEN=your_tushare_token_hereThe repository uses:
TUSHARE_TOKENfor the main data path- AkShare as the fallback data source from
requirements.txt CODE_LIMITfor small-scope debugging runsALLOW_COMPONENT_SHEET_FALLBACK=1only if you explicitly want to reuse the last Excel result as a temporary component fallback
Generated files are intentionally excluded from Git:
.hist_cache/trend_selector_results_run*.xlsxrun_full.log.DS_Store__pycache__/
If your entire ifind workspace is synced through iCloud, the .hist_cache/ directory will be synced with it as well, so another machine using the same synced folder can reuse the cache directly.