Giter Site home page Giter Site logo

orientalperil / options-strategy-visualizer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shadiakiki1986/options-strategy-visualizer

0.0 1.0 0.0 376 KB

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

License: Do What The F*ck You Want To Public License

Shell 9.29% JavaScript 90.71%

options-strategy-visualizer's Introduction

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

options-strategy-visualizer's People

Contributors

shadiakiki1986 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.