Files
drift/data_loader/collections.py
T
Mark Aron Szulyovszky 9d47ee942d feat(Project): use SKLearn models directly, removed custom ensembling, use 5 minute data, batch inference, numba cusum filter (#192)
* feat(Project): use 5 minute data, running training in parallel, sped up cusum filter by 10x with numba

* fix(WalkForward): inference mini-batch parallelization

* fix(WalkForward): don't use the parallel version of any of the functions

* feat(CI): download the data required

* fix(Project): 5min_crypto folder added

* fix(Evaluate): make sure we have numerical stability in returns

* feat(Models): use SKLearn models directly to enable composability

* feat(Inference): batched inference now working, added forecasting_horizon

* fix(Inference): works again

* fix(Inference)

* chore(Models): remove unused Ensemble model

* fix(Labeller): don't just forward shift returns, also take the sum of the data happened until then

* Update test.yml
2022-02-17 16:36:35 +01:00

52 lines
1.6 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"]
__daily_crypto = ["ADA_USD", "BCH_USD", "BNB_USD", "BTC_USD", "DOT_USD", "ETC_USD", "ETH_USD", "FIL_USD", "LTC_USD", "SOL_USD", "THETA_USD", "TRX_USD", "UNI_USD", "XLM_USD", "XRP_USD", "XTZ_USD"]
__daily_crypto_lightweight = ["ADA_USD", "BCH_USD"]
__5min_crypto = ["BTC_USD", "DASH_USD", "ETC_USD", "ETH_USD", "LTC_USD", "TRX_USD", "XLM_USD", "XMR_USD"]
__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_only_btc = transform_to_data_collection("data/daily_crypto", ['BTC_USD']),
daily_crypto = transform_to_data_collection("data/daily_crypto", __daily_crypto),
daily_crypto_lightweight = transform_to_data_collection("data/daily_crypto", __daily_crypto_lightweight),
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),
)