In [1]:
from clr import AddReference
AddReference("System")
AddReference("QuantConnect.Common")
AddReference("QuantConnect.Jupyter")
AddReference("QuantConnect.Indicators")
from System import *
from QuantConnect import *
from QuantConnect.Data.Market import TradeBar, QuoteBar
from QuantConnect.Jupyter import *
from QuantConnect.Indicators import *
from datetime import datetime, timedelta
import matplotlib.pyplot as plt
import pandas as pd
In [3]:
qb = QuantBook()
sym = qb.AddEquity('TWX') # Ticker symbol changed from AOL to TWX on 10/16/2003
data = qb.History(qb.Securities.Keys, datetime(1999, 1, 1), datetime(2000, 1, 1) , Resolution.Daily)
data.head()
Out[3]:
close high low open volume
symbol time
TWX 1999-01-05 57.315591 60.585272 56.500094 60.008270 19357200.0
1999-01-06 56.450087 57.915674 56.138506 56.546254 13408300.0
1999-01-07 57.315591 58.373429 57.146337 58.277262 14886800.0
1999-01-08 56.738588 57.965680 55.776917 55.776917 10970300.0
1999-01-09 55.776917 58.446516 55.538423 58.084928 12213300.0