def main():
    config = {'username': '******', 'password': '******', 'rootpath': 'D:/cStrategy/',
              'initCapitalStock': Init_Cap,
              'startDate': Start_Date, 'endDate': End_Date, 'cycle': 1, 'executeMode': 'D', 'feeRate': 0.0015,
              'feeLimit': 5, 'strategyName': '50+7fa-Nocutloss-MA12-15-cov120', 'logfile': 'ma.log', 'dealByVolume': True,
              'memorySize': 5,
              'initial': initial, 'preparePerDay': initPerDay, 'strategy': strategy}
    MiniSimulator(**config).run()
Пример #2
0
        step += 1
    sdk.setGlobal('step', step)


config = {
    'username': username,
    'password': password,
    'initCapital': INIT_CAP,
    'startDate': START_DATE,
    'endDate': END_DATE,
    'strategy': strategy,
    'initial': initial,
    'preparePerDay': init_per_day,
    'feeRate': Fee_Rate,
    'strategyName': Strategy_Name,
    'logfile': '%s.log' % Strategy_Name,
    'rootpath': program_path,
    'executeMode': 'D',
    'feeLimit': 5,
    'cycle': 1,
    'dealByVolume': True,
    'allowForTodayFactors': ['LZ_GPA_SLCIND_STOP_FLAG']
}

if __name__ == "__main__":
    # 在线运行所需代码
    import os

    config['strategyID'] = os.path.splitext(os.path.split(__file__)[1])[0]
    MiniSimulator(**config).run()