Giter Site home page Giter Site logo

Comments (1)

alexandercommon avatar alexandercommon commented on August 24, 2024

What finally worked for me, as of April 2024, was to install both py_vollib AND py_lets_be_rational from github rather than PyPI.

When they said it was fixed in Github in issue 11, I'm pretty sure they meant it was fixed in py_lets_be_rational. Even if you install py_vollib from github, pip will still grab py_lets_be_rational from PyPI, so you have to install that from Github first.

pip install git+https://github.com/vollib/py_lets_be_rational.git
pip install git+https://github.com/vollib/py_vollib.git

>>> from py_vollib.black import black
>>> flag = 'c'  # 'c' for call, 'p' for put
>>> S = 95  # price of the underlying
>>> K = 100  # strike
>>> t = .2  # annualized time to expiration
>>> r = .2  # interest-free rate
>>> sigma = .2  # implied volatility
>>> black(flag, S, K, t, r, sigma)
1.4739294832475103

from py_vollib.

Related Issues (20)

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.