Пример #1
0
# script to auto generate some files

from zvt.contract import IntervalLevel
from zvt.autocode.generator import gen_exports, gen_kdata_schema

if __name__ == '__main__':
    gen_kdata_schema(pkg='zvt_coin',
                     providers=['ccxt'],
                     entity_type='coin',
                     levels=[IntervalLevel.LEVEL_1DAY],
                     adjust_types=[None])
    gen_exports()
Пример #2
0
                     entity_type='block',
                     levels=[
                         IntervalLevel.LEVEL_1DAY, IntervalLevel.LEVEL_1WEEK,
                         IntervalLevel.LEVEL_1MON
                     ],
                     entity_in_submodule=True)

    # etf行情
    gen_kdata_schema(pkg='zvt',
                     providers=['sina'],
                     entity_type='etf',
                     levels=[IntervalLevel.LEVEL_1DAY],
                     entity_in_submodule=True)
    # 指数行情
    gen_kdata_schema(pkg='zvt',
                     providers=['sina'],
                     entity_type='index',
                     levels=[IntervalLevel.LEVEL_1DAY],
                     entity_in_submodule=True)


if __name__ == '__main__':
    # zip_dir(ZVT_TEST_DATA_PATH, zip_file_name=DATA_SAMPLE_ZIP_PATH)
    gen_exports('./api')
    gen_exports('./domain')
    gen_exports('./informer')
    gen_exports('./utils')
    gen_exports('./trader')
    gen_exports('autocode')
    gen_kdata_schemas()
Пример #3
0
        providers=["em", "sina"],
        entity_type="index",
        levels=[IntervalLevel.LEVEL_1DAY, IntervalLevel.LEVEL_1WEEK],
        entity_in_submodule=True,
    )

    # etf行情
    gen_kdata_schema(
        pkg="zvt", providers=["sina"], entity_type="etf", levels=[IntervalLevel.LEVEL_1DAY], entity_in_submodule=True
    )

    # etf行情
    gen_kdata_schema(
        pkg="zvt", providers=["em"], entity_type="currency", levels=[IntervalLevel.LEVEL_1DAY], entity_in_submodule=True
    )


if __name__ == "__main__":
    # zip_dir(ZVT_TEST_DATA_PATH, zip_file_name=DATA_SAMPLE_ZIP_PATH)
    # gen_exports("contract", export_modules=["schema"])
    # gen_exports("ml")
    # gen_exports("utils")
    # gen_exports('informer')
    gen_exports("api")
    # gen_exports('trader')
    # gen_exports('autocode')
    # gen_exports("ml")
    # gen_kdata_schemas()
    # gen_exports("recorders")
    # gen_exports("domain")
Пример #4
0
                         IntervalLevel.LEVEL_1DAY, IntervalLevel.LEVEL_1WEEK,
                         IntervalLevel.LEVEL_1MON
                     ],
                     entity_in_submodule=True)

    # etf行情
    gen_kdata_schema(pkg='zvt',
                     providers=['sina'],
                     entity_type='etf',
                     levels=[IntervalLevel.LEVEL_1DAY],
                     entity_in_submodule=True)
    # 指数行情
    gen_kdata_schema(
        pkg='zvt',
        providers=['joinquant', 'sina'],
        entity_type='index',
        levels=[IntervalLevel.LEVEL_1DAY, IntervalLevel.LEVEL_1WEEK],
        entity_in_submodule=True)


if __name__ == '__main__':
    # zip_dir(ZVT_TEST_DATA_PATH, zip_file_name=DATA_SAMPLE_ZIP_PATH)
    # gen_exports('api')
    # gen_exports('domain')
    # gen_exports('informer')
    # gen_exports('utils')
    # gen_exports('trader')
    # gen_exports('autocode')
    gen_exports('factors')
    # gen_kdata_schemas()
Пример #5
0
    # 指数行情
    gen_kdata_schema(
        pkg="zvt",
        providers=["em", "sina"],
        entity_type="index",
        levels=[IntervalLevel.LEVEL_1DAY, IntervalLevel.LEVEL_1WEEK],
        entity_in_submodule=True,
    )

    # etf行情
    gen_kdata_schema(pkg="zvt",
                     providers=["sina"],
                     entity_type="etf",
                     levels=[IntervalLevel.LEVEL_1DAY],
                     entity_in_submodule=True)


if __name__ == "__main__":
    # zip_dir(ZVT_TEST_DATA_PATH, zip_file_name=DATA_SAMPLE_ZIP_PATH)
    # gen_exports('contract',export_modules=['schema'])
    # gen_exports("ml")
    gen_exports("utils")
    # gen_exports('recorders')
    # gen_exports('domain')
    # gen_exports('informer')
    # gen_exports('api')
    # gen_exports('trader')
    # gen_exports('autocode')
    # gen_exports('ml')
    # gen_kdata_schemas()
Пример #6
0
def gen_kdata_schemas():
    # 股票行情
    gen_kdata_schema(pkg='zvt', providers=['joinquant'], entity_type='stock',
                     levels=[level for level in IntervalLevel if level != IntervalLevel.LEVEL_TICK],
                     adjust_types=[None, AdjustType.hfq], entity_in_submodule=True)

    # 板块行情
    gen_kdata_schema(pkg='zvt', providers=['eastmoney'], entity_type='block',
                     levels=[IntervalLevel.LEVEL_1DAY, IntervalLevel.LEVEL_1WEEK, IntervalLevel.LEVEL_1MON],
                     entity_in_submodule=True)

    # etf行情
    gen_kdata_schema(pkg='zvt', providers=['sina'], entity_type='etf',
                     levels=[IntervalLevel.LEVEL_1DAY], entity_in_submodule=True)
    # 指数行情
    gen_kdata_schema(pkg='zvt', providers=['joinquant', 'sina'], entity_type='index',
                     levels=[IntervalLevel.LEVEL_1DAY, IntervalLevel.LEVEL_1WEEK], entity_in_submodule=True)


if __name__ == '__main__':
    # zip_dir(ZVT_TEST_DATA_PATH, zip_file_name=DATA_SAMPLE_ZIP_PATH)
    # gen_exports('api')
    # gen_exports('domain')
    # gen_exports('informer')
    # gen_exports('utils')
    # gen_exports('trader')
    # gen_exports('autocode')
    # gen_exports('factors')
    gen_exports('recorders/joinquant')
    # gen_kdata_schemas()
Пример #7
0
                     ],
                     entity_in_submodule=True)

    # 指数行情
    gen_kdata_schema(
        pkg='zvt',
        providers=['em', 'sina'],
        entity_type='index',
        levels=[IntervalLevel.LEVEL_1DAY, IntervalLevel.LEVEL_1WEEK],
        entity_in_submodule=True)

    # etf行情
    gen_kdata_schema(pkg='zvt',
                     providers=['sina'],
                     entity_type='etf',
                     levels=[IntervalLevel.LEVEL_1DAY],
                     entity_in_submodule=True)


if __name__ == '__main__':
    # zip_dir(ZVT_TEST_DATA_PATH, zip_file_name=DATA_SAMPLE_ZIP_PATH)
    # gen_exports('contract',export_from_package=False)
    # gen_exports('recorders')
    # gen_exports('domain')
    # gen_exports('informer')
    gen_exports('api')
    # gen_exports('trader')
    # gen_exports('autocode')
    gen_exports('ml')
    # gen_kdata_schemas()
Пример #8
0
# script to auto generate some files

from zvt.contract import IntervalLevel
from zvt.autocode.generator import gen_exports, gen_kdata_schema

if __name__ == '__main__':
    gen_kdata_schema(pkg='zvt_future',
                     providers=['joinquant'],
                     entity_type='future',
                     levels=[IntervalLevel.LEVEL_1DAY],
                     adjust_types=[None])
    gen_exports(dir_path='.')
# the __all__ is generated
__all__ = []
Пример #9
0
                         IntervalLevel.LEVEL_1DAY, IntervalLevel.LEVEL_1WEEK,
                         IntervalLevel.LEVEL_1MON
                     ],
                     entity_in_submodule=True)

    # etf行情
    gen_kdata_schema(pkg='zvt',
                     providers=['sina'],
                     entity_type='etf',
                     levels=[IntervalLevel.LEVEL_1DAY],
                     entity_in_submodule=True)
    # 指数行情
    gen_kdata_schema(
        pkg='zvt',
        providers=['joinquant', 'sina'],
        entity_type='index',
        levels=[IntervalLevel.LEVEL_1DAY, IntervalLevel.LEVEL_1WEEK],
        entity_in_submodule=True)


if __name__ == '__main__':
    # zip_dir(ZVT_TEST_DATA_PATH, zip_file_name=DATA_SAMPLE_ZIP_PATH)
    gen_exports('domain')
    gen_exports('recorders/em')
    # gen_exports('informer')
    # gen_exports('utils')
    # gen_exports('trader')
    # gen_exports('autocode')
    # gen_exports('factors')
    # gen_kdata_schemas()