Skip to main content

Get the most beautiful Payoff Chart using a single simple function

Project description

Get the most beautiful Payoff Chart using a single simple function

Installation

  • Make sure you have Python installed in your system.
  • Run Following command in the CMD.
 pip install payoffgraph-juttu

Usage

Import get_payoff

from payoffgraph_juttu import get_payoff

The only function you need to get the payoff graph

get_payoff(positions_list,x1,x2)

To run the file use this command

streamlit run my_file.py

This is the only function you need to plot the graph

Parameters - positions_list, x1, x2

1. positions_list

position1=[strike,option_type,transaction_type,option_premium,quantity]

position2=[strike,option_type,transaction_type,option_premium,quantity]

position3=[strike,option_type,transaction_type,option_premium,quantity]

positions_list=[position1,position2,position3]

position_list is the list of all positions

Parameters

strike : int, float
Option Strike 

option_type : in the form {"CE","PE"}

transaction_type : in the form {"B","S"}
B: Buy 
S: Sell

option_premium : int, float
Option price

quantity : int
Quantity
Eg: (Nifty : 1Lot = 50 quantity, BankNifty: 1Lot = 25 quantity )

2. x1, x2

  x1, x2 are the start and end points on the x-axis. (Option strike range)

  For eg: If you consider Nifty you can use [x1,x2] = [spotprice-3000,spotprice+3000]

png

Here the graph starts from 14700 and ends at 20700 on the x-axis.

COMPLETE EXAMPLE

position1=[15600.00,"CE","S",2210.2,100]
position2=[15600,"PE","S",5,50]
position3=[15200,"CE","B",2573,50]

positions_list=[position1,position2,position3]

x1= 14700
x2=27000

get_payoff(positions_list,x1,x2)

Run using this command

streamlit run my_file.py

png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

payoffgraph_juttu-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

payoffgraph_juttu-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file payoffgraph_juttu-0.1.0.tar.gz.

File metadata

  • Download URL: payoffgraph_juttu-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for payoffgraph_juttu-0.1.0.tar.gz
Algorithm Hash digest
SHA256 089cbb0439a67c5a63b0c7fc66806dcbe304528f1829b37a76bb59160b90d3f0
MD5 cd4fc2f6664e75b71a2a709c20b50043
BLAKE2b-256 e3e67b7680586540f54c8c03fc756545698ae4d609aaef381a9c576b10d3632c

See more details on using hashes here.

File details

Details for the file payoffgraph_juttu-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for payoffgraph_juttu-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cd4733b260a92e075af621df7580a4c987e3ce7000fd7fc93dc86883ef8e3f2
MD5 9f648a4fb6a041abf8e8b9247377a6c8
BLAKE2b-256 ff0d20a811e18bc2b0f85f846fa98f1289b4249d67a28943558de71dcedff999

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page