🔥 Official implementation of our ACM TOIS 2025 paper: “Learn to Rank Risky Investors: A Case Study of Predicting Retail Traders’ Behaviour and Profitability” by Waylon Li and Tiejun Ma.
📄 Paper DOI: 10.1145/3768623
- Profit-Aware Risk Ranker (PA-RiskRanker) reframes risky investor detection as a ranking problem rather than classification.
- Introduces PA-BCE loss to integrate Profit & Loss (P&L) into LETOR training.
- Self-Cross-Trader Attention captures both intra-trader and inter-trader dependencies.
conda create -n pariskranker python=3.10
conda activate pariskranker
pip install -r requirements.txt- Download preprocessed data here.
- Unzip into the project root. Expected structure:
├── data
│ ├── creditcard
│ │ ├── fold1 / fold2 / fold3
│ │ └── creditcard.csv
│ ├── jobprofit
│ │ ├── fold1 / fold2 / fold3
│ │ └── job_profitability.csv
├── evaluation
│ └── metrics.py
...
👉 [TODO: Add link] – Place it in the project root as with the data folder.
Run any of the following to benchmark:
# PARiskRanker
python run_pariskranker.py test \
--model_group_size 100 --test_group_size 100 \
--dataset creditcard --fold 1 \
--strategy binary --loss_fn graphWe also provide scripts for Rankformer, LambdaMART, SOUR, and baselines (classification & anomaly detection). See README sections for full commands.
📊 Final evaluation notebooks: notebook/eval.ipynb
FOLD=1 # choose from 1,2,3
python run_pariskranker.py train \
--epochs 200 --batch_size 128 \
--group_size 100 --dataset creditcard \
--fold $FOLD --strategy binary --pnl 1 \
--loss_fn graphHyperparameters can be customised via --help.
If you use this code, please cite:
@article{10.1145/3768623,
author = {Li, Weixian Waylon and Ma, Tiejun},
title = {Learn to Rank Risky Investors: A Case Study of Predicting Retail Traders’ Behaviour and Profitability},
year = {2025},
issue_date = {January 2026},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {44},
number = {1},
issn = {1046-8188},
url = {https://doi.org/10.1145/3768623},
doi = {10.1145/3768623},
journal = {ACM Trans. Inf. Syst.},
month = nov,
articleno = {15},
numpages = {33},
keywords = {learning to rank, domain-specific application, individual behaviour modelling, risk assessment}
}This work was conducted at the Artificial Intelligence Applications Institute, School of Informatics, University of Edinburgh.