Skip to content

Project · 2024

Stock Portfolio

Simulating and comparing portfolio strategies on real price histories.

  • Python
  • Financial APIs
  • Risk & return estimation
  • User Interface

Team

4 people

Duration

2 months

Course

AI

Summary

A desktop application to select stocks and build a portfolio from their price histories, then simulate management strategies to find out which one works best. Four strategies were defined: diversified, increasing, buy and hold, and trend following. Two of them, diversified and increasing, were simulated and compared on an initial investment of $1,000.

My role. I managed the GUI's development.

In pictures

A closer look.

The graphical interface of the applicationClick to flip

Caption

The graphical interface

Click to flip back

Comparison of the diversified and increasing strategiesClick to flip

Caption

Diversified vs increasing allocation, from an initial $1,000

Click to flip back

Tools

What I worked with.

Python

The language of the whole application.

PySide6

To build the graphical interface.

SQLite

To store the data locally.

Y

Yahoo Finance API

Free, easy to integrate and a reliable source, with price histories that let us simulate on past years.

Results

What came out of it.

Achieved

A working simulator

A functional interface to simulate buying and selling stocks and to study which strategy works best.

Partially achieved

The strategy study

Two of the four strategies were simulated and compared, so the study is only partly complete.

Result
2 of 4 strategies

Looking ahead

Simulate the two remaining strategies, buy and hold and trend following, to complete the comparison.

Next project

This Website