I'm receiving the following error when running lean locally without a network connection. Why is a network connection needed when running locally?
$lean backtest --data-provider Local ff1
HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url:
/QuantConnect/Lean/master/Data/symbol-properties/symbol-properties-database.csv (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at
0x7f56551054c0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
Mia Alissi
The error message you're seeing indicates that the LEAN engine is trying to download the
symbol-properties-database.csv
file from the QuantConnect GitHub repository. This file contains metadata about the symbols that LEAN uses.When running LEAN locally, you need an internet connection for certain operations such as downloading updates, collaborating with team members, and syncing your projects with QuantConnect Cloud. However, Trading Firm and Institution organizations can run local backtests and research notebooks without an internet connection for up to 24 hours (source).
To avoid this error, you should ensure that the
symbol-properties-database.csv
file is available locally in your data directory before you disconnect from the internet. If you're using the QuantConnect Local Platform, you'll need to install Docker, as LEAN executes in a Docker container which contains a minimal Linux-based operating system, the LEAN engine, and all the packages available to you on QuantConnect.com (source).If you're using the LEAN CLI, you'll need to have your own local data. LEAN supports importing custom data into your algorithm, and you can access data from local files in your algorithm when running the LEAN engine locally (source).
If you continue to experience issues, please consider reaching out to the QuantConnect support team at support@quantconnect.com for further assistance.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Alpha23
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!