Portfolio Optimization

Select optimal stocks to maximize expected returns while meeting sector exposure constraints.

Score: ?
5 50
10% 50%
10s 5min
Balanced settings for typical portfolio optimization.
0/20
Selected Stocks
0.00%
Expected Return
0
Sectors
0%
Diversification
0%
Max Sector
0.00%
Volatility
0.00
Sharpe Proxy
0.000
HHI
Sector Allocation
Top Returns (Selected)
Selected Stocks 0 selected
Ticker Company Sector Predicted Return Weight
Click "Solve" to optimize your portfolio
All Available Stocks
0 stocks
Selected Ticker Company Sector Predicted Return Weight
Loading stock data...

REST API Guide

Use these endpoints to integrate portfolio optimization into your application.

1. Load demo data

Retrieve a pre-configured portfolio with sample stocks.

curl -X GET http://localhost:8080/demo-data/SMALL

2. Submit portfolio for optimization

Start the solver to find the optimal stock selection.

curl -X POST -H "Content-Type: application/json" \
  -d @portfolio.json \
  http://localhost:8080/portfolios

3. Get current solution

Poll for the latest solution while the solver is running.

curl -X GET http://localhost:8080/portfolios/{jobId}

4. Stop solving

Terminate the solver and retrieve the best solution found.

curl -X DELETE http://localhost:8080/portfolios/{jobId}

5. Analyze constraints

Get a detailed breakdown of constraint scores for a given solution.

curl -X PUT -H "Content-Type: application/json" \
  -d @portfolio.json \
  http://localhost:8080/portfolios/analyze

OpenAPI Reference

Interactive API documentation powered by Swagger UI.