A package for graphing profit-loss option diagrams
Project description
Vops
This python project uses data from yahoo finance to graph option profit-loss diagrams.
Note: any examples used here are outdated because the option contracts have expired.
Installing
Installing with pip:
pip install vops
Usage
Simple program graphing a long call option:
from vops import scraping
from vops import graphing
optionObj = scraping.scrapeCallOptions('TSLA')
graphing.graphLongCall(optionObj, 'TSLA201224C00020000')
Graphing both short and long positions on a call option:
optionObj = scraping.scrapeCallOptions('TSLA')
graphing.graphCalls(optionObj, 'TSLA201224C00020000')
Exporting graphs to a png:
graphing.graphCalls(optionObj, 'TSLA201224C00020000', export = True)
Output:
Todo
- Update resource files
- Add axis labels to all graphs
- Create method for graphing long and short put options simultaneously
- Merge call/put options chains
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
vops-0.0.21.tar.gz
(4.4 kB
view hashes)
Built Distribution
vops-0.0.21-py3-none-any.whl
(5.1 kB
view hashes)