Hello,
I am trying to print SPX prices after 3:30pm. Somehow history object is showing SPX prices stop at 3:00pm. what is the reason?
QUANTCONNECT COMMUNITY
Hello,
I am trying to print SPX prices after 3:30pm. Somehow history object is showing SPX prices stop at 3:00pm. what is the reason?
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.
Mia Alissi
The revised code addresses potential issues with 'Gv's original setup to ensure SPX prices are checked and printed after 3:30 PM. Here's what it does:
Extended Market Hours: The algorithm subscribes to the SPX index with extended market hours enabled, allowing access to data beyond regular trading hours.
History Warming: Retrieves history to ensure initial data is available using a basic warming procedure.
Data Processing: The
OnData
method remains available for any additional processing, though currently, it does not filter or truncate any dataset.Market Hours Setting: The algorithm is scheduled to run a method specifically set for after 3:30 PM as per New York time.
Final Print Logic: Implements a function,
print_spx_price
, scheduled to check and print the SPX price after 3:30 PM, addressing any potential logic error in time handling.The focus is on ensuring data is processed correctly with extended market hours and ensures proper scheduling and data handling within these times. You can integrate this approach into the main file your code references, ensuring your data includes the desired time frames.
Sources: Extended Market Trading Regression Algorithm, Data Preparation - QuantConnect.com, Exploiting Term Structure Of Vix Futures, Key Concepts - QuantConnect.com, Futures Extended Market Hours Regression Algorithm
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.
Gv
I think problem is SPX MarketHours seems to be based on 8:30 to 15:15 Chicago time. How can I convert this to Regular Trading hours based on NewYork time?
Gv
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!