Coder Social home page Coder Social logo

harjobandeepsingh / quantmodels Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tamilselvanarjun/quantmodels

0.0 0.0 0.0 90 KB

Quantmodels is a Python package that provides implementations of various financial models commonly used in finance and investment analysis.

Home Page: https://pypi.org/project/quantmodels/

Python 100.00%

quantmodels's Introduction

quantmodels

Overview

quantmodels is a Python package that provides implementations of various financial models commonly used in finance and investment analysis.

Installation

You can install the package using pip: pip install quantmodels

Included Financial Models

  1. Binomial Option Pricing Model (BOPM) The Binomial Option Pricing Model is a numerical method used for option pricing. It calculates the option price and call option price based on parameters such as underlying price, strike price, risk-free rate, volatility, time to maturity, and the number of steps in the binomial tree

from quantmodels.opm import binomial_option_pricing

Example usage for Put Option Price

Parameters underlying_price: Current price of the underlying asset.

strike_price: Strike price of the option.

risk_free_rate: Risk-free interest rate.

volatility: Volatility of the underlying asset.

time_to_maturity: Time to maturity of the option.

num_steps: Number of steps in the binomial tree.

call_price = binomial_option_pricing(underlying_price, strike_price, time_to_maturity, risk_free_rate, volatility, periods, 'call')

put_price = binomial_option_pricing(underlying_price, strike_price, time_to_maturity, risk_free_rate, volatility, periods, 'put')

print(f"Call Option Price: {call_price:.2f}")
print(f"Put Option Price: {put_price:.2f}")

quantmodels's People

Contributors

tamilselvanarjun avatar

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.