mirror of
https://github.com/webclinic017/drift.git
synced 2026-07-28 19:27:47 +00:00
c9f8ed1304
* feat(Data): added script to download data from binance * feat(Data): saving unified parquet file/loading * fix(Config): tweak the cusum filter's threshold * fix(Dependencies): added binance_historical_data
61 lines
1.2 KiB
Python
61 lines
1.2 KiB
Python
from .types import Path, FileName, DataSource, DataCollection
|
|
from utils.helpers import flatten
|
|
|
|
|
|
def transform_to_data_collection(path: str, file_names: list[str]) -> DataCollection:
|
|
return list(zip([path] * len(file_names), file_names))
|
|
|
|
|
|
__daily_etf = ["GLD", "IEF", "QQQ", "SPY", "TLT"]
|
|
|
|
__5min_crypto = [
|
|
"TRXUSDT",
|
|
"XRPUSDT",
|
|
"ADAUSDT",
|
|
"SOLUSDT",
|
|
"AVAXUSDT",
|
|
"DOTUSDT",
|
|
"ETHUSDT",
|
|
"LTCUSDT",
|
|
"BNBUSDT",
|
|
"BTCUSDT",
|
|
"ETCUSDT",
|
|
]
|
|
|
|
__daily_glassnode = [
|
|
"rhodl_ratio",
|
|
# 'cvdd',
|
|
"nvt_ratio",
|
|
"nvt_signal",
|
|
"velocity",
|
|
"supply_adjusted_cdd",
|
|
"binary_cdd",
|
|
"supply_adjusted_dormancy",
|
|
"puell_multiple",
|
|
"asopr",
|
|
"reserve_risk",
|
|
"sopr",
|
|
"cdd",
|
|
"asol",
|
|
"msol",
|
|
"dormancy",
|
|
"liveliness",
|
|
"relative_unrealized_profit",
|
|
"relative_unrealized_loss",
|
|
"nupl",
|
|
"sth_nupl",
|
|
"lth_nupl",
|
|
"ssr",
|
|
"bvin",
|
|
# 'hash_rate'
|
|
]
|
|
|
|
|
|
data_collections = dict(
|
|
daily_etf=transform_to_data_collection("data/daily_etf", __daily_etf),
|
|
fivemin_crypto=transform_to_data_collection("data/5min_crypto", __5min_crypto),
|
|
daily_glassnode=transform_to_data_collection(
|
|
"data/daily_glassnode", __daily_glassnode
|
|
),
|
|
)
|