Skip to content

Instantly share code, notes, and snippets.

Score truth ID
0 0.9940420985221864 0 F692
1 0.9929776787757874 1 F275
2 0.9928529858589172 1 F309
3 0.9915838241577148 0 F17
4 0.988935887813568 0 F583
5 0.9860433340072632 0 F532
6 0.9860426783561708 0 F496
7 0.9856891632080078 0 F276
8 0.9855818152427672 0 F77
Score truth ID
0 0.9899050474166871 1 F309
1 0.9893142580986024 0 F692
2 0.987413740158081 0 F17
3 0.9797465006510416 0 F77
4 0.9688855171203613 0 F711
5 0.9688849210739136 0 F585
6 0.966801553964615 0 F781
7 0.9622493624687195 0 F363
8 0.9610251784324646 0 F771
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@GerardBCN
GerardBCN / cognitive_bias_cryptocurrency_listing.ipynb
Created May 29, 2019 20:22
Cognitive Bias on Cryptocurrency listing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@GerardBCN
GerardBCN / query_cryptodatum.sh
Created May 16, 2019 20:39
Sample to query cryptodatum.io using curl
curl --header "Authorization: API_KEY" "https://cryptodatum.io/api/v1/candles/?symbol=bitfinex:btcusd&type=tick&step=100&limit=10&start=1364923374000000000&end=1364948040000000000&format=csv" > myquery.csv
@GerardBCN
GerardBCN / cryptodatum_dollar_bar_sizes.md
Created April 27, 2019 10:58
CryptoDatum.io dollar bar sizes
t1 t2 t3 t4 t5 t6 t7 t8
BTCUSD 30000 100000 500000 1000000 2000000 9000000 20000000 50000000
DSHUSD 2000 10000 40000 80000 100000 600000 1000000 3000000
EOSUSD 20000 100000 400000 800000 1000000 6000000 20000000 40000000
ETHUSD 30000 100000 400000 900000 1000000 7000000 20000000 40000000
IOTUSD 10000 60000 100000 300000 700000 3000000 9000000 10000000
LTCUSD 2000 10000 30000 70000 100000 600000 1000000 3000000
NEOUSD 9000 40000 100000 200000 500000 2000000 6000000 10000000
OMGUSD 4000 20000 60000 100000 200000 1000000 3000000 6000000
@GerardBCN
GerardBCN / volume_candle_sizes.md
Created April 26, 2019 22:23
CryptoDatum.io volume bar sizes
t1 t2 t3 t4 t5 t6 t7
BTCUSD 80 200 500 1000 4000 10000 20000
DSHUSD 40 100 200 500 2000 6000 10000
EOSUSD 20000 70000 100000 200000 1000000 3000000 7000000
ETHBTC 200 600 1000 2000 10000 30000 60000
ETHUSD 600 1000 3000 7000 30000 90000 100000
IOTUSD 60000 100000 300000 700000 3000000 9000000 10000000
LTCUSD 400 1000 2000 4000 10000 50000 100000
NEOUSD 1000 3000 6000 10000 50000 100000 300000
@GerardBCN
GerardBCN / volumebar_generator.py
Created April 26, 2019 16:00
Volume bar generator
import numpy as np
# expects a numpy array with trades
# each trade is composed of: [time, price, quantity]
def generate_volumebars(trades, frequency=10):
times = trades[:,0]
prices = trades[:,1]
volumes = trades[:,2]
ans = np.zeros(shape=(len(prices), 6))
candle_counter = 0
@GerardBCN
GerardBCN / dollarbar_generator.py
Created April 26, 2019 15:59
Dollar bar generator
import numpy as np
# expects a numpy array with trades
# each trade is composed of: [time, price, quantity]
def generate_dollarbars(trades, frequency=1000):
times = trades[:,0]
prices = trades[:,1]
volumes = trades[:,2]
ans = np.zeros(shape=(len(prices), 6))
candle_counter = 0
Value Meaning
DB-statistic << 2 positive serial correlation
DB-statistic ~ 2 no first-order correlation
DB-statistic >> 2 negative serial correlation