Skip to content

Instantly share code, notes, and snippets.

View rylorin's full-sized avatar
🏠
Working from home

Ronan-Yann Lorin rylorin

🏠
Working from home
View GitHub Profile
@NishchalSharma
NishchalSharma / javascript option stuff.js
Last active July 8, 2022 04:50 — forked from aasmith/javascript option stuff.js
black scholes & IV in javascript
/* Returns probability of occuring below and above target price. */
function probability(price, target, days, volatility) {
var p = price;
var q = target;
var t = days / 365;
var v = volatility;
var vt = v*Math.sqrt(t);
var lnpq = Math.log(q/p);
@aasmith
aasmith / javascript option stuff.js
Created August 14, 2010 22:34
black scholes & IV in javascript
/* Returns probability of occuring below and above target price. */
function probability(price, target, days, volatility) {
var p = price;
var q = target;
var t = days / 365;
var v = volatility;
var vt = v*Math.sqrt(t);
var lnpq = Math.log(q/p);