<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
Hi I've read a lot of question here on stackoverflow about this problem, but I have a little different task. 
<ASSISTANT_TASK:>
Python Code:
import pandas as pd
df = pd.DataFrame({'DateTime': ['2000-01-04', '2000-01-05', '2000-01-06', '2000-01-07', '2000-01-08'],
                   'Close': [1460, 1470, 1480, 1480, 1450]})
def g(df):
    label = [1,]
    for i in range(1, len(df)):
        if df.loc[i, 'Close'] > df.loc[i-1, 'Close']:
            label.append(1)
        elif df.loc[i, 'Close'] == df.loc[i-1, 'Close']:
            label.append(0)
        else:
            label.append(-1)
    df['label'] = label
    return df
df = g(df.copy())
<END_TASK>