Giter Site home page Giter Site logo

erkandem / calcbsimpvol Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 5.0 7.02 MB

Calculate Black Scholes Implied Volatility - Vectorwise

Home Page: https://erkandem.github.io/calcbsimpvol/

License: MIT License

Python 65.71% Makefile 1.38% Batchfile 2.07% JavaScript 6.22% MATLAB 24.62%
python options-pricing options finance implied-volatility black-scholes

calcbsimpvol's People

Contributors

erkandem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

calcbsimpvol's Issues

Possibility for GPU-backed vector computation?

I was wondering if any performance optimization has been explored on the GPU for this. In particular, I was thinking that Python JAX would be very well suited to this optimization. I'm still familiarizing myself with the source/algorithm used here for the computation, but in addition to providing optional GPU-backed numpy for computing, JAX also provides:

jit(), for speeding up your code
grad(), for taking derivatives
vmap(), for automatic vectorization or batching.

in case any of these would be helpful here. A demo of computing the greeks via differentials on Black-Scholes from grad() is shown here, although I've found that the demo is further improved with jit() on the functions there.

`q` and `cp` broadcasting smells

Hi Erkan,

I have been using your calcbsimpvol and it's awesome! A real life saver.

Now, while trying to use it one maturity at a time (to apply it to options
on futures, where the underlying is a specific futures contract), and
passing a 1-dim vector as 'cp', I get get an error in the broadcasting
operation line 254 linked to the shape of tau. I looked further and
wanted your opinion on whether the code had an an error in the function
"calcbsimpvol" lines 187 and 189? Shouldn't size(q) and size(cp) be
size(q)==1 and size(cp)==1?


and

Best,
Greg

On Tue, Mar 24, 2020 at 5:00 PM Erkan Demiralay [email protected]
wrote:

โ€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOCW7MY2KMRWS2OJOXEOCI3RJENOLANCNFSM4LS7MXXA
.

Originally posted by @gregdesu in #1 (comment)

add python version 3.9 and 3.10 to CI

Is your feature request related to a problem? Please describe.
the CI runs tests for 3.8 max. we could add 3.9+ to the pipeline

Describe the solution you'd like
Add 3.9+ to the CI runs

Describe alternatives you've considered
Using chicken bones as part of a Voodoo ritual.

Additional context

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.