This repository has been archived by the owner on Sep 26, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simulation tests: kurtosis & skewness
- Loading branch information
1 parent
bd91437
commit c74c4fa
Showing
8 changed files
with
188 additions
and
231 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 |
---|---|---|
|
@@ -148,4 +148,7 @@ www | |
/assets/ | ||
|
||
# cached data | ||
/db/ | ||
/db/ | ||
|
||
# NumPy objects | ||
*.npy |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 @@ | ||
import uuid as _uuid | ||
|
||
|
||
def uuid(): | ||
return _uuid.uuid4().hex |
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 |
---|---|---|
|
@@ -13,4 +13,5 @@ rise | |
flask | ||
h5py==2.8.0rc1 | ||
pydot | ||
bs4 | ||
bs4 | ||
pyyaml |
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,28 @@ | ||
import qtrader | ||
|
||
import os | ||
|
||
import pandas as pd | ||
|
||
# fetch data | ||
sp500, prices, returns = qtrader.envs.data_loader.Finance.SP500( | ||
return_prices_returns=True) | ||
# make if not there 'db' folder | ||
if not os.path.exists('db'): | ||
os.makedirs('db') | ||
# store data | ||
sp500.to_csv('db/sp500.csv') | ||
prices.to_csv('db/prices.csv') | ||
returns.to_csv('db/returns.csv') | ||
|
||
# remove from score | ||
del sp500 | ||
del prices | ||
del returns | ||
|
||
# read data | ||
sp500 = pd.read_csv('db/sp500.csv', index_col=0, header=0) | ||
prices = qtrader.envs.data_loader.Finance.Prices( | ||
sp500.index.tolist(), csv='db/prices.csv') | ||
returns = qtrader.envs.data_loader.Finance.Returns( | ||
sp500.index.tolist(), csv='db/returns.csv') |