ivelin / canswim

Toolkit for CANSLIM practitioners
Apache License 2.0
7 stars 0 forks source link

[BUG]: directory data/data-3rd-party/ missing #58

Open andressakalil opened 1 month ago

andressakalil commented 1 month ago

When trying to run some commands it requires a directory and files that I could not find any documentation of how to create/download them.

Here are some examples:

./canswim.sh modelsearch (...) handle = open( ^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'data/data-3rd-party/all_stocks.csv'

./canswim.sh gatherdata (...) data/data-3rd-party/broad_market.parquet. Error: [Errno 2] No such file or directory: 'data/data-3rd-party/broad_market.parquet' (...) OSError: Cannot save file into a non-existent directory: 'data/data-3rd-party'

After I created the directory and run 'gatherdata' option again, I got:

Could not load data from file: data/data-3rd-party/industry_funds.parquet. Error: [Errno 2] No such file or directory: 'data/data-3rd-party/industry_funds.parquet'

ivelin commented 1 month ago

These are valid questions:

Due to the licensing requirements of the yahoo and fmp APIs used to acquire market data, you would have to fetch the data before running model search, train and forecast.

Grab an FMP API Key and plug it into your local .env. You can use this example env file as a template: https://github.com/ivelin/canswim/blob/main/example.env

Then run canswim.sh gatherdata that will populate the data directory for consequent modelsearch, train and forecast task runs.

Alternatively if you prefer to use a different API provider, feel free to change the source code using the FMP API. I would welcome a pull request making the API provider a configurable option.