Skip to content

Portfolio Optimization

The portfolio optimization process finds the optimal funding allocation for each simulation scenario using linear programming.

Optimization Methods

The model supports two main optimization approaches:

Per-Simulation Method (per_simulation)

  • Solves the optimization problem for each individual simulation
  • Each simulation gets its own optimal portfolio
  • More computationally intensive but captures full uncertainty
  • Recommended for detailed analysis

Bootstrap Method (bootstrap)

  • Samples subsets of simulations and solves for each subset
  • Uses bootstrap sampling to reduce computational load
  • Good balance between accuracy and performance
  • Useful for large-scale analyses

Combined Method (combined)

  • Solves once using all simulations combined
  • Fastest but least accurate
  • Not recommended for most use cases

Linear Programming Formulation

The optimization problem is formulated as:

Objective Function

Maximize: Σ(Expected Value × Funding Allocation)

Constraints

  • Budget constraint: Σ(Funding Allocation) ≤ Total Budget
  • Organization constraints: 0 ≤ Funding ≤ Max Funding per Organization
  • Availability constraints: Funding = 0 if Organization Not Available

Decision Variables

  • Funding allocation to each organization
  • Binary variables for organization selection (if applicable)

Bootstrap Configuration

For bootstrap method, configure:

  • Bootstrap Size: Number of simulations per bootstrap sample (default: 1000)
  • Number of Bootstrap Samples: How many bootstrap samples to run (default: 100)

Example

Consider a scenario with: - Total Budget: $1,000,000 - Organization A: Expected Value = 2.5, Max Funding = $500,000 - Organization B: Expected Value = 2.0, Max Funding = $400,000 - Organization C: Expected Value = 1.8, Max Funding = $300,000

Optimal allocation might be: - Organization A: $500,000 (hits max funding limit) - Organization B: $400,000 (hits max funding limit) - Organization C: $100,000 (remaining budget)

Total Expected Value = 2.5×500,000 + 2.0×400,000 + 1.8×100,000 = $2,430,000

Performance Considerations

Parallel Processing

  • The model uses parallel processing for optimization
  • Number of workers determined by system capabilities
  • Batch processing for memory efficiency

Memory Management

  • Large-scale optimizations use batch processing
  • Intermediate results are saved to storage
  • Garbage collection between batches