Coder Social home page Coder Social logo

Comments (3)

danielhstahl avatar danielhstahl commented on June 27, 2024

Thanks for bringing up this issue @dgbustos ! I've gone back and forth when considering the API for the implied volatility functions. With the "approximate_vol" function providing a value close to the optimum value I have not ever had a panic. In the tests I randomly simulate parameters; with no panics.

Have you actually experienced a panic when using the implied volatility functions? If so, can you provide the parameters which resulted in the panic?

Thanks!

from black_scholes_rust.

dgbustos avatar dgbustos commented on June 27, 2024

I have 500 examples from a recent file of SPY option quotes. They're all for deep-in-the-money calls. For example

black_scholes::call_iv( 50.275, 274.525, 225.000, 0.0244, 0.156 );
black_scholes::call_iv( 62.02, 274.525, 222.000, 0.0244, 1.823 );

When I encountered this in another library, I think I tracked the reason down to negative time value, and https://math.stackexchange.com/a/2959355 might be informative.

from black_scholes_rust.

danielhstahl avatar danielhstahl commented on June 27, 2024

That makes a lot of sense. I'll update the code (hopefully this weekend) and bump the crates version.

from black_scholes_rust.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.