Skip to content

Share Buyback Strategy Simulator

Python Streamlit License Release
Monte Carlo simulation framework for evaluating adaptive share buyback execution strategies

Performance at a Glance

Strategy Performance Distribution

Performance distribution across 10,000 Monte Carlo simulations showing adaptive strategies consistently outperforming the TWAP benchmark

Strategy Comparison

Expected performance improvement by strategy (basis points vs benchmark)


Why Adaptive Execution?

Traditional uniform (TWAP) execution buys the same amount every day regardless of price. Adaptive strategies exploit price fluctuations:

Scenario Uniform (S1) Adaptive (S4)
Price below benchmark Buy normal amount Buy more
Price above benchmark Buy normal amount Buy less
Large discount opportunity Miss it Capitalize aggressively
Near deadline Fixed pace Urgency acceleration

Result: +25-40 basis points average improvement over benchmark.


Strategy Performance Summary

Strategy Avg Performance Risk (Std) Best For
S1 Uniform 0 bps Low (~50) Baseline comparison
S2 Adaptive +15-25 bps Medium (~65) General use
S3 Discount +20-30 bps Medium (~60) Conservative targets
S4 Convex +25-40 bps Higher (~80) Aggressive optimization
S5 Flexible +30-45 bps Variable (~90) Maximum performance

Key Insight

Higher volatility markets show larger performance gains for adaptive strategies.


Quick Start

git clone https://github.com/Digital-AI-Finance/ShareBuybacks.git
cd ShareBuybacks
pip install -r requirements.txt
streamlit run app.py

Download from GitHub Releases and run directly - no Python required.

from modules.gbm import generate_gbm_paths
from modules.strategies_vectorized import (
    precompute_benchmarks,
    strategy_4_vectorized
)

# Generate 10,000 price paths
prices = generate_gbm_paths(S0=100, mu=0, sigma=0.25,
                            n_days=125, n_sims=10000, seed=42)
benchmarks = precompute_benchmarks(prices)

# Run Strategy 4 (Convex Adaptive)
perf, dur, vwap, bench = strategy_4_vectorized(
    prices, benchmarks, total_usd=1e9,
    min_duration=75, max_duration=125, target_duration=100
)

print(f"Mean performance: {perf.mean():.2f} bps")

Architecture

ShareBuybackApp/
    app.py                        # Streamlit interactive UI
    modules/
        config.py                 # Default parameters
        gbm.py                    # GBM price simulation
        strategies.py             # Single-path strategies
        strategies_vectorized.py  # Fast vectorized versions
    tests/
        test_strategies.py        # Unit tests

License

MIT License - See LICENSE for details.

Built with Streamlit, NumPy, and Plotly

(c) Joerg Osterrieder 2025