chrism2671 / PyTrendFollow

PyTrendFollow - systematic futures trading using trend following
MIT License
362 stars 70 forks source link

Change config/settings.py to to store downloaded data from the data source into data folder in the project directory instead of using home directory #8

Closed ramkumarkoppu closed 6 years ago

pjmcdermott commented 6 years ago

@ramkumarkoppu I think this hasn't worked as intended. If I am in directory PyTrendFollow and run ./download.py quandl --concurrent the data end up in the ../prices_data directory.

Instead of

hdf_path = os.path.join("../", "price_data/quotes")

which puts price_data in the parent directory of where download is run, I think you need:

hdf_path = os.path.join(os.path.abspath(__file__), "../price_data/quotes")

which puts price_data as a subdirectory of PyTrendFollow.

JoaoAparicio commented 6 years ago

Just a reminder that this kind of hardcoding of filepaths involving forward slashes will probably break on windows.