I used open library https://pypi.org/project/python-edgar/ for index downloading and prepair. It can be easy instaled in a virtualenv by pip: pip install python-edgar
REQUIREMENTS: python 3.0
pip install pandas
pip install matplotlib
pip install python-edgar
pip install datetime