Skip to content
This repository has been archived by the owner on Mar 6, 2019. It is now read-only.

Small tool that plots the total payoff of a strategy combining financial call/put options and/or the underlying

License

Notifications You must be signed in to change notification settings

shadiakiki1986/options-strategy-visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

options-strategy-visualizer

  • Small tool that plots the total payoff of a strategy combining financial call/put options and/or the underlying
  • Build Status

Motivation

The reason I wrote this tool is that after some research for an online tool that visualizes option strategies, I didn't find anything useful.

Its calculations are based on CBOE's rulebook (p 18)

Here is a list of pages that I checked out before I decided to do this myself

Usage

Logo

I chose the letter '''V''' to be the logo for this tool.

It represents

License

Licensed under WTFPL

Developer notes

Where are the files?

There are 2 branches in this repository. master contains the javascript responsible for all the core calculations. gh-pages is the html and javascript of the SPA interface. The index.html in gh-pages references the main javscript file in master. If any of the core calculations are updated in the master branch, following the updating common js code... section below to update the published app at http://shadiakiki1986.github.io/options-strategy-visualizer/. If any of the files in the gh-pages branch are updated, no special steps are required to update the published app.

Testing

  • Testing of php API: phpunit tests
  • Testing of nodejs API: npm install --dev && npm test

gh-pages

Created github pages branch

git checkout --orphan gh-pages
git rm * -rf
echo "whatever" > index.html && git add index.html
git commit -a -m "first gh-pages commit"
git push
git branch # will now show the gh-pages branch and the master branch
git checkout master # to switch
git checkout gh-pages # to switch

Reference

initial php API

  • The initial php API was discontinued in favor of nodejs api that I can use with AWS lambda (versus the need to have an EC2 instance running for the php api)
  • check discontinued-php branch for files

updating common js code between nodejs and gh-pages browser client

The gh-pages javascript files use common code with the nodejs files

  • for this I use browserify
  • in branch master: npm run build (source)
  • switch to gh-pages: git checkout gh-pages
  • git status will show that the js/OptStratVis.js has been modified
  • git commit -a -m "updating optstratvis.js library file"
  • git push
  • more notes here later

first checkout of remote branch locally

git checkout -b gh-pages origin/gh-pages

Google analytics

I just added my personal email's google analytics tracking ID of my github pages to this SPA

About

Small tool that plots the total payoff of a strategy combining financial call/put options and/or the underlying

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published