DG · Portfolio
Study Projects

AlgoInvest&Trade

Invest with algorithms

Big O notation Brute force CSV Dynamic programming Knapsack algorithm Python

About the project

This program implements two algorithmic approaches to solve the knapsack problem: it calculates the most profitable stock portfolio possible for a maximum budget of 500 EUR (use case for the fictional company AlgoInvest&Trade).

Main features

Exhaustive brute force - Explores every possible stock combination to guarantee the optimal profit, at the cost of exponential runtime (O(2^n)).

Dynamic programming - Optimized knapsack-style algorithm, much faster (approx. O(n * W)), recommended once the list exceeds about 20 assets and using memoization to avoid redundant calculations.

Invalid data report - Optional mode that detects and reports corrupted or unusable data in the provided datasets (for example negative costs or profits, missing values, and more).

Challenges encountered

Understand how the knapsack algorithm is constructed

Learnings

Big O notation, brute force, dynamic programming

Technical stack technique

B

Big O notation

Tool

B

Brute force

Tool

C

CSV

Tool

D

Dynamic programming

Tool

K

Knapsack algorithm

Tool

P

Python

Language

Is this project interesting for you ?

Let's discuss how I can help you with your next project