Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/330.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在Eclipse中运行AlgoTrader模拟_Java_Database_Eclipse_Error Handling_Esper - Fatal编程技术网

Java 在Eclipse中运行AlgoTrader模拟

Java 在Eclipse中运行AlgoTrader模拟,java,database,eclipse,error-handling,esper,Java,Database,Eclipse,Error Handling,Esper,我试图在AlgoTrader的开源版本中使用移动平均策略运行SimulationStarted类 当我在eclipse中启动SimulationStarter时,我得到 Exception in thread "main" com.algoTrader.service.SimulationServiceException: Error performing 'SimulationService.simulateWithCurrentParams()' --> com.algoTrader.

我试图在AlgoTrader的开源版本中使用移动平均策略运行SimulationStarted类

当我在eclipse中启动SimulationStarter时,我得到

Exception in thread "main" com.algoTrader.service.SimulationServiceException: Error performing 'SimulationService.simulateWithCurrentParams()' --> com.algoTrader.service.SimulationServiceException: Error performing 'SimulationService.runByUnderlayings()' --> com.algoTrader.service.RuleServiceException: Error performing 'RuleService.initServiceProvider(String strategyName)' --> com.espertech.esper.client.EPException: esper-mov.cfg.xml not found
但是它是使用java.exe-cp target/classes;命令运行的/AlgoTrader/code/target/classes;..//AlgoTrader/code/lib/;target/-Dsimulation=true-DdataSource.dataSet=1year com.algoTrader.starter.SimulationStarter simulateWithCurrentParams

如果有人知道如何解决它或任何建议将是欢迎的。 在eclipse中运行SimulationStarter时,整个异常输出是:

1989-12-31 23:00:00,000 DEBUG RuleServiceImpl initialized service provider: BASE 
1989-12-31 23:00:00,000 DEBUG RuleServiceImpl deployed module market-data on service provider: BASE 
1989-12-31 23:00:00,000 DEBUG RuleServiceImpl deployed module current-values on service provider: BASE 
1989-12-31 23:00:00,000 DEBUG RuleServiceImpl deployed module trades on service provider: BASE 
1989-12-31 23:00:00,000 DEBUG RuleServiceImpl deployed module portfolio on service provider: BASE 
1989-12-31 23:00:00,000 DEBUG RuleServiceImpl deployed module performance on service provider: BASE 
1989-12-31 23:00:00,000 DEBUG RuleServiceImpl deployed module algo on service provider: BASE 
1989-12-31 23:00:00,000 DEBUG RuleServiceImpl deployed module ib-market-data on service provider: BASE 
1989-12-31 23:00:00,000 DEBUG RuleServiceImpl deployed module ib-trades on service provider: BASE 
Exception in thread "main" com.algoTrader.service.SimulationServiceException: Error performing 'SimulationService.simulateWithCurrentParams()' --> com.algoTrader.service.SimulationServiceException: Error performing 'SimulationService.runByUnderlayings()' --> com.algoTrader.service.RuleServiceException: Error performing 'RuleService.initServiceProvider(String strategyName)' --> com.espertech.esper.client.EPException: esper-mov.cfg.xml not found
    at com.algoTrader.service.SimulationServiceBase.simulateWithCurrentParams(SimulationServiceBase.java:246)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:111)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at com.sun.proxy.$Proxy12.simulateWithCurrentParams(Unknown Source)
    at com.algoTrader.starter.SimulationStarter.main(SimulationStarter.java:29)
Caused by: com.espertech.esper.client.EPException: esper-mov.cfg.xml not found
    at com.espertech.esper.client.Configuration.getResourceAsStream(Configuration.java:928)
    at com.espertech.esper.client.Configuration.getConfigurationInputStream(Configuration.java:784)
    at com.espertech.esper.client.Configuration.configure(Configuration.java:767)
    at com.algoTrader.service.RuleServiceImpl.handleInitServiceProvider(RuleServiceImpl.java:81)
    at com.algoTrader.service.RuleServiceBase.initServiceProvider(RuleServiceBase.java:86)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:111)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at com.sun.proxy.$Proxy14.initServiceProvider(Unknown Source)
    at com.algoTrader.service.SimulationServiceImpl.handleRunByUnderlayings(SimulationServiceImpl.java:139)
    at com.algoTrader.service.SimulationServiceBase.runByUnderlayings(SimulationServiceBase.java:216)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:111)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at com.sun.proxy.$Proxy12.runByUnderlayings(Unknown Source)
    at com.algoTrader.service.SimulationServiceImpl.handleSimulateWithCurrentParams(SimulationServiceImpl.java:183)
    at com.algoTrader.service.SimulationServiceBase.simulateWithCurrentParams(SimulationServiceBase.java:242)
    ... 14 more

您可能正在尝试在项目代码中运行SimulationStarter。但是,要运行模拟,您需要在algotrader mov项目中运行它

附:更多信息: