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)
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]
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file payoffgraph_juttu-0.0.8.tar.gz.
File metadata
- Download URL: payoffgraph_juttu-0.0.8.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50ca190e3d4a2434c5f4434ef88895d592bd8ebfb98572d6ba8d8f627d5ea2de
|
|
| MD5 |
2552588adec7590ceaf6a3eed3fe5ace
|
|
| BLAKE2b-256 |
eb8869c8bff4fcdd7c52744bddfe43873d37c62a43d880ad901e00fda6e4bec7
|
File details
Details for the file payoffgraph_juttu-0.0.8-py3-none-any.whl.
File metadata
- Download URL: payoffgraph_juttu-0.0.8-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
894dabf1755b13e9c599712be42f534a2ff795621a9f3c2858abcb6fcde1f449
|
|
| MD5 |
0bd84874f8b06d4870ab6019d042a31b
|
|
| BLAKE2b-256 |
f43b28fc7377d6e57b5ab954fe53482099c7c32e61b99c0d9342164b4bfb213f
|