Metadata-Version: 2.4
Name: lets_be_rational
Version: 1.1.2
Summary: Pure python implementation of Peter Jaeckel's LetsBeRational.
License: MIT
Author: vollib
Author-email: vollib@gammoncap.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: cody-special (>=1.0.0,<2.0.0)
Requires-Dist: numpy (>=1.20)
Requires-Dist: piecewise-rational (>=1.0.0,<2.0.0)
Project-URL: Homepage, http://jaeckel.org
Project-URL: Repository, https://github.com/vollib/py_lets_be_rational
Description-Content-Type: text/markdown

# Overview

`lets_be_rational` is the canonical package for Peter Jaeckel's LetsBeRational algorithm.
It provides a pure Python implementation and keeps the historical `py_lets_be_rational`
import path available for compatibility.


## Execution Speed
`lets_be_rational` is orders of magnitude faster than traditional implied volatility
calculation libraries, thanks to the algorithms developed by Peter Jaeckel.

## Numba Dependency
Numba is an optional dependency. Because Numba installation can be tricky and OS-dependent, 
we decided to leave it up to each user to decide how and whether to install Numba. If Numba is present, execution speed 
will be faster. If not, the code will still run -- just slower.


## Installing numba

`lets_be_rational` optionally depends on `numba` which in turn depends on `llvm-lite`. `llvm-lite` wants LLVM 3.9 
being installed. On Mac OSX, use the latest version of HomeBrew to install `numba`'s dependencies as shown below:

```
brew install llvm@3.9
LLVM_CONFIG=/usr/local/opt/llvm@3.9/bin/llvm-config pip install llvmlite==0.16.0
pip install numba==0.31.0
```

For other operating systems, please refer to the `llvm-lite` and `numba` documentation.

## Development

Fork our repository, and make the changes on your local copy:

```
git clone git@github.com/your_username/py_lets_be_rational
cd py_lets_be_rational
pip install -e .
pip install -r dev-requirements.txt
```

When you are done, push the changes, and create a pull request on your repo.


## About "Let's be Rational"

["Let's Be Rational"](http://www.pjaeckel.webspace.virginmedia.com/LetsBeRational.pdf>) is a paper by [Peter Jäckel](http://jaeckel.org) showing *"how Black's volatility can be implied from option prices with as little as two iterations to maximum attainable precision on standard (64 bit floating point) hardware for all possible inputs."*

The paper is accompanied by the full C source code, which resides at [www.jaeckel.org/LetsBeRational.7z](www.jaeckel.org/LetsBeRational.7z).

```
    Copyright © 2013-2014 Peter Jäckel.

    Permission to use, copy, modify, and distribute this software is freely granted,
    provided that this notice is preserved.

    WARRANTY DISCLAIMER
    The Software is provided "as is" without warranty of any kind, either express or implied,
    including without limitation any implied warranties of condition, uninterrupted use,
    merchantability, fitness for a particular purpose, or non-infringement.
```

