stefan-jansen / machine-learning-for-trading

Code for Machine Learning for Algorithmic Trading, 2nd edition.
https://ml4trading.io
12.92k stars 4.12k forks source link

“mamba env create -f installations\windows\ml4t.yml “ I get numerous errors and incomplete installations #195

Closed CarterFitz closed 3 years ago

CarterFitz commented 3 years ago

I get numerous errors and incomplete installations when using the command as follows: “mamba env create -f installations\windows\ml4t.yml “. I am on a Windows 10 machine. So are there any window software prerequisites that I may be missing? And could someone post a fix for or supply an updated “windows/ml4t.yml” file?

errata.docx

stefan-jansen commented 3 years ago

Could you please try using the file at installation/ml4t-base.yml?

CarterFitz commented 3 years ago

I should have been more explicit. It seems that the errors are the result of activating env 'ml4t'. I created it using ml4t-base this time. Some of the problems look like an issue with finding paths to say visual studio, etc. I don't know if this is related but I also ran into problems ingesting zipline data. ml4t-zipline.docx

Thanks for your response. I do want to get into the heart of the book.

stefan-jansen commented 3 years ago

Sorry for the delay. I just ran the following on a Windows 10 laptop successfully on an almost fresh miniconda3-latest install:

conda create -n ml4t python=3.8
mamba update -n ml4t -f ml4t-base.yml
conda activate ml4t
python -c 'import zipline; print(zipline.__version__)'

and got the latest Zipline version 2.1.1.

The only change to ml4t-base.yml is a constraint on pandas<1.3 to address a current Zipline conflict (attached, change extension to .yml ml4t-base.txt.

CarterFitz commented 3 years ago

Stefan-Jansen/Machine-Learning-For-Trading, Thanks for your reply on the installation of the environment. I already was able to complete the installation by constraining pandas to 1.5, I believe. However, I do have another issue and I have not opened it on Github. My problem pertains to the Nasdaq Metadata script in Chapter Four. You note in the notebook that the code referencing the API does not work anymore and you say to do individual calls. Can you give me the complete code that works around this problem and stores the data in the data frame? At this point, my data set is incomplete because I can't get the correct individual calls concatenated to the data frame. Also, I found issues with the next script that calculates some market cap variables. I am in Chapter Four at this point! Thanks.

On Wed, Sep 8, 2021 at 8:37 PM Stefan Jansen @.***> wrote:

Sorry for the delay. I just ran the following on a Windows 10 laptop successfully on an almost fresh miniconda3-latest install:

conda create -n ml4t python=3.8 mamba update -n ml4t -f ml4t-base.yml conda activate ml4t python -c 'import zipline; print(zipline.version)'

and got the latest Zipline version 2.1.1.

The only change to ml4t-base.yml is a constraint on pandas<1.3 to address a current Zipline conflict (attached, change extension to .yml ml4t-base.txt https://github.com/stefan-jansen/machine-learning-for-trading/files/7132487/ml4t-base.txt .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stefan-jansen/machine-learning-for-trading/issues/195#issuecomment-915667400, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK2VKS5VLVAXOQ654RNL3FDUA76U3ANCNFSM5CTTUMJA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

CarterFitz commented 3 years ago

Stefan-Jansen/Machine-Learning-For-Trading, I miss spoke before. I used pandas 1.1.5. Carter

On Thu, Sep 9, 2021 at 9:48 AM Carter Fitzpatrick < @.***> wrote:

Stefan-Jansen/Machine-Learning-For-Trading, Thanks for your reply on the installation of the environment. I already was able to complete the installation by constraining pandas to 1.5, I believe. However, I do have another issue and I have not opened it on Github. My problem pertains to the Nasdaq Metadata script in Chapter Four. You note in the notebook that the code referencing the API does not work anymore and you say to do individual calls. Can you give me the complete code that works around this problem and stores the data in the data frame? At this point, my data set is incomplete because I can't get the correct individual calls concatenated to the data frame. Also, I found issues with the next script that calculates some market cap variables. I am in Chapter Four at this point! Thanks.

On Wed, Sep 8, 2021 at 8:37 PM Stefan Jansen @.***> wrote:

Sorry for the delay. I just ran the following on a Windows 10 laptop successfully on an almost fresh miniconda3-latest install:

conda create -n ml4t python=3.8 mamba update -n ml4t -f ml4t-base.yml conda activate ml4t python -c 'import zipline; print(zipline.version)'

and got the latest Zipline version 2.1.1.

The only change to ml4t-base.yml is a constraint on pandas<1.3 to address a current Zipline conflict (attached, change extension to .yml ml4t-base.txt https://github.com/stefan-jansen/machine-learning-for-trading/files/7132487/ml4t-base.txt .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stefan-jansen/machine-learning-for-trading/issues/195#issuecomment-915667400, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK2VKS5VLVAXOQ654RNL3FDUA76U3ANCNFSM5CTTUMJA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

stefan-jansen commented 3 years ago

Environment files and instructions updated.

There is no code - the NASDAQ downloads are manual, unfortunately they are blocking programmatic. Just navigate to the links as described and hit the download button which will give you a csv file. Then just do pd.read_csv and store.