-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trading hours on Independence Day 2017 and after Thanksgiving Day #641
Comments
From Terminal:
Downloaded Trade CSV File: Backtest Console: best regards |
Might be a data issue? It should not have any *data* after 1pm, so the
OnData shouldn't be called
…On Fri, Dec 2, 2016 at 10:58 AM, michaelsrew ***@***.***> wrote:
From Terminal:
//test
public class BasicTemplateAlgorithm : QCAlgorithm
{
public override void Initialize()
{
SetStartDate(2016, 11, 25);
SetEndDate(2016, 11, 26);
SetCash(25000);
AddSecurity(SecurityType.Equity, "VRX", Resolution.Minute, true, false);
}
public void OnData(TradeBars data)
{
if (!Portfolio.HoldStock)
{
int quantity = (int)Math.Floor(Portfolio.Cash / data["VRX"].Close);
if (Time.Hour > 14) {
Order("VRX", quantity);
Debug("Purchased SPY on " + Time.ToShortDateString() + " " + Time.ToShortTimeString());
}
}
}
}
Downloaded Trade CSV File:
Time,Symbol,Price,Quantity,Type,Status,Value,Tag
2016-11-25T20:00:00Z,VRX,17.03,1467,Market,3,24983.01,
Backtest Console:
Successfully sent backtest request for 'Muscular Black Cormorant',
(Compile Id: 0760a76d23f295a7b1ba092dee6af187)
166 | 10:56:38:
Backtest ID: 98f4ea612126666675c34def8d46c5a6 successfully sent to cloud.
167 | 10:56:47:
Launching analysis for 98f4ea612126666675c34def8d46c5a6 with LEAN Engine
v2.2.0.2.893
168 | 10:56:47:
*Purchased SPY on 11/25/2016 15:00*
169 | 10:56:47:
Algorithm Id:(98f4ea612126666675c34def8d46c5a6) completed in 0.25 seconds
at 2k data points per second. Processing total of 394 data points.
best regards
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#641 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACI6mY1OuAgyo78QPGeYKl5vRaKorhfsks5rEEAXgaJpZM4K87DD>
.
--
Jared Broad
www.quantconnect.com
Phone-USA: +1 917 327 0556
*Democratizing Finance, Empowering Individuals*
Facebook <http://www.facebook.com/QuantConnect> | Twitter
<https://twitter.com/#!/QuantConnect> | LinkedIn
<http://www.linkedin.com/company/quantconnect> | Skype: jaredbroad
|
Hmm it works with almost every stock.... SPY, GOOG,..... |
Or, |
Yes that'll be it -- the FF is creating the bars and the market hours don't support half days yet. Thank you for reporting, we'll try and submit a fix soon. |
Fixed in #656 |
I think QuantConnect.Lean trades during after hours like it would be normal trading hours on the 25.11.
The after hours startet on the 25.11 at 13:00 till 17:00 i think.
https://www.nyse.com/markets/hours-calendars
check also Christmas Eve Observed on the 23.11 maybe it is also till 13:00.
best regards
The text was updated successfully, but these errors were encountered: