
import time
import pandas as pd
import pdb




# instruments = ['SH600000']
# fields = ['$close', '$volume', 'Ref($close, 1)', 'Mean($close, 3)', '$high-$low']

tt1 = time.time()
path = 'E:/PycharmProjects/qlib/.qlib/quote_2019_20210205.csv'  # 应该用配置文件进行路径配置
quote = pd.read_csv(path, index_col=0)
tt2 = time.time()

print(tt2-tt1)
print('##################')
pdb.set_trace()
quote = quote[['close', 'datetime', 'high', 'open', 'low', 'volume', 'ticker']]
quote['ticker'] = quote['ticker'].apply(lambda x: x[7:] + x[:6])
instruments = quote['ticker'].unique().tolist()
fields = ['$close', '$volume', '$high', '$open', '$low']

if __name__ == '__main__':
    import qlib

    qlib.init(provider_uri='~/../.qlib/dw_data')
    from qlib.data import D

    t1 = time.time()
    ret = D.features(instruments, fields, start_time='2019-01-01', end_time='2021-01-31', freq='day').head()
    t2 = time.time()

    print(t2-t1)
    print(ret)


ee46cd7d1f993a8d6e1894ee9133492795b61398
<mask token>

<mask token>
print(tt2 - tt1)
print('##################')
pdb.set_trace()
<mask token>
if __name__ == '__main__':
    import qlib
    qlib.init(provider_uri='~/../.qlib/dw_data')
    from qlib.data import D
    t1 = time.time()
    ret = D.features(instruments, fields, start_time='2019-01-01', end_time
        ='2021-01-31', freq='day').head()
    t2 = time.time()
    print(t2 - t1)
    print(ret)

<mask token>
tt1 = time.time()
path = 'E:/PycharmProjects/qlib/.qlib/quote_2019_20210205.csv'
quote = pd.read_csv(path, index_col=0)
tt2 = time.time()
print(tt2 - tt1)
print('##################')
pdb.set_trace()
quote = quote[['close', 'datetime', 'high', 'open', 'low', 'volume', 'ticker']]
quote['ticker'] = quote['ticker'].apply(lambda x: x[7:] + x[:6])
instruments = quote['ticker'].unique().tolist()
fields = ['$close', '$volume', '$high', '$open', '$low']
if __name__ == '__main__':
    import qlib
    qlib.init(provider_uri='~/../.qlib/dw_data')
    from qlib.data import D
    t1 = time.time()
    ret = D.features(instruments, fields, start_time='2019-01-01', end_time
        ='2021-01-31', freq='day').head()
    t2 = time.time()
    print(t2 - t1)
    print(ret)

import time
import pandas as pd
import pdb
tt1 = time.time()
path = 'E:/PycharmProjects/qlib/.qlib/quote_2019_20210205.csv'
quote = pd.read_csv(path, index_col=0)
tt2 = time.time()
print(tt2 - tt1)
print('##################')
pdb.set_trace()
quote = quote[['close', 'datetime', 'high', 'open', 'low', 'volume', 'ticker']]
quote['ticker'] = quote['ticker'].apply(lambda x: x[7:] + x[:6])
instruments = quote['ticker'].unique().tolist()
fields = ['$close', '$volume', '$high', '$open', '$low']
if __name__ == '__main__':
    import qlib
    qlib.init(provider_uri='~/../.qlib/dw_data')
    from qlib.data import D
    t1 = time.time()
    ret = D.features(instruments, fields, start_time='2019-01-01', end_time
        ='2021-01-31', freq='day').head()
    t2 = time.time()
    print(t2 - t1)
    print(ret)


import time
import pandas as pd
import pdb




# instruments = ['SH600000']
# fields = ['$close', '$volume', 'Ref($close, 1)', 'Mean($close, 3)', '$high-$low']

tt1 = time.time()
path = 'E:/PycharmProjects/qlib/.qlib/quote_2019_20210205.csv'  # 应该用配置文件进行路径配置
quote = pd.read_csv(path, index_col=0)
tt2 = time.time()

print(tt2-tt1)
print('##################')
pdb.set_trace()
quote = quote[['close', 'datetime', 'high', 'open', 'low', 'volume', 'ticker']]
quote['ticker'] = quote['ticker'].apply(lambda x: x[7:] + x[:6])
instruments = quote['ticker'].unique().tolist()
fields = ['$close', '$volume', '$high', '$open', '$low']

if __name__ == '__main__':
    import qlib

    qlib.init(provider_uri='~/../.qlib/dw_data')
    from qlib.data import D

    t1 = time.time()
    ret = D.features(instruments, fields, start_time='2019-01-01', end_time='2021-01-31', freq='day').head()
    t2 = time.time()

    print(t2-t1)
    print(ret)

