A comprehensive financial dashboard built with Streamlit for Korea Securities Investment Fund (KSIF). This dashboard provides real-time portfolio monitoring, position tracking, P&L analysis, and benchmark comparisons.
- 🏠 Dashboard: Core overview with Position Summary and P&L Report
- 💼 Positions: Detailed portfolio positions view
- 📋 Transactions: Comprehensive trade history with filtering capabilities
- 📈 Reports: Benchmark comparison and portfolio performance analysis
- 👥 Teams: Team management and performance tracking
- ⚙️ Settings: Application configuration and user preferences
- Date Range Picker: Filter data by custom date ranges
- Team Filter: View data for specific teams or all teams
- Currency Filter: Display values in different currencies (KRW, USD, EUR, JPY)
- Period Selection: Daily, Weekly, MTD, YTD analysis options
- Clean, modern design matching the KSIF brand
- Responsive layout with intuitive navigation
- Real-time data updates
- Interactive charts and tables
- Python 3.12+
- Poetry (for dependency management)
-
Clone the repository (if not already done):
git clone <repository-url> cd ksif-kis-api
-
Install dependencies:
poetry install --no-root
-
Run the dashboard:
poetry run streamlit run app/ksif_dashboard.py
-
Open your browser and navigate to:
http://localhost:8501
To start the dashboard, use the following command:
poetry run streamlit run app/ksif_dashboard.pyThe dashboard will be available at http://localhost:8501 in your web browser.
- Sidebar Navigation: Click navigation buttons to switch between pages:
- 🏠 Dashboard: Main overview with positions and P&L
- 💼 Positions: Detailed portfolio view
- 📋 Transactions: Trade history and transaction management
- 📈 Reports: Benchmark comparisons and performance analysis
- 👥 Teams: Team management interface
- ⚙️ Settings: Application configuration
- Header Controls: Use date range picker, team filter, and currency selector to customize the view (available on all pages)
- Interactive Elements: Click on charts, tables, and buttons to explore data in detail
The current implementation uses placeholder data with comments indicating where real data sources should be integrated:
- Position Data: Replace
generate_position_data()with actual KIS API calls - P&L Data: Replace
generate_pl_data()with real trading system data - Transaction Data: Replace
generate_transaction_data()with actual trade history - Benchmark Data: Replace
generate_benchmark_data()with financial market data APIs
- Streamlit: Web application framework
- Plotly: Interactive charts and visualizations
- Pandas: Data manipulation and analysis
- NumPy: Numerical computing support
- python-kis: Korea Investment & Securities API integration
app/
├── ksif_dashboard.py # Main dashboard application
├── ... # Additional modules (to be added)
docs/
├── references/
│ ├── v0-ksif-dashboard.md # Original design specification
│ └── ...
pyproject.toml # Poetry configuration and dependencies
- Layout Management: Streamlit columns and containers for responsive design
- Data Generation: Placeholder functions that simulate real data sources
- Visualization: Plotly charts for interactive data exploration
- Styling: Custom CSS for professional appearance
- State Management: Streamlit session state for user interactions
The dashboard uses custom CSS defined in the main application file. Key style elements include:
- Color scheme: Blue (#4A90E2), Green (#7ED321), Red (#D0021B)
- Typography: Clean sans-serif fonts
- Layout: Card-based design with subtle shadows
To connect real data sources, modify these functions in app/ksif_dashboard.py:
generate_position_data(): Connect to KIS API for current positionsgenerate_pl_data(): Connect to trading system for P&L calculationsgenerate_transaction_data(): Connect to trade databasegenerate_benchmark_data(): Connect to market data providers
Environment variables and configuration can be managed through:
.envfiles for API keys and secretsconfig/directory for application settings- Streamlit's secrets management for production deployment
- Create new widget functions following the existing pattern
- Add navigation menu items in
create_sidebar() - Implement new data generation/integration functions
- Update the main layout in the
main()function
# Run the application locally
poetry run streamlit run app/ksif_dashboard.py
# Access at http://localhost:8501The dashboard can be deployed using:
- Streamlit Cloud: Direct deployment from GitHub
- Docker: Containerized deployment
- AWS/Azure/GCP: Cloud platform deployment
- Follow the existing code structure and naming conventions
- Add comments for data integration points
- Test all interactive elements
- Update this README for any new features
© 2025 Korea Securities Investment Fund. All rights reserved.