-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
54 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.csv | ||
.dolt/ | ||
.sqlhistory | ||
*.log | ||
*.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM continuumio/anaconda3 | ||
|
||
RUN wget https://github.com/dolthub/dolt/releases/download/v0.40.19/dolt-linux-amd64.tar.gz -O /tmp/dolt-linux-amd64.tar.gz && cd /tmp && tar -zxvf /tmp/dolt-linux-amd64.tar.gz && cp /tmp/dolt-linux-amd64/bin/dolt /usr/bin/ && rm -rf /tmp/* | ||
RUN apt update && apt install -y git psmisc zip gcc g++ | ||
RUN cd / && dolt clone chenditc/investment_data | ||
RUN cd /investment_data && git init && git pull https://github.com/chenditc/investment_data.git | ||
RUN pip install numpy && pip install --upgrade cython \ | ||
&& cd / && git clone https://github.com/microsoft/qlib.git \ | ||
&& cd /qlib/ && pip install . && pip install -r scripts/data_collector/yahoo/requirements.txt | ||
COPY ./requirements.txt /tmp/requirements.txt | ||
RUN pip install -r /tmp/requirements.txt | ||
COPY . /app | ||
WORKDIR /investment_data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
cd /investment_data/ | ||
dolt pull chenditc/investment_data | ||
|
||
dolt sql-server & | ||
mkdir ./qlib/qlib_source | ||
python3 ./qlib/dump_all_to_qlib_source.py | ||
killall dolt | ||
|
||
python3 /qlib/scripts/data_collector/yahoo/collector.py normalize_data --source_dir ./qlib/qlib_source/ --normalize_dir ./qlib_normalize --max_workers=16 --date_field_name="tradedate" | ||
python3 /qlib/scripts/dump_bin.py dump_all --csv_path ./qlib_normalize/ --qlib_dir ./qlib_bin --date_field_name=tradedate --exclude_fields=tradedate,symbol | ||
|
||
dolt sql-server & | ||
mkdir ./qlib/qlib_index/ | ||
python3 ./qlib/dump_index_weight.py | ||
killall dolt | ||
|
||
cp qlib/qlib_index/csi* ./qlib_bin/instruments/ | ||
|
||
tar -czvf ./qlib_bin.tar.gz ./qlib_bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
tushare | ||
sqlalchemy | ||
pymysql | ||
fire |