I was reviewing some of the edge cases that might crop up and bite me, and this one in particular I couldn't figure out:
In the world of QuantShare, how does it deal with market circuit breakers?
Is there a function or a feed that I can use to detect with certainty that a circuit breaker has been triggered for an individual security of for a broad index like the S&P 500? I'm certainly not confident in my own ability to code something that guesses that a security has been frozen (based on time of day and percentage)?
And the same for when a security or an index has been unfrozen again?
During a breaker, do our feeds continue to receive ticks (at the same price), or are ticks suspended while the circuit breaker is in place?
I appreciate your help with these questions and anything else you think may be useful.
As you may know, QuantShare does not provide data. You may need to contact of the data provider we support for this.
However, in our plugins, we do not have any direct way to detect whether a circuit breaker was triggered or not.
I was browsing some of the parameters of the IEX Exchange API, and I saw that the Trading Status function might be something worth exposing to the user. Halt reasons include T1 (Halt News Pending), IPO1 and IPO2 (new issues not yet trading), MCB1/MCB2/MCB2 (market-wide circuit-breaker levels 1 through 3 breached). (I believe I see another query which reports if trading in a security was broken during the day.) I assume that some other feeds (certainly not all, like Yahoo) might have something similar.
You're in a better position to judge here, but I wanted to pass along this additional information and turn this into an enhancement request, if appropriate.
Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.