Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Why there is no price for July 4th 2017 ?

Today as I do some back testing, I found there is no close price for the date of July 4th 2017. Here is an example for TSLA.

...
    prices = data.history(context.stock, 'price', 20, '1d')  
    print("%s: %.4f" %(context.stock, prices[-1]))  
...

...

2017-07-03 22:30 PRINT Equity(39840 [TSLA]): 367.2860
2017-07-05 22:30 PRINT Equity(39840 [TSLA]): 335.1900
2017-07-06 22:30 PRINT Equity(39840 [TSLA]): 312.4300
2017-07-07 22:30 PRINT Equity(39840 [TSLA]): 314.2600
2017-07-10 22:30 PRINT Equity(39840 [TSLA]): 309.0480
2017-07-11 22:30 PRINT Equity(39840 [TSLA]): 323.4100
2017-07-12 22:30 PRINT Equity(39840 [TSLA]): 329.6000
2017-07-13 22:30 PRINT Equity(39840 [TSLA]): 325.9500
...

I am not if the others have the same problem?

3 responses

Sorry I made a mistake. The July 4th is American Notional Day. Please forget my post.

Do not worry about it. I just get mad every time there is a holiday. I am not making money on holidays! Weekends are bad enough!

You are right. Hope the market will be opened all the year round. :-)