In [102]:
%matplotlib inline
# Imports
from clr import AddReference
AddReference("System")
AddReference("QuantConnect.Common")
AddReference("QuantConnect.Jupyter")
AddReference("QuantConnect.Indicators")
from System import *
from QuantConnect import *
from QuantConnect.Data.Custom 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
import numpy as np
import scipy.optimize as opt
from scipy.stats import iqr

from datetime import timedelta

# Create an instance
qb = QuantBook()
In [103]:
qb.AddEquity('AMZN', Resolution.Daily)
Out[103]:
<QuantConnect.Securities.Equity.Equity at 0x7f25f2b1f6d8>
In [104]:
history = qb.History(['AMZN'],  timedelta(60))
In [105]:
qb.AddCrypto('BTCUSD', Resolution.Minute)
Out[105]:
<QuantConnect.Securities.Crypto.Crypto at 0x7f25f4294748>
In [106]:
history = qb.History(['BTCUSD'], timedelta(60))
In [ ]: