mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 15:37:44 +00:00
fix: generate.py nutzt rdagent4qlib env für Qlib-Datenzugriff
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Qlib läuft in rdagent4qlib environment
|
||||
result = subprocess.run(
|
||||
["/home/nico/miniconda3/envs/rdagent4qlib/bin/python3", "-c", """
|
||||
import qlib
|
||||
from qlib.data import D
|
||||
qlib.init(provider_uri="~/.qlib/qlib_data/eurusd_data")
|
||||
fields = ["$open", "$close", "$high", "$low", "$volume"]
|
||||
data = (D.features(["EURUSD"], fields, start_time="2022-03-14", end_time="2026-03-20", freq="15min")
|
||||
.swaplevel().sort_index())
|
||||
data.to_hdf("./daily_pv_all.h5", key="data")
|
||||
data_debug = (D.features(["EURUSD"], fields, start_time="2024-01-01", end_time="2026-03-20", freq="15min")
|
||||
.swaplevel().sort_index())
|
||||
data_debug.to_hdf("./daily_pv_debug.h5", key="data")
|
||||
print(f"Done: {data.shape[0]} rows")
|
||||
"""],
|
||||
capture_output=False
|
||||
)
|
||||
Reference in New Issue
Block a user