Last active
April 15, 2020 19:43
-
-
Save jonathanpeterwu/8685a20aac8da3c614ba81954a6ba484 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let opt = document.getElementsByClassName('grid-5') | |
const delta = parseFloat(opt[1].children[0].children[2].textContent) | |
const gamma = parseFloat(opt[1].children[1].children[2].textContent) | |
const theta = parseFloat(opt[1].children[2].children[2].textContent) | |
const vega = parseFloat(opt[1].children[3].children[2].textContent) | |
const rho = parseFloat(opt[1].children[4].children[2].textContent) | |
let price = parseFloat(document.getElementsByClassName('up')[0].children[0].children[0].textContent.replace( /[^0-9]/, '' )) | |
alert(`Current Price $${price}`) | |
alert(`Delta: ${delta * 100 * 100}`) | |
alert(`Gamma: ${gamma * price * 100}`) | |
alert(`Theta: ${theta * price * 100}`) | |
alert(`Vega: ${vega * price * 100}`) | |
alert(`Rho: ${rho * price * 100}`) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WIP RH - greek conversion through the console. Warning this may be brittle due to element design changes on the website