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.0.9.tar.gz (4.2 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.0.9-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: payoffgraph_juttu-0.0.9.tar.gz
  • Upload date:
  • Size: 4.2 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.0.9.tar.gz
Algorithm Hash digest
SHA256 bf81bb8710c7f139979d8d09a17ea58611bb52e3933bf17fcadc695adb613e89
MD5 7884fa38b8f1fda32cf8e6889b19c35f
BLAKE2b-256 fb43520d60bf3584c3085c82c6ac43d465e2d3db9998a1f9d703e290179b1463

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for payoffgraph_juttu-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 57e9b8344b78cbd4f93a94391725f36f0bdd549bc30066ffd91bc7a335b72273
MD5 cd3d6ddecf2ecf24729a2d590b271b5a
BLAKE2b-256 c70f18e78fbaacd03f8d3c0fb3e0d882adbafd75986f25cae57e277a38bc4ed5

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