A machine learning + optimization pipeline that simulates a real-world solution for automating merchant loan offerings, inspired by a deployed fintech system used at scale.
SmartMerchantAdvance is an open-source replica of a real-world AI system designed to predict merchant processing volumes and generate optimized loan offers. It mimics a production-grade solution originally built at Moneris, adapted for public demonstration using simulated data.
Merchants often need short-term financing. By predicting their future transaction volumes, we can proactively offer optimized cash advances tailored to their capacity and risk profileβmaximizing both acceptance and profitability.
- Forecasting: A Convolutional Neural Network (CNN) model predicts 12 months of future processing volume.
- Optimization: A nonlinear mixed-integer model (solved via Gurobi) determines the optimal loan amount, term, and pricing for each merchant.
- Integration: Forecast results feed directly into the optimization engine.
- Python
- PyTorch (CNN)
- Gurobi Optimizer
- Pandas / NumPy
- Matplotlib / Seaborn
SmartMerchantAdvance/
βββ data/ # Simulated merchant time series data
βββ models/ # Trained models and checkpoints
βββ notebooks/ # EDA, model training, and evaluation notebooks
βββ outputs/ # Optimization results and plots
βββ src/ # Core forecasting and optimization code
βββ requirements.txt # Project dependencies
βββ README.md # Project documentation
- Clone the repo:
git clone https://github.com/mageed-ghaleb/SmartMerchantAdvance.git
cd SmartMerchantAdvance- Install dependencies:
pip install -r requirements.txt- Run a basic simulation pipeline:
python src/run_pipeline.pyWe will soon add a Streamlit-based dashboard for interactive forecasting and optimization tuning.
Created by Mageed Ghaleb β Senior Data Scientist | Optimization & AI Specialist
Inspired by real-world work at Moneris (Canadaβs leading payment processor)
MIT License β Free to use with attribution.