A comprehensive, AI-powered analytics platform for institutional bond portfolio management, risk assessment, and market intelligence.
CreditPulse is a sophisticated financial technology platform that transforms how institutional investors, portfolio managers, and risk analysts approach bond market analytics. By combining traditional fixed-income mathematics with cutting-edge AI and machine learning, CreditPulse provides real-time insights, predictive analytics, and automated risk management for bond portfolios of any size.
- Portfolio Managers: Comprehensive portfolio analytics, sector exposure analysis, and concentration risk assessment
- Risk Analysts: Advanced VaR calculations, stress testing, and scenario analysis with regulatory-grade metrics
- Traders: Real-time spread monitoring, liquidity analysis, and smart alert systems for market opportunities
- Research Teams: AI-powered market intelligence, event correlation analysis, and macroeconomic linkages
- Duration & Convexity: Precise Macaulay and modified duration calculations with convexity adjustments
- Yield Curve Analysis: Multi-curve modeling with parallel shifts and twist scenarios
- Credit Risk Metrics: Probability of default modeling, credit spread analysis, and rating transition matrices
- Liquidity Assessment: Bid-ask spread analysis, trading volume metrics, and market impact estimation
- Market Event Analysis: AI-driven insights from regulatory filings, earnings calls, and market news
- Natural Language Queries: Ask complex questions about your portfolio in plain English
- Predictive Analytics: Machine learning models for spread prediction and default probability estimation
- Automated Report Generation: AI-generated executive summaries and risk reports
- Statistical Anomaly Detection: Z-score based alerts for abnormal spread movements
- Multi-Channel Notifications: Integration with n8n, Slack, Teams, and email systems
- Customizable Thresholds: User-defined risk parameters and escalation procedures
- Real-Time Monitoring: Continuous surveillance of portfolio positions and market conditions
- Issuer Relationship Mapping: Visualize complex corporate structures and sector interconnections
- Contagion Path Analysis: Identify potential spillover effects during market stress
- Event Impact Modeling: Simulate sector shocks and cross-asset correlations
- Interactive Network Visualization: PyVis-powered interactive graphs with drill-down capabilities
- Multi-Format Support: CSV, Excel, and database connectivity for portfolio uploads
- Sector Exposure Analysis: Detailed breakdown by industry, geography, and rating
- Concentration Risk Metrics: Herfindahl indices and diversification ratios
- Performance Attribution: Return decomposition and benchmark analysis
- FRED API Integration: Real-time access to 800,000+ economic time series
- Yield Curve Dynamics: Treasury curve analysis and corporate spread relationships
- Economic Indicator Correlation: Link portfolio performance to macro variables
- Central Bank Policy Impact: Model effects of monetary policy changes
- Historical Scenarios: 2008 Financial Crisis, COVID-2020, Interest Rate Cycles
- Custom Stress Tests: User-defined shock parameters and correlation assumptions
- Regulatory Scenarios: CCAR, ICAAP, and Basel III compliant stress testing
- Monte Carlo Simulation: Probabilistic scenario generation with confidence intervals
- Python 3.12+: Modern Python with advanced type hints and performance optimizations
- Streamlit 1.50+: Interactive web application framework for financial dashboards
- Pandas 2.3+: High-performance data manipulation and analysis
- NumPy 2.3+: Numerical computing for mathematical calculations
- NetworkX 3.5+: Graph theory and network analysis for knowledge graphs
- PyVis 0.3+: Interactive network visualization with D3.js backend
- Scikit-learn: Machine learning for predictive analytics and clustering
- SciPy: Advanced statistical functions and optimization algorithms
- OpenAI API: Large language model integration for natural language processing
- Matplotlib: Statistical plotting and chart generation
- Seaborn: Advanced statistical data visualization
- Plotly: Interactive charts and financial time series
- Streamlit Components: Custom HTML/JavaScript integration
- FRED API: Federal Reserve Economic Data access
- n8n: Workflow automation and webhook management
- Requests: HTTP API integration and data fetching
- Python 3.12 or higher
- Virtual environment (recommended)
- FRED API key (free registration at fred.stlouisfed.org)
-
Clone the repository:
git clone https://github.com/Wodenvase/CreditPulse.git cd CreditPulse -
Set up Python virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Verify installation:
python test_fred_integration.py
Option 1: From src directory (Recommended)
cd src
PYTHONPATH=. streamlit run dashboard/app.pyOption 2: Direct launch
streamlit run src/dashboard/app.py --server.port 8501Option 3: Background mode
nohup streamlit run src/dashboard/app.py --server.headless=true &The dashboard will be available at: http://localhost:8501
detailed_bond_portfolio.csv: 31 bonds, $34.5M portfolio across 8 sectorscomprehensive_bond_portfolio.csv: Alternative portfolio structure- Sample issuers: Apple, Microsoft, JPMorgan, Johnson & Johnson, Tesla, and more
bond,sector,duration,convexity,var,expectedshortfall,issuer,rating,yield,spread,
maturity_date,face_value,market_value,coupon_rate,issue_date,bid_ask_spread,trading_volume- Upload Portfolio: Use the file uploader in the dashboard
- Enter Bond Ticker: Try "AAPL2025", "JPM2028", or "TSLA2026"
- FRED Integration: Enter your API key and test with "DGS10" (10-Year Treasury)
- Scenario Testing: Run "2008 Crisis" or "COVID-2020" scenarios
- Multi-billion dollar portfolios: Scalable analytics for large institutional mandates
- ESG Integration: Environmental, Social, and Governance scoring and screening
- Benchmark Analysis: Track performance vs. Bloomberg Barclays and ICE BofA indices
- Client Reporting: Automated monthly and quarterly performance reports
- Regulatory Compliance: BASEL III, Solvency II, and IFRS 17 reporting
- Stress Testing: CCAR and ICAAP compliant scenario analysis
- Credit Risk Modeling: PD, LGD, and EAD calculations with regulatory parameters
- Market Risk: VaR, Expected Shortfall, and sensitivity analysis
- Relative Value Analysis: Cross-sector and cross-currency bond comparison
- New Issue Analysis: Primary market pricing and allocation decisions
- Credit Research: Fundamental analysis with AI-powered insights
- Market Making: Liquidity provision and inventory management
- Credit Analysis: Deep-dive issuer analysis with financial statement integration
- Sector Rotation: Identify attractive sectors and timing strategies
- Yield Curve Positioning: Duration and curve risk management
- Event-Driven Investing: M&A, spinoffs, and restructuring opportunities
-
π― Bond Analytics Hub
- Individual bond analysis with real-time calculations
- Duration, convexity, and yield-to-maturity metrics
- Credit spread analysis and historical comparisons
-
π Portfolio Management
- Drag-and-drop CSV/Excel upload functionality
- Aggregate portfolio metrics and sector analysis
- Concentration risk and diversification analytics
-
π§ AI Intelligence Center
- Natural language query interface
- Market event correlation and impact analysis
- Automated insights and recommendation engine
-
β οΈ Smart Alerts Dashboard- Real-time anomaly detection with Z-score analysis
- Customizable alert thresholds and notification channels
- Historical alert tracking and performance metrics
-
πΈοΈ Knowledge Graph Explorer
- Interactive network visualization of issuer relationships
- Contagion path analysis and sector interconnections
- Event correlation mapping with risk propagation
-
π Macroeconomic Integration
- FRED API integration with 800,000+ economic series
- Yield curve analysis and central bank policy tracking
- Correlation analysis between macro variables and spreads
-
π Scenario Analysis Lab
- Historical crisis scenarios (2008, COVID-19, etc.)
- Custom stress testing with user-defined parameters
- Monte Carlo simulation and probabilistic analysis
# Optional: Set default FRED API key
export FRED_API_KEY="your_api_key_here"
# Optional: Set n8n webhook URL for alerts
export N8N_WEBHOOK_URL="https://your-n8n-instance.com/webhook/alerts"
# Optional: Set OpenAI API key for enhanced AI features
export OPENAI_API_KEY="your_openai_key_here"Create a config.yaml file in the project root:
dashboard:
port: 8501
theme: "light"
alerts:
default_threshold: 2.5
notification_channels: ["email", "slack"]
fred:
cache_duration: 3600 # Cache FRED data for 1 hour
ai:
model: "gpt-4"
max_tokens: 1000from bond_analytics import calculate_duration, calculate_convexity
# Calculate duration
duration = calculate_duration(bond_data, discount_rate=0.05)
# Calculate convexity
convexity = calculate_convexity(bond_data)from bond_analytics.portfolio import Portfolio
# Load portfolio
portfolio = Portfolio("path/to/portfolio.csv")
# Get aggregate metrics
metrics = portfolio.aggregate_metrics()
exposure = portfolio.sector_exposure()from bond_analytics.alerts import SmartAlert
# Set up alert system
alert = SmartAlert(spread_history, "BOND_ID", webhook_url)
is_abnormal, z_score = alert.is_abnormal_move(latest_spread)