This project implements a Financial Task Scheduler that applies various Operating System scheduling algorithms to manage and prioritize financial tasks. It serves as a prototype to demonstrate how OS concepts can be used in Finance and Investment.
The scheduler implements the following OS scheduling algorithms:
- First-Come, First-Served (FCFS)
- Shortest Job First (SJF)
- Shortest Remaining Time First (SRTF)
- Round Robin
- Priority Scheduling (Preemptive)
- Portfolio-Based Priority Management (PBPM) - A custom algorithm
In the context of finance and investment, task scheduling is crucial for managing various operations such as:
- Trade Execution
- Risk Assessment
- Portfolio Rebalancing
- Market Analysis
The scheduler allows prioritization based on task urgency, potential portfolio impact, and market volatility.
The project is implemented in Python, utilizing the following libraries:
- Streamlit: For creating the interactive web application
- Pandas: For data manipulation and display
- Matplotlib: For visualizing the task execution timeline
app.py
: The main Streamlit application that provides the user interface.scheduling_algorithms.py
: Contains the implementation of all scheduling algorithms.requirements.txt
: Lists all the Python dependencies required to run the project.
- Add financial tasks with properties such as name, arrival time, burst time, priority, task type, and portfolio impact.
- Choose from multiple scheduling algorithms to organize tasks.
- Visualize the task execution timeline.
- Calculate and display average waiting time for tasks.
- Adjust parameters like time quantum (for Round Robin) and market volatility (for PBPM).
- Clone the repository
- Install the required dependencies:
pip install -r requirements.txt
- Run the Streamlit app:
streamlit run app.py
- Add tasks using the input form.
- Select a scheduling algorithm from the sidebar.
- Adjust any necessary parameters (e.g., time quantum for Round Robin).
- Click "Run Scheduling Algorithm" to see the results.
- View the task execution timeline and average waiting time.
- Implement more domain-specific scheduling algorithms.
- Add real-time data integration for market conditions.
- Enhance visualization with more detailed performance metrics.
- Implement task dependencies and resource allocation.