QuantConnect / Lean

Lean Algorithmic Trading Engine by QuantConnect (Python, C#)
https://lean.io
Apache License 2.0
8.94k stars 3.13k forks source link

Missing feature handle stock halts and suspensions #5275

Open Jay-Jay-D opened 3 years ago

Jay-Jay-D commented 3 years ago

Expected Behavior

Lean should handle cases of stock suspensions and halts correctly.

There are cases where the SEC intervenes in the market to halt trading activity due to serious concerns about a company's assets, operations, or other financial information. e.g. Luckin Coffee Inc on 2020-04-07

In other cases, due to other reasons, The security halts the trading on a given date. e.g. Biogen on 2020-11-06

Actual Behavior

Lean complains there is missing data when, in reality, there was no data at all for that period.

Potential Solution

Implement the suspension in the map files.

Reproducing the Problem

System Information

Checklist

gsalaz98 commented 3 years ago

It's worth noting that some Futures and futures options undergo trading halts sometimes, similar to equities, but usually because price limits were hit for the day. These halts are usually temporary, but might still appear as missing data/stale prices and allow new orders to be (falsely) filled in that time period.

If we want to implement support for trading halts, we should take into account other markets like futures/FOPs into account as well and maybe design a generic solution for the asset classes affected I think.

itsbalamurali commented 3 years ago

We call these as Circuit Limits in Indian markets. Adding this feature would be a good one.

jaredbroad commented 1 year ago

A data source is available; https://www.nyse.com/trade-halt-historical