PacktPublishing / Machine-Learning-for-Algorithmic-Trading-Second-Edition_Original

Machine Learning for Algorithmic Trading, Second Edition - published by Packt
MIT License
1.25k stars 484 forks source link

Problems Accessing ITCH data for Part 1 of chapter 2 #11

Closed 1069theclam closed 2 years ago

1069theclam commented 3 years ago

Hello,

I may be missing something trivial, but I cannot seem to get the first part of the Nasdaq ITCH code to work. I set up this block with an external hard drive source: data_path = Path('D:\AlgoTrading') # set to e.g. external harddrive itch_store = str(data_path / 'itch.h5') order_book_store = data_path / 'order_book.h5'

Then the next block of code I did this: FTP_URL = 'ftp://emi.nasdaq.com/ITCH/' SOURCE_FILE = '10302019.NASDAQ_ITCH50.gz'

The next block of code is the def may_be_download(url): function which i left same as the code given

Then this block of code gives me an error: file_name = may_be_download(urljoin(FTP_URL, SOURCE_FILE)) date = file_name.name.split('.')[0]

URLError: <urlopen error ftp error: URLError("ftp error: error_perm('550 The system cannot find the file specified. ',)",)>

Any help with this will be appreciated!

stefan-jansen commented 2 years ago

Please use this repository which is regularly updated and has information that addresses your problem.