The Investment Optimization Program is designed to assist in making strategic investment decisions. It leverages various algorithms - Brute Force, Glouton (Greedy), and Dynamic Programming - to analyze and select the best combination of stock actions that maximize profit while adhering to a specified budget.
- Data Processing: Loads and cleans stock action data from a CSV file.
- Algorithm Selection: Offers the choice of three distinct algorithms:
- Brute Force: Exhaustively searches all possible combinations of actions.
- Glouton (Greedy): Utilizes a greedy approach for quick and effective decision-making.
- Dynamic Programming: Applies a more sophisticated method to solve the problem efficiently.
- Result Visualization: Displays the best combination of actions, total profit, and investment cost.
- Clone the Repository
git clone https://github.com/kenza12/Projet-7.git
cd Projet-7
- Set Up Your Environment
- Ensure Python 3 is installed on your system.
- Create a virtual environment:
python3 -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
-
Install dependencies:
pip install -r requirements.txt
- Run the Program
Execute the script with the desired algorithm and data file:
python main.py path/to/your/datafile.csv [algorithms]
Replace [algorithms]
with one or more of the following: bruteforce
, glouton
, dynamic
.
- View Results
The program will output the most profitable combination of actions based on the chosen algorithm.
- Python 3
- Pandas
- Numpy
- tabulate