def featAroon( dData, bDown=False, lLookback=25, b_human=False ):
    '''
    @summary: Calculate Aroon - indicator indicating days since a 25-day 
              high/low, weighted between 0 and 100
    @param dData: Dictionary of data to use
    @param bDown: If false, calculates aroonUp (high), else aroonDown (lows)
    @param lLookback: Days to lookback to calculate high/low from
    @param b_human: if true return dataframe to plot
    @return: DataFrame array containing feature values
    '''
    
    dfPrice = dData['close']

    #Feature DataFrame will be 1:1, we can use the price as a template
    dfRet = pand.DataFrame( index=dfPrice.index, columns=dfPrice.columns, 
                            data=np.zeros(dfPrice.shape) )
    
    #Loop through time
    for i in range(dfPrice.shape[0]):
        if( (i-lLookback) < 0 ):
            dfRet.ix[i,:] = np.NAN
        else:
            if bDown:
                dfRet.ix[i,:] = dfPrice.values[i:(i-lLookback):-1,:].argmin(
                                axis=0)
            else:
                dfRet.ix[i,:] = dfPrice.values[i:(i-lLookback):-1,:].argmax(
                                axis=0)
    
    dfRet = ((lLookback - 1.) - dfRet) / (lLookback - 1.) * 100.

    if b_human:
        for sym in dData['close']:
            x=1000/dData['close'][sym][0]
            dData['close'][sym]=dData['close'][sym]*x
        return dData['close']
    return dfRet
dataset/ETHPy150Open QuantSoftware/QuantSoftwareToolkit/QSTK/qstkfeat/features.py/featAroon/original