Skip to content

Instantly share code, notes, and snippets.

@jonathak
jonathak / core.clj
Last active September 28, 2019 21:10
Extract Financial Data from iexcloud.io
(ns iex.core
(:require [clj-http.client :as client])
(:gen-class))
(defn try-wrap [f]
(fn [x y]
(try (f x y)
(catch Exception e "http-error"))))
(defn iex-stock-api
@jonathak
jonathak / european.exs
Last active May 7, 2020 13:47
Finance Stock Option Valuation using Binomial Method in Pure Elixir
defmodule Options.European do
@moduledoc """
Functions for evaluating European call options.
"""
######################
### default values ###
######################
# volatility