How iemanshuman/neuro-hedge works
Neuro-Hedge is a Python framework for training and evaluating transaction-cost-aware option hedges with guided DDPG. Training simulates market paths in a hedging environment, uses Black–Scholes delta actions during teacher forcing, and updates an actor–critic from replayed experience. Evaluation compares the trained policy with a Black–Scholes baseline and summarizes P&L and trading costs. The graph follows the sampled entry points and explicit README capabilities; unsampled implementation details are omitted.
Main entry points: ddpg_agent.py DDPG agent · train.py Training loop · evaluate.py Evaluation workflow · hedging_env.py Hedging environment
Components 13
Training and evaluation
- Training loop
train.py - Evaluation workflow
evaluate.py - Performance results
evaluate.py - Agent checkpoints
neuro_hedge_agent_checkpoint_5000_actor.pth
Market and hedging
- Hedging environment
hedging_env.py - GBM simulator
market_simulator.py - Call option pricing
black_scholes.py - BS hedge baseline
black_scholes.py
DDPG learning
- DDPG agent
ddpg_agent.py - Actor network
ddpg_agent.py - Critic network
ddpg_agent.py - Replay buffer
ddpg_agent.py - OU exploration noise
ddpg_agent.py
Connections 16
- Training loop → Hedging environment: creates and steps
train.py - Training loop → DDPG agent: creates and updates
train.py - Training loop → Replay buffer: stores experience
train.py - Training loop → Hedging environment: gets teacher delta
train.py - Training loop → Agent checkpoints: saves checkpoints
train.py - Hedging environment → GBM simulator: simulates paths
hedging_env.py - Hedging environment → Call option pricing: prices and settles
hedging_env.py - DDPG agent → Actor network: selects actions
ddpg_agent.py - DDPG agent → Critic network: evaluates actions
ddpg_agent.py - DDPG agent → Replay buffer: samples updates
ddpg_agent.py - DDPG agent → OU exploration noise: adds exploration
ddpg_agent.py - Evaluation workflow → Hedging environment: creates and steps
evaluate.py - Evaluation workflow → DDPG agent: creates and queries
evaluate.py - Evaluation workflow → BS hedge baseline: creates and queries
evaluate.py - Evaluation workflow → Agent checkpoints: loads checkpoint
evaluate.py - Evaluation workflow → Performance results: summarizes performance
evaluate.py