Market Contagion Simulator was inspired by the idea that financial markets are deeply interconnected, yet most tools analyse assets in isolation. We wanted to model how instability behaves like contagion, spreading through correlations, volatility, and systemic linkages across crypto, equities, commodities, and macro assets. The platform ingests intraday market data, computes log returns and correlation matrices, and represents the market as a dynamic network where nodes are assets and edges reflect correlation strength. Users can select a specific historical date to reconstruct that day’s market structure, identify clusters of systemic stress, and click individual assets to receive AI-driven summaries explaining their behaviour within the broader system. We built the backend using a modular FastAPI architecture, handling data ingestion from Binance and yFinance, feature engineering, stress detection, and state management for efficient retrieval. One of the main challenges was aligning timestamps across data providers, handling timezone inconsistencies, and dynamically recalculating historical data based on user-selected dates without overloading the system. We also had to resolve module import conflicts and ensure seamless frontend-backend integration. We are proud of building a scalable architecture, implementing dynamic historical reconstruction, and transforming complex financial relationships into an intuitive visual network. Through this project, we learned about backend system design, real-time data processing, network modelling, and the importance of clean architecture when working with financial data. In terms of the machine learning, we've implemented 7 different models. These ranges from volatility to time ahead prediction both in crypto and stocks. Using xgboost we feature engineered using iterative feedback from SHAP to tweak the hyperparameters and features, predicting both classification and regression data. We also use a rolling z normalisation method for anomaly detection to evolve Market Contagion Simulator into a comprehensive market intelligence platform.
Built With
- fastapi
- python
- react-native
- tailwind
- xgboost
Log in or sign up for Devpost to join the conversation.