Skip to content

Fix Dupire local volatility formula implementation#10

Merged
CameronScarpati merged 1 commit intomainfrom
claude/review-resume-calculations-vTgw8
Mar 13, 2026
Merged

Fix Dupire local volatility formula implementation#10
CameronScarpati merged 1 commit intomainfrom
claude/review-resume-calculations-vTgw8

Conversation

@CameronScarpati
Copy link
Owner

Summary

Corrected the implementation of Dupire's local volatility formula to properly use the Durrleman condition, which is the mathematically correct denominator for the formula.

Key Changes

  • Updated formula documentation: Clarified that the denominator is the Durrleman condition g(k) rather than an inline expression
  • Fixed denominator calculation: Changed from a linear combination to the correct squared term:
    • Old: 1 - k*w'/w + w''/2 - (w')²/4 * (1/w + 1/4)
    • New: (1 - k*w'/(2w))² - (w')²/4 * (1/w + 1/4) + w''/2
  • Improved code clarity: Added explicit documentation of the Durrleman condition formula and reorganized the denominator calculation for better readability

Implementation Details

The key mathematical correction is in the denominator computation:

  • The first term is now squared: (1 - k*w'/(2w))² instead of 1 - k*w'/w
  • The coefficient in the first term changed from w' to w'/(2w)
  • Term ordering was adjusted for clarity while maintaining mathematical equivalence

This ensures the local volatility calculation correctly implements Dupire's 1994 formula with the Durrleman condition.

https://claude.ai/code/session_01ExtzDyMXtMSUSjghYLyy2C

…ition

The denominator was computing 1 - k*w'/w (a linear approximation) instead
of the correct (1 - k*w'/(2w))^2 squared term from the Durrleman condition.
This omitted the k^2*(w')^2/(4*w^2) cross-term, producing incorrect local
volatility values.

https://claude.ai/code/session_01ExtzDyMXtMSUSjghYLyy2C
@CameronScarpati CameronScarpati force-pushed the claude/review-resume-calculations-vTgw8 branch from 9b15010 to 6ebb559 Compare March 13, 2026 06:29
@CameronScarpati CameronScarpati merged commit cb8e4d9 into main Mar 13, 2026
4 checks passed
@CameronScarpati CameronScarpati deleted the claude/review-resume-calculations-vTgw8 branch March 13, 2026 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant