Kurniadi Ahmad Wijaya
Forward Deployed AI Engineer
Built production-grade AI and software for banking, fintech and enterprise.
Technical Consultant, Software & AI · Metrodata (PT Mitra Integrasi Informatika)
Skip to content

S&P 500 Stock Allocation Optimizer

A Streamlit app that allocates a portfolio across chosen S&P 500 stocks with linear programming and SLSQP, under sector constraints.

Key results

  • 2 solvers

    Linear programming and SLSQP compared in one view

  • 503

    S&P 500 tickers to choose from

  • 8 of 9

    Commits by Kurniadi

Role
Group project: app, data loading, charts and the linear programming model
Period
Nov 2024 to Dec 2024
Project type
Featured
Room in the 3D HQ
L3:stock-allocation-optimizer

Results

  • 2 solvers

    Linear programming and SLSQP compared in one view

    PuLP and SciPy SLSQP with the same constraints (the optimization module in the repository). This uses historical returns, not a guarantee of future returns.

  • 503

    S&P 500 tickers to choose from

    The ticker list in the repository; prices load live from Yahoo Finance.

  • 8 of 9

    Commits by Kurniadi

    Repository commit history (one commit by a teammate adds the SLSQP solver).

Problem

An investor choosing among S&P 500 stocks needs a way to compare allocations using historical returns while keeping sector exposure in check, such as limits on tech and oil and gas and a minimum share per stock.

Contribution

  1. I built the Streamlit app: stock selection, price download with yfinance for a chosen date range, cumulative return charts in Plotly and the results view.
  2. I modelled the allocation as a linear program in PuLP that maximizes cumulative return over the selected historical period, under tech, non-tech, oil and gas and minimum proportion constraints.
  3. A teammate added the same model with SciPy's SLSQP solver, so the app compares both allocations side by side.

Code and research

Tech stack

  • Python
  • Streamlit
  • SciPy
  • Plotly
  • pandas
  • PuLP
  • yfinance

I am open to freelance or part-time work in software and AI engineering.

kurniadiahmadwijaya@gmail.com
About and contactView CV