Skip to main content

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('AMD')

graphing.graphLongCall(optionObj, 'AMD201231C00060000')

Graphing both short and long positions on a call option:

optionObj = scraping.scrapeCallOptions('AMD')

graphing.graphCalls(optionObj, 'AMD201231C00060000')

Exporting graphs to a png:

graphing.graphCalls(optionObj, 'AMD201231C00060000', export = True)

Output:

plot

Todo

  • Add axis labels to all graphs
  • Create method for graphing long and short put options simultaneously
  • Merge call/put options chains
  • Allow option chains from different chains to be scraped

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

vops-0.0.22.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

vops-0.0.22-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

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