Backtrader Community

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    Backtrader wrapper indicator exposing GBS/Bj-St 2002 Options Greeks: delta, gamma, theta, vega and rho

    Indicators/Strategies/Analyzers
    1
    4
    1390
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bigdavediode last edited by bigdavediode

      For anyone who wants it, I've adapted a wrapper function to Davis Edwards' fantastic work on options valuations. It allows charting of delta, gamma, theta, vega and rho for American options but can easily be adapted to call American, European, Asian, Spread Options.

      His website is at http://www.understandtrading.com/GBS.html His original GBS.py is a Jupyter notebook, so I've stripped out all the non-Python and created a simple GBS.py file that can be imported and called more generally. His original code is at https://github.com/dedwards25/Python_Option_Pricing

      My code can be found here: https://github.com/bigdavediode/Option-Greeks

      This code comes with no warranties, expressed or implied. Example code only.

      1 Reply Last reply Reply Quote 1
      • B
        bigdavediode last edited by

        A screenshot showing delta:

        0_1515265404008_ffa9ccbc-3a07-4489-ae08-97a3a7600807-image.png file:///home/bigdavediode/Pictures/testdelta.png

        1 Reply Last reply Reply Quote 1
        • B
          bigdavediode last edited by

          A screenshot showing gamma:

          0_1515265450420_245d118f-62bb-4c83-aa92-47bc52181b61-image.png file:///home/bigdavediode/Pictures/testgamma.png

          1 Reply Last reply Reply Quote 1
          • B
            bigdavediode last edited by bigdavediode

            A screenshot showing theta:

            0_1515265502854_15f709b0-5fd7-4a56-8de3-46a3ca85714d-image.png file:///home/bigdavediode/Pictures/testtheta.png

            You get the idea.

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post
            Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors