cl7805

Results 8 comments of cl7805

Hi, marvellous explanation above. The example given in the book is intraday. I'm doing swing trading amd I'm stuck on the distinction between Timedelta and span. What does span=100 mean?...

https://towardsdatascience.com/financial-machine-learning-part-1-labels-7eeed050f32e

getDailyVol(df0['Adj Close'],100) --------------------------------------------------------------------------- UnboundLocalError Traceback (most recent call last) in () 1 ----> 2 getDailyVol(df0['Adj Close'],100) in getDailyVol(Close, span0) 1 def getDailyVol(Close,span0=100): 2 # daily vol reindexed to close ---->...

ser = pd.Series(df0['Adj Close']) print(ser) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) in () ----> 1 ser = pd.Series(df0['Adj Close']) 2 print(ser) 2 frames /usr/local/lib/python3.7/dist-packages/pandas/core/generic.py in __nonzero__(self) 1328 def __nonzero__(self):...

https://towardsdatascience.com/financial-machine-learning-part-1-labels-7eeed050f32e

def get_horizons(prices, delta=pd.Timedelta(days=1)): t1 = prices.index.searchsorted(prices.index + delta) t1 = t1[t1 < prices.shape[0]] t1 = prices.index[t1] t1 = pd.Series(t1, index=prices.index[:t1.shape[0]]) return t1 data_ohlc = data data_ohlc = \ data_ohlc.assign(threshold=get_vol(data_ohlc.Close)).dropna() t1=get_horizons(data_ohlc)...

Hi, what is the python api to install research?