How abderrahimx7/ai-bankstreet-1 works
BankStreet AI combines a Streamlit workspace for historical KBE/SPY risk analysis and fraud review with separate historical replay and model-experiment workflows. Users inspect market reports or upload compatible fraud CSVs; scoring uses a frozen XGBoost model and policy, either directly or through the optional API. The replay capability sends historical prices through Kafka and Spark to batch reports. The graph preserves documented replay stages, but their implementations are not present in the supplied tree. Edges reflect shown calls, indexed references, or README-documented relationships.
Main entry points: app.py Streamlit workspace · fraud_02_train.py Fraud training · inference.py CSV inference · fraud_04_xgboost.py Model experiments
Components 25
Research workspace
- Streamlit workspace
app.py - Shared UI
bankstreet/ui.py
Market analytics
- Price snapshots
- Risk calculations
bankstreet/risk.py - Market risk report
app.py
Historical replay
- Price producer
replay_prices.py - Kafka events
- Spark ingestion
- Event cleaning
- Replay features
- KBE scoring
- Replay reports
Fraud detection
- Fraud features
bankstreet/features.py - Fraud labels
bankstreet/labels.py - Time splits
bankstreet/splits.py - Fraud training
fraud_02_train.py - Model experiments
fraud_04_xgboost.py - Model evaluation
bankstreet/evaluation.py - Frozen policy
fraud_07_freeze_policy.py - Fraud evaluation view
bankstreet/fraud/dashboard.py - Transaction CSV
- Fraud API
api.py - CSV inference
bankstreet/fraud/inference.py - Scores and alerts
app.py
Other components
- Research user
Connections 30
- Research user → Streamlit workspace: opens
README.md - Streamlit workspace → Shared UI: renders with
app.py - Streamlit workspace → Price snapshots: reads
app.py - Streamlit workspace → Risk calculations: calculates
app.py - Streamlit workspace → Market risk report: exports
app.py - Price snapshots → Risk calculations: supplies prices
README.md - Research user → Price producer: starts replay
README.md - Price producer → Kafka events: sends events
README.md - Kafka events → Spark ingestion: streams messages
README.md - Spark ingestion → Event cleaning: writes raw events
README.md - Event cleaning → Replay features: cleans events
README.md - Replay features → KBE scoring: provides features
README.md - KBE scoring → Replay reports: exports reports
README.md - Research user → Fraud training: runs experiments
README.md - Fraud training → Fraud features: uses
- Fraud training → Fraud labels: uses
- Fraud training → Time splits: uses
- Fraud training → Model experiments: trains models
README.md - Fraud training → Model evaluation: evaluates
- Model experiments → Frozen policy: freezes policy
README.md - Streamlit workspace → Fraud evaluation view: renders
app.py - Research user → Transaction CSV: uploads
README.md - Streamlit workspace → CSV inference: scores directly
app.py - Streamlit workspace → Fraud API: posts CSV
app.py - Fraud API → CSV inference: delegates scoring
api.py - Transaction CSV → Streamlit workspace: provides file
app.py - CSV inference → Frozen policy: checks fingerprint
bankstreet/fraud/inference.py - CSV inference → Model experiments: loads model
bankstreet/fraud/inference.py - CSV inference → Scores and alerts: returns scores
app.py - Fraud evaluation view → Frozen policy: reads policy
bankstreet/fraud/dashboard.py