Skip to content

Instantly share code, notes, and snippets.

View diam0voi's full-sized avatar
🎯
Focusing

Ostap Baranov diam0voi

🎯
Focusing
View GitHub Profile
@diam0voi
diam0voi / OptPortDesc.py
Last active May 12, 2026 23:32
Stochastic Programming Portfolio Optimization
"""
Stochastic Programming Portfolio Optimization
This script demonstrates a simple two-asset portfolio choice problem under uncertainty,
solved via Monte Carlo simulation. At each discrete time step 't',
an investor decides what fraction of wealth 'u' to allocate to a risky asset,
with the rest going to a risk-free asset.
Here xi ~ N(0, sd²) represents a noisy signal about the stock’s excess return.