├── DockerRun.sh ├── DockerRun.bat ├── DockerBuild.bat ├── DockerBuild.sh ├── .gitignore ├── quantfabric-server ├── src │ └── main │ │ ├── resources │ │ ├── client.policy │ │ └── quantfabricAlgo.cfg.xml │ │ └── java │ │ ├── module-info.java │ │ └── com │ │ └── quantfabric │ │ └── algo │ │ └── server │ │ ├── NodeProvider.java │ │ ├── jmx │ │ ├── AlgoServerWatchdogListener.java │ │ ├── AlgoHostMgmtMBean.java │ │ └── AlgoServerMgmtMBean.java │ │ ├── RpcServerFactory.java │ │ ├── qserver │ │ ├── CommandExecutor.java │ │ ├── commands │ │ │ └── ClientCommand.java │ │ └── ClientContext.java │ │ ├── TradingUnitAdministrationProvider.java │ │ ├── Messages.java │ │ ├── TradingUnitProvider.java │ │ ├── process │ │ └── ProcessWatcherHandler.java │ │ └── HostManager.java ├── .settings │ ├── org.eclipse.m2e.core.prefs │ └── org.eclipse.jdt.core.prefs ├── agents │ └── remote-jmx-agent.jar ├── licenses │ ├── cme-onixs.lic │ └── cme_hotspot-onixs.lic └── .project ├── quantfabric-core ├── .settings │ ├── org.eclipse.m2e.core.prefs │ └── org.eclipse.jdt.core.prefs ├── .project └── src │ ├── main │ └── java │ │ └── com │ │ └── quantfabric │ │ ├── util │ │ ├── Named.java │ │ ├── Startable.java │ │ ├── VariableWrapper.java │ │ ├── Configurable.java │ │ ├── UnsupportedMDTypeForExchange.java │ │ ├── Formatter.java │ │ ├── CollectionHelper.java │ │ ├── SessionId.java │ │ └── timeframes │ │ │ ├── MinutesTimeframe.java │ │ │ └── TimeframeException.java │ │ ├── algo │ │ ├── commands │ │ │ ├── Command.java │ │ │ ├── CommandExecutor.java │ │ │ └── ConcreteCommand.java │ │ ├── runtime │ │ │ ├── ShutdownListener.java │ │ │ └── RuntimeContext.java │ │ ├── market │ │ │ ├── datamodel │ │ │ │ ├── BaseLightweightMDFeedEvent.java │ │ │ │ └── MDFeedEvent.java │ │ │ ├── gateway │ │ │ │ ├── commands │ │ │ │ │ ├── RejectTrade.java │ │ │ │ │ ├── ConfirmTrade.java │ │ │ │ │ ├── CancelOrder.java │ │ │ │ │ ├── UpdatePeggedOrder.java │ │ │ │ │ ├── ManageOrderTrade.java │ │ │ │ │ ├── SubmitOrder.java │ │ │ │ │ ├── ManageAcceptedOrder.java │ │ │ │ │ ├── UnsubscribeCommand.java │ │ │ │ │ ├── UpdatePeggedOrderCommand.java │ │ │ │ │ └── CancelOrderCommand.java │ │ │ │ ├── access │ │ │ │ │ ├── product │ │ │ │ │ │ ├── Description.java │ │ │ │ │ │ ├── subscriber │ │ │ │ │ │ │ └── Subscriber.java │ │ │ │ │ │ ├── publisher │ │ │ │ │ │ │ ├── Publisher.java │ │ │ │ │ │ │ ├── PublisherManagersProvider.java │ │ │ │ │ │ │ └── PublishersManager.java │ │ │ │ │ │ ├── ContentType.java │ │ │ │ │ │ ├── Connector.java │ │ │ │ │ │ └── Product.java │ │ │ │ │ ├── security │ │ │ │ │ │ └── Credentials.java │ │ │ │ │ ├── subscription │ │ │ │ │ │ ├── SubscriptionResult.java │ │ │ │ │ │ └── SubscriptionOptions.java │ │ │ │ │ └── agent │ │ │ │ │ │ ├── AgentFactory.java │ │ │ │ │ │ └── exceptions │ │ │ │ │ │ ├── GatewayAgentException.java │ │ │ │ │ │ └── RemoteGatewayException.java │ │ │ │ ├── CreditLimit.java │ │ │ │ ├── feed │ │ │ │ │ ├── ExecutionFeedCollection.java │ │ │ │ │ ├── ExecutionFeed.java │ │ │ │ │ ├── FeedProvider.java │ │ │ │ │ ├── ExecutionFeedProvider.java │ │ │ │ │ ├── MarketDataFeedProvider.java │ │ │ │ │ ├── CachableFeedCollection.java │ │ │ │ │ ├── CashedByFeedIdFeedCollection.java │ │ │ │ │ └── MarketDataFeedCollection.java │ │ │ │ ├── InstrumentsManager.java │ │ │ │ ├── MarketFeeder.java │ │ │ │ ├── MarketGatewayManager.java │ │ │ │ ├── MarketConnectionsManager.java │ │ │ │ ├── MarketDataPipelineFactory.java │ │ │ │ ├── MarketConnectionFactory.java │ │ │ │ ├── MarketDataPipelinesManager.java │ │ │ │ └── OrderBookSnapshotsProvider.java │ │ │ ├── history │ │ │ │ ├── HistoryRemoteRepositorySynchronizer.java │ │ │ │ ├── TimeFrameBarsContaner.java │ │ │ │ ├── TimeFrameHistoryTable.java │ │ │ │ ├── MultiTimeFrameHistoryProviderFactory.java │ │ │ │ ├── MultiTimeFrameHistoryProviderDictionary.java │ │ │ │ ├── TimeFrameHistoryView.java │ │ │ │ ├── MultiTimeFrameHistoryProvider.java │ │ │ │ ├── MultiTimeFrameHistoryProviderDefinition.java │ │ │ │ └── TimeFrameHistoryRecorder.java │ │ │ └── dataprovider │ │ │ │ ├── PipelineServiceDefinition.java │ │ │ │ ├── PipelineService.java │ │ │ │ ├── QueryDataViewRequest.java │ │ │ │ ├── DataSourceDescriptor.java │ │ │ │ ├── GatewayAgentsService.java │ │ │ │ ├── FeedName.java │ │ │ │ ├── HistoricalDataViewRequest.java │ │ │ │ ├── PipelineHistoryService.java │ │ │ │ ├── DataViewRequest.java │ │ │ │ ├── FeedReference.java │ │ │ │ └── orderbook │ │ │ │ ├── OrderBookInfo.java │ │ │ │ └── OrderBookView.java │ │ ├── backtesting │ │ │ ├── eventbus │ │ │ │ ├── events │ │ │ │ │ └── BackTestingEvent.java │ │ │ │ └── BackTestingEventListener.java │ │ │ ├── manger │ │ │ │ └── jmx │ │ │ │ │ └── BackTestingManagerMXBean.java │ │ │ ├── virtualcoin │ │ │ │ └── VirtualCoinBackTestingMarketAdapter.java │ │ │ └── player │ │ │ │ └── track │ │ │ │ └── TrackInfo.java │ │ ├── instrument │ │ │ ├── InstrumentProvider.java │ │ │ └── Instrument.java │ │ └── order │ │ │ └── TrailingStopTradeOrder.java │ │ ├── messaging │ │ ├── TargetSubject.java │ │ ├── Subscriber.java │ │ └── NamedMapSubscriber.java │ │ ├── net │ │ ├── stream │ │ │ ├── Serializer.java │ │ │ ├── TypeRegistrator.java │ │ │ ├── Deserializer.java │ │ │ ├── InputStreamObjectReader.java │ │ │ ├── InputStreamObjectReaderFactory.java │ │ │ └── kryo │ │ │ │ ├── KryoFactory.java │ │ │ │ └── KryoSupport.java │ │ ├── Transceiver.java │ │ ├── Receiver.java │ │ ├── RequestHandler.java │ │ ├── Transmitter.java │ │ ├── rmi │ │ │ ├── RMIServiceReferenceParser.java │ │ │ └── RMIServiceReference.java │ │ └── rpc │ │ │ ├── RpcServer.java │ │ │ └── RpcClient.java │ │ ├── persistence │ │ ├── PersisterSettingsBlock.java │ │ ├── csv │ │ │ ├── CsvMetadata.java │ │ │ └── CsvBean.java │ │ ├── esper │ │ │ ├── ChangePersistingClassNameListener.java │ │ │ └── EsperEventPersister.java │ │ ├── ConsoleStorageProvider.java │ │ ├── test │ │ │ └── TestBean.java │ │ └── util │ │ │ └── MapWrapper.java │ │ └── cep │ │ ├── UpdateConsoleWriter.java │ │ └── QuantfabricCEPException.java │ └── test │ └── java │ └── com │ └── quantfabric │ └── net │ └── stream │ ├── json │ ├── JsonAlgoHostListener.java │ └── JsonStreamClientTest.java │ └── kryo │ └── KryoStreamClientTest.java ├── quantfabric-gatewayagent ├── .settings │ ├── org.eclipse.m2e.core.prefs │ └── org.eclipse.jdt.core.prefs ├── src │ └── main │ │ ├── java │ │ ├── module-info.java │ │ └── com │ │ │ └── quantfabric │ │ │ └── algo │ │ │ └── market │ │ │ └── gateway │ │ │ └── access │ │ │ └── remote │ │ │ ├── DefaultGatewayAgent.java │ │ │ └── GatewayConnector.java │ │ └── resources │ │ └── log4j.xml ├── .project └── pom.xml ├── quantfabric-indicators ├── .settings │ ├── org.eclipse.m2e.core.prefs │ └── org.eclipse.jdt.core.prefs ├── src │ ├── main │ │ └── java │ │ │ ├── module-info.java │ │ │ └── com │ │ │ └── quantfabric │ │ │ └── algo │ │ │ └── cep │ │ │ └── indicators │ │ │ ├── cycleidentifier │ │ │ └── CImode.java │ │ │ ├── ohlc │ │ │ └── OHLCUpdateListener.java │ │ │ └── AbstractPlugInViewParameters.java │ └── test │ │ └── java │ │ └── com │ │ └── quantfabric │ │ └── algo │ │ └── cep │ │ └── indicators │ │ └── Log4j.java ├── .project └── pom.xml ├── quantfabric-marketgateway ├── .settings │ ├── org.eclipse.m2e.core.prefs │ └── org.eclipse.jdt.core.prefs ├── src │ └── main │ │ ├── resources │ │ └── log4j.properties │ │ └── java │ │ ├── module-info.java │ │ └── com │ │ └── quantfabric │ │ └── algo │ │ └── market │ │ ├── provider │ │ ├── PublicDataView.java │ │ ├── aggregator │ │ │ ├── AggregatorDefinition.java │ │ │ └── MarketViewAggregatorListener.java │ │ └── StatementProvider.java │ │ └── gate │ │ ├── jmx │ │ ├── JMXEndpoint.java │ │ └── mbean │ │ │ ├── ExecutionFeedMBean.java │ │ │ ├── MarketGatewayMBean.java │ │ │ ├── InstrumentMBean.java │ │ │ ├── MarketDataFeedMBean.java │ │ │ └── MarketDataPipelineMBean.java │ │ └── access │ │ ├── rmi │ │ └── RmiMarketDataService.java │ │ ├── product │ │ ├── ProductManager.java │ │ └── producer │ │ │ ├── Producer.java │ │ │ ├── ProducerFactory.java │ │ │ ├── ProducerException.java │ │ │ └── AbstractProducer.java │ │ └── MarketDataServiceHost.java ├── .project └── pom.xml ├── quantfabric-strategyengine ├── .settings │ ├── org.eclipse.m2e.core.prefs │ └── org.eclipse.jdt.core.prefs ├── .project └── src │ └── main │ └── java │ ├── module-info.java │ └── com │ └── quantfabric │ └── algo │ └── trading │ ├── execution │ ├── jmx │ │ ├── ExecutionMXBean.java │ │ └── ExecutionMgmt.java │ ├── report │ │ └── ExecutionReport.java │ ├── tradeMonitor │ │ └── jmx │ │ │ └── mbean │ │ │ └── TradeMonitorMXBean.java │ ├── order │ │ └── StrategyOrder.java │ └── commands │ │ ├── RejectTradeStrategyOrderCommand.java │ │ ├── ConfirmTradeStrategyOrderCommand.java │ │ └── CancelStrategyOrderCommand.java │ └── strategy │ ├── settings │ └── viewlayout │ │ └── LayoutDefinitionProvider.java │ ├── ExecutionPoint.java │ ├── StrategyRuntime.java │ ├── MarketUpdatesDataStreamPoster.java │ ├── views │ └── SettingsView.java │ ├── DataSinkInfo.java │ └── DataSink.java ├── Dockerfile ├── quantfabric-binanceprovider └── src │ └── main │ └── java │ └── module-info.java ├── quantfabric-xchange └── src │ └── main │ └── java │ ├── module-info.java │ └── com │ └── quantfabric │ └── market │ └── connector │ └── xchange │ ├── MarketDataSingleEventHandler.java │ └── exception │ └── EmptyPropertiesException.java ├── .spotbugs-filter.xml └── config ├── quantfabric.strategyrunner.cfg.xml ├── gateway ├── quantfabric.server.cfg.xml └── quantfabricAlgo.cfg.xml └── quantfabric.server.cfg.xml /DockerRun.sh: -------------------------------------------------------------------------------- 1 | docker run quantfabric -v config:/home/quantfabric/ -------------------------------------------------------------------------------- /DockerRun.bat: -------------------------------------------------------------------------------- 1 | docker run quantfabric -v config:/home/quantfabric/ -------------------------------------------------------------------------------- /DockerBuild.bat: -------------------------------------------------------------------------------- 1 | docker rmi quantfabric 2 | docker build -t quantfabric . -------------------------------------------------------------------------------- /DockerBuild.sh: -------------------------------------------------------------------------------- 1 | docker rmi quantfabric 2 | docker build -t quantfabric . -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/target/ 2 | **/.idea/ 3 | .idea 4 | **/*.iml 5 | /logs 6 | *.log 7 | -------------------------------------------------------------------------------- /quantfabric-server/src/main/resources/client.policy: -------------------------------------------------------------------------------- 1 | grant 2 | { 3 | permission java.security.AllPermission; 4 | }; -------------------------------------------------------------------------------- /quantfabric-core/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /quantfabric-server/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /quantfabric-server/agents/remote-jmx-agent.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/quantfabric-net/quantfabric/HEAD/quantfabric-server/agents/remote-jmx-agent.jar -------------------------------------------------------------------------------- /quantfabric-gatewayagent/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /quantfabric-indicators/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /quantfabric-strategyengine/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM maven:3.8.6-eclipse-temurin-11-alpine 2 | 3 | WORKDIR /home/quantfabric/ 4 | 5 | COPY ./ /home/quantfabric/ 6 | 7 | ENTRYPOINT mvn clean package && java -jar quantfabric-server/target/quantfabric-server-0.0.1-SNAPSHOT.jar -------------------------------------------------------------------------------- /quantfabric-gatewayagent/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module quantfabric.gatewayagent { 2 | requires java.rmi; 3 | requires quantfabric.core; 4 | requires quantfabric.marketgateway; 5 | exports com.quantfabric.algo.market.gateway.access.remote; 6 | } -------------------------------------------------------------------------------- /quantfabric-core/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 5 | org.eclipse.jdt.core.compiler.source=1.6 6 | -------------------------------------------------------------------------------- /quantfabric-server/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 3 | org.eclipse.jdt.core.compiler.compliance=11 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 5 | org.eclipse.jdt.core.compiler.source=11 6 | -------------------------------------------------------------------------------- /quantfabric-indicators/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 5 | org.eclipse.jdt.core.compiler.source=1.6 6 | -------------------------------------------------------------------------------- /quantfabric-gatewayagent/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 5 | org.eclipse.jdt.core.compiler.source=1.6 6 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 5 | org.eclipse.jdt.core.compiler.source=1.6 6 | -------------------------------------------------------------------------------- /quantfabric-strategyengine/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 5 | org.eclipse.jdt.core.compiler.source=1.6 6 | -------------------------------------------------------------------------------- /quantfabric-indicators/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module quantfabric.indicators { 2 | requires esper; 3 | requires commons.logging; 4 | requires log4j; 5 | requires quantfabric.core; 6 | requires commons.collections; 7 | requires slf4j.api; 8 | exports com.quantfabric.algo.cep.indicators.ohlc; 9 | } -------------------------------------------------------------------------------- /quantfabric-binanceprovider/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module quantfabric.binanceprovider { 2 | requires java.sql; 3 | requires quantfabric.core; 4 | requires xchange.core; 5 | requires quantfabric.xchange; 6 | requires xchange.stream.binance; 7 | requires xchange.binance; 8 | requires slf4j.api; 9 | requires io.reactivex.rxjava2; 10 | } -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=ERROR,stdout 2 | log4j.logger.com.endeca=INFO 3 | # Logger for crawl metrics 4 | log4j.logger.com.endeca.itl.web.metrics=INFO 5 | 6 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stdout.layout.ConversionPattern=%p\t%d{ISO8601}\t%r\t%c\t[%t]\t%m%n -------------------------------------------------------------------------------- /quantfabric-xchange/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module quantfabric.xchange { 2 | exports com.quantfabric.market.connector.xchange; 3 | exports com.quantfabric.market.connector.xchange.commands; 4 | requires java.sql; 5 | requires quantfabric.core; 6 | requires xchange.core; 7 | requires slf4j.api; 8 | requires io.reactivex.rxjava2; 9 | requires xchange.stream.core; 10 | requires com.fasterxml.jackson.databind; 11 | } -------------------------------------------------------------------------------- /.spotbugs-filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /config/quantfabric.strategyrunner.cfg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /quantfabric-server/licenses/cme-onixs.lic: -------------------------------------------------------------------------------- 1 | 2 | trial 3 | 4 | OnixS 5 | 6 | 7 | 2011-08-03 8 | 2011-11-01 9 | 10 | 11 | 12 | 13 | MozK2CA46h2kNs4wP4AbO7iMSal0sSxchkPxPsSewNMrA7TCHNmQBH3W/6zZnFXsvkpi7wxfzS0d3ryHLN6nCBdwZtK0gERymoQsUakBzKW+304jeXLl7FmlO6fEtqfWdsi6EVL05HL/fGd08wOXJ3uxhhQNW/XFL40fCHO/3Dw= 14 | 15 | -------------------------------------------------------------------------------- /quantfabric-core/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | quantfabric-core 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /quantfabric-server/licenses/cme_hotspot-onixs.lic: -------------------------------------------------------------------------------- 1 | 2 | trial 3 | 4 | Ortess Inc 5 | 6 | 7 | 2011-10-31 8 | 2012-01-31 9 | 10 | 11 | 12 | 13 | 14 | l0IiDn9Orx4rvLjZ+15XVujRkireX/RF1BowU3mRZ78yB6KeclYclLfLrNmeJYewXpfaKDNUWcqi 15 | jB3rzX8PLwvmJ9UPzWul/4ZOzOxbZhLtiUEU1wHxl9Ex5jWZtRHT+O4M8V2VFcibRP8q5yXL784t 16 | qcRuzfXMX+jLFzctHHk= 17 | -------------------------------------------------------------------------------- /quantfabric-indicators/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | quantfabric-indicators 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /quantfabric-gatewayagent/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | quantfabric-gatewayagent 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /quantfabric-server/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module quantfabric.server { 2 | requires java.sql; 3 | requires jdk.management.agent; 4 | requires jdk.management; 5 | requires jdk.attach; 6 | requires quickserver; 7 | requires slf4j.api; 8 | requires java.xml; 9 | requires jnacl; 10 | requires java.rmi; 11 | requires java.logging; 12 | requires com.sun.jna; 13 | requires com.sun.jna.platform; 14 | requires jdk.jconsole; 15 | requires quantfabric.core; 16 | requires quantfabric.strategyengine; 17 | requires quantfabric.marketgateway; 18 | requires commons.lang; 19 | exports com.quantfabric.algo.server.jmx; 20 | } -------------------------------------------------------------------------------- /quantfabric-marketgateway/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | quantfabric-marketgateway 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /quantfabric-strategyengine/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | quantfabric-strategyengine 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module quantfabric.marketgateway { 2 | exports com.quantfabric.algo.market.gate; 3 | exports com.quantfabric.algo.market.gate.jmx.mbean; 4 | exports com.quantfabric.algo.market.gate.access.product.subscriber; 5 | exports com.quantfabric.algo.market.gate.access.product.producer; 6 | requires quantfabric.core; 7 | requires java.sql; 8 | requires slf4j.api; 9 | requires esper; 10 | requires java.xml; 11 | requires java.rmi; 12 | requires java.management; 13 | requires quickfixj.all; 14 | requires quantfabric.indicators; 15 | requires xchange.core; 16 | requires com.fasterxml.jackson.databind; 17 | } -------------------------------------------------------------------------------- /quantfabric-gatewayagent/src/main/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /config/gateway/quantfabric.server.cfg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /quantfabric-strategyengine/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | module quantfabric.strategyengine { 2 | requires quantfabric.core; 3 | requires slf4j.api; 4 | requires java.xml; 5 | requires esper; 6 | requires java.desktop; 7 | requires java.management; 8 | requires esperio.socket; 9 | requires commons.lang; 10 | exports com.quantfabric.algo.trading.strategy.settings; 11 | exports com.quantfabric.algo.trading.strategy; 12 | exports com.quantfabric.algo.trading.strategyrunner; 13 | exports com.quantfabric.algo.trading.strategyrunner.jmx; 14 | exports com.quantfabric.algo.trading.strategyrunner.jmx.mbean; 15 | exports com.quantfabric.algo.trading.strategyrunner.jmx.notifications; 16 | } -------------------------------------------------------------------------------- /config/quantfabric.server.cfg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /quantfabric-gatewayagent/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | com.quantfabric.algo 5 | quantfabric 6 | 0.0.1-SNAPSHOT 7 | 8 | quantfabric-gatewayagent 9 | 10 | 11 | com.quantfabric.algo 12 | quantfabric-core 13 | 14 | 15 | com.quantfabric.algo 16 | quantfabric-marketgateway 17 | 18 | 19 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/util/Named.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.util; 17 | 18 | public interface Named 19 | { 20 | String getName(); 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/commands/Command.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.commands; 17 | 18 | public interface Command 19 | { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/messaging/TargetSubject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.messaging; 17 | 18 | public interface TargetSubject 19 | { 20 | long getId(); 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-indicators/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | com.quantfabric.algo 5 | quantfabric 6 | 0.0.1-SNAPSHOT 7 | 8 | quantfabric-indicators 9 | 10 | 11 | com.quantfabric.algo 12 | quantfabric-core 13 | 14 | 15 | commons-collections 16 | commons-collections 17 | 3.2.1 18 | 19 | 20 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/provider/PublicDataView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.provider; 17 | 18 | public class PublicDataView { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /config/gateway/quantfabricAlgo.cfg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | 21 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/gate/jmx/JMXEndpoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gate.jmx; 17 | 18 | public interface JMXEndpoint { 19 | void start(); 20 | } 21 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/runtime/ShutdownListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.runtime; 17 | 18 | public interface ShutdownListener 19 | { 20 | void shutdown(String sessionId); 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/datamodel/BaseLightweightMDFeedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.datamodel; 17 | 18 | public interface BaseLightweightMDFeedEvent { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /quantfabric-server/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | quantfabric-server 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.springframework.ide.eclipse.core.springbuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.m2e.core.maven2Builder 20 | 21 | 22 | 23 | 24 | 25 | org.springframework.ide.eclipse.core.springnature 26 | org.eclipse.jdt.core.javanature 27 | org.eclipse.m2e.core.maven2Nature 28 | 29 | 30 | -------------------------------------------------------------------------------- /quantfabric-strategyengine/src/main/java/com/quantfabric/algo/trading/execution/jmx/ExecutionMXBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.trading.execution.jmx; 17 | 18 | public interface ExecutionMXBean 19 | { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/backtesting/eventbus/events/BackTestingEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.backtesting.eventbus.events; 17 | 18 | public interface BackTestingEvent 19 | { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/net/stream/Serializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net.stream; 17 | 18 | public interface Serializer extends TypeRegistrator 19 | { 20 | byte[] serialize(Object bean); 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/net/stream/TypeRegistrator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net.stream; 17 | 18 | public interface TypeRegistrator 19 | { 20 | void registerType(String name, Class type); 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-strategyengine/src/main/java/com/quantfabric/algo/trading/execution/report/ExecutionReport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.trading.execution.report; 17 | 18 | public interface ExecutionReport 19 | { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/commands/RejectTrade.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.commands; 17 | 18 | public interface RejectTrade extends ManageOrderTrade 19 | { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/history/HistoryRemoteRepositorySynchronizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.history; 17 | 18 | public interface HistoryRemoteRepositorySynchronizer { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/messaging/Subscriber.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.messaging; 17 | 18 | public interface Subscriber 19 | { 20 | void sendUpdate(T data); 21 | void sendUpdate(T[] data); 22 | } 23 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/commands/ConfirmTrade.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.commands; 17 | 18 | public interface ConfirmTrade extends ManageOrderTrade 19 | { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/history/TimeFrameBarsContaner.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.history; 17 | 18 | 19 | public interface TimeFrameBarsContaner { 20 | TimeFrame getTimeFrame(); 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/net/stream/Deserializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net.stream; 17 | 18 | 19 | public interface Deserializer extends TypeRegistrator 20 | { 21 | Object deserialize(byte[] data); 22 | } 23 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/util/Startable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.util; 17 | 18 | public interface Startable { 19 | void start() throws java.lang.Exception; 20 | void stop() throws java.lang.Exception; 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/util/VariableWrapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.util; 17 | 18 | public interface VariableWrapper 19 | { 20 | String getName(); 21 | T getValue(); 22 | void setValue(T value); 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/commands/CancelOrder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.commands; 17 | 18 | 19 | public interface CancelOrder extends ManageAcceptedOrder 20 | { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/commands/UpdatePeggedOrder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.commands; 17 | 18 | public interface UpdatePeggedOrder extends ReplaceOrder 19 | { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-server/src/main/java/com/quantfabric/algo/server/NodeProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.server; 17 | 18 | public interface NodeProvider extends TradingUnitProvider, TradingUnitAdministrationProvider 19 | { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-server/src/main/java/com/quantfabric/algo/server/jmx/AlgoServerWatchdogListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.server.jmx; 17 | 18 | public interface AlgoServerWatchdogListener 19 | { 20 | void watchdogTriggered(); 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/dataprovider/PipelineServiceDefinition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.dataprovider; 17 | 18 | public interface PipelineServiceDefinition 19 | { 20 | String getName(); 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/dataprovider/PipelineService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.dataprovider; 17 | 18 | public interface PipelineService 19 | { 20 | PipelineServiceDefinition getDefinition(); 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/util/Configurable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.util; 17 | 18 | import java.util.Properties; 19 | 20 | public interface Configurable { 21 | void configure(Properties properties) throws Exception; 22 | } 23 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/gate/jmx/mbean/ExecutionFeedMBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gate.jmx.mbean; 17 | 18 | 19 | public interface ExecutionFeedMBean 20 | { 21 | String getName(); 22 | } 23 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/net/Transceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net; 17 | 18 | 19 | public interface Transceiver extends Transmitter, Receiver 20 | { 21 | void connect() throws Exception; 22 | void disconnect() throws Exception; 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/persistence/PersisterSettingsBlock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.persistence; 17 | 18 | import java.util.Map; 19 | 20 | public interface PersisterSettingsBlock 21 | { 22 | Map getSettingsInfo(); 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/net/Receiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net; 17 | 18 | import java.io.InputStream; 19 | 20 | public interface Receiver 21 | { 22 | InputStream getInput() throws Exception; 23 | void endInput() throws Exception; 24 | } 25 | -------------------------------------------------------------------------------- /quantfabric-server/src/main/java/com/quantfabric/algo/server/RpcServerFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.server; 17 | 18 | import com.quantfabric.net.rpc.RpcServer; 19 | 20 | public interface RpcServerFactory 21 | { 22 | RpcServer create(Object service); 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/commands/ManageOrderTrade.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.commands; 17 | 18 | public interface ManageOrderTrade extends ManageAcceptedOrder 19 | { 20 | String getTradeExecutionId(); 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/gate/jmx/mbean/MarketGatewayMBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gate.jmx.mbean; 17 | 18 | 19 | public interface MarketGatewayMBean 20 | { 21 | void connectToAll(); 22 | void disconnectAll(); 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/instrument/InstrumentProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.instrument; 17 | 18 | public interface InstrumentProvider 19 | { 20 | Instrument getInstrument(String id); 21 | Instrument getInstrumentBySymbol(String symbol); 22 | } 23 | -------------------------------------------------------------------------------- /quantfabric-xchange/src/main/java/com/quantfabric/market/connector/xchange/MarketDataSingleEventHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.market.connector.xchange; 17 | 18 | @FunctionalInterface 19 | public interface MarketDataSingleEventHandler { 20 | void accept(T event); 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/net/RequestHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net; 17 | 18 | import java.io.InputStream; 19 | import java.io.OutputStream; 20 | 21 | public interface RequestHandler 22 | { 23 | boolean handle (InputStream input, OutputStream output); 24 | } 25 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/net/stream/InputStreamObjectReader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net.stream; 17 | 18 | import java.io.IOException; 19 | 20 | public interface InputStreamObjectReader extends TypeRegistrator 21 | { 22 | Object read() throws IOException; 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/dataprovider/QueryDataViewRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.dataprovider; 17 | 18 | public interface QueryDataViewRequest extends DataViewRequest 19 | { 20 | String getQuery(); 21 | DataView getCustomDataView(); 22 | } 23 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/persistence/csv/CsvMetadata.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.persistence.csv; 17 | 18 | import java.util.Map; 19 | 20 | public interface CsvMetadata 21 | { 22 | String getSchemaName(); 23 | Map> getFields(); 24 | } 25 | -------------------------------------------------------------------------------- /quantfabric-strategyengine/src/main/java/com/quantfabric/algo/trading/execution/tradeMonitor/jmx/mbean/TradeMonitorMXBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.trading.execution.tradeMonitor.jmx.mbean; 17 | 18 | public interface TradeMonitorMXBean 19 | { 20 | String getTradeMonitorName(); 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/net/stream/InputStreamObjectReaderFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net.stream; 17 | 18 | import java.io.InputStream; 19 | 20 | public interface InputStreamObjectReaderFactory 21 | { 22 | InputStreamObjectReader create(InputStream input); 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/gate/jmx/mbean/InstrumentMBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gate.jmx.mbean; 17 | 18 | import com.quantfabric.algo.instrument.Instrument; 19 | 20 | public interface InstrumentMBean extends Instrument 21 | { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/commands/CommandExecutor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.commands; 17 | 18 | import java.rmi.Remote; 19 | 20 | 21 | public interface CommandExecutor extends Remote 22 | { 23 | void execute(Command command); 24 | boolean isReadyToExecution(); 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/dataprovider/DataSourceDescriptor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.dataprovider; 17 | 18 | import java.io.Serializable; 19 | 20 | public interface DataSourceDescriptor extends Serializable 21 | { 22 | String getDataSourceName(); 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/access/product/Description.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.access.product; 17 | 18 | import java.io.Serializable; 19 | 20 | public interface Description extends Serializable 21 | { 22 | String getInstrumentId(); 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/access/product/subscriber/Subscriber.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.access.product.subscriber; 17 | 18 | import com.quantfabric.net.stream.Event; 19 | 20 | public interface Subscriber 21 | { 22 | void update(Event event); 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/history/TimeFrameHistoryTable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.history; 17 | 18 | import java.io.Closeable; 19 | 20 | public interface TimeFrameHistoryTable extends TimeFrameHistoryRecorder, 21 | TimeFrameHistoryView, Closeable { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/net/Transmitter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net; 17 | 18 | import java.io.OutputStream; 19 | 20 | public interface Transmitter 21 | { 22 | boolean isReadyToTransmit(); 23 | OutputStream getOutput() throws Exception; 24 | void endOutput() throws Exception; 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-server/src/main/java/com/quantfabric/algo/server/qserver/CommandExecutor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.server.qserver; 17 | 18 | import com.quantfabric.algo.server.qserver.commands.ClientCommand; 19 | 20 | public interface CommandExecutor 21 | { 22 | boolean execute(ClientCommand command); 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/commands/ConcreteCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.commands; 17 | 18 | public interface ConcreteCommand extends Command 19 | { 20 | String DEFAULT_DESCRIPTION = null; 21 | void execute(CommandExecutor commandExecuter); 22 | String getDescription(); 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/access/product/publisher/Publisher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.access.product.publisher; 17 | 18 | public interface Publisher 19 | { 20 | void publish(Object dataBean) throws Exception; 21 | PublisherAddress getAddress(); 22 | } 23 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/access/product/publisher/PublisherManagersProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.access.product.publisher; 17 | 18 | public interface PublisherManagersProvider 19 | { 20 | PublishersManager getPublishersManager(String name); 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/net/rmi/RMIServiceReferenceParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net.rmi; 17 | 18 | import org.w3c.dom.Element; 19 | 20 | public interface RMIServiceReferenceParser 21 | { 22 | void setRoot(Element rootElement); 23 | RMIServiceReference getRmiServiceReference(); 24 | } 25 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/commands/SubmitOrder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.commands; 17 | 18 | import com.quantfabric.algo.order.TradeOrder; 19 | 20 | public interface SubmitOrder 21 | { 22 | TradeOrder getOrder(); 23 | void setOrder(TradeOrder order); 24 | } 25 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/access/security/Credentials.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.access.security; 17 | 18 | import java.io.Serializable; 19 | 20 | public interface Credentials extends Serializable 21 | { 22 | String getUsername(); 23 | String getPassword(); 24 | } 25 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/persistence/esper/ChangePersistingClassNameListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.persistence.esper; 17 | 18 | public interface ChangePersistingClassNameListener 19 | { 20 | void changedPersistingClassName( 21 | String origianlPersistingClassName, String newPersistingClassName); 22 | } -------------------------------------------------------------------------------- /quantfabric-strategyengine/src/main/java/com/quantfabric/algo/trading/execution/order/StrategyOrder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.trading.execution.order; 17 | 18 | public interface StrategyOrder 19 | { 20 | String getStrategyOrderReference(); 21 | //void setStrategyOrderReference(String strategyOrderReference); 22 | } 23 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/gate/jmx/mbean/MarketDataFeedMBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gate.jmx.mbean; 17 | 18 | public interface MarketDataFeedMBean 19 | { 20 | String getName(); 21 | String getInstrumentId(); 22 | String getChannel(); 23 | String getMarketDepth(); 24 | } 25 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/dataprovider/GatewayAgentsService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.dataprovider; 17 | 18 | import com.quantfabric.algo.market.gateway.access.agent.Agent; 19 | 20 | public interface GatewayAgentsService extends PipelineService { 21 | Agent getAgent(String name); 22 | } 23 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/access/subscription/SubscriptionResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.access.subscription; 17 | 18 | public enum SubscriptionResult 19 | { 20 | SUCCESS, 21 | ACCESS_DENIED, 22 | UNKNOWN_PRODUCT_CODE, 23 | UNAVAILABLE_CONTENT_TYPE, 24 | FAILURE 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/util/UnsupportedMDTypeForExchange.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.util; 17 | 18 | public class UnsupportedMDTypeForExchange extends RuntimeException{ 19 | public UnsupportedMDTypeForExchange() { 20 | } 21 | 22 | public UnsupportedMDTypeForExchange(String s) { 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-server/src/main/java/com/quantfabric/algo/server/jmx/AlgoHostMgmtMBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.server.jmx; 17 | 18 | import java.io.IOException; 19 | 20 | public interface AlgoHostMgmtMBean 21 | { 22 | void shutdown(); 23 | void start(); 24 | void stop(); 25 | boolean isServerStarted()throws IOException; 26 | } 27 | -------------------------------------------------------------------------------- /quantfabric-strategyengine/src/main/java/com/quantfabric/algo/trading/strategy/settings/viewlayout/LayoutDefinitionProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.trading.strategy.settings.viewlayout; 17 | 18 | import org.w3c.dom.Document; 19 | 20 | public interface LayoutDefinitionProvider { 21 | 22 | Document getLayoutDefinition(); 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/access/product/ContentType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.access.product; 17 | 18 | public enum ContentType 19 | { 20 | TOP_OF_BOOK, 21 | FULL_BOOK, 22 | COMPLEX_MARKET_VIEW, 23 | OHLC, 24 | TRADE_OHLC, 25 | COMPLEX_OHLC, 26 | INCREMENTAL_UPDATE 27 | } 28 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/messaging/NamedMapSubscriber.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.messaging; 17 | 18 | import java.util.Map; 19 | 20 | public interface NamedMapSubscriber extends Subscriber { 21 | void update(Map data, String dataTypeName); 22 | void update(Map[] data, String dataTypeName); 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-server/src/main/java/com/quantfabric/algo/server/TradingUnitAdministrationProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.server; 17 | 18 | public interface TradingUnitAdministrationProvider 19 | { 20 | boolean connectMarketConnection(String marketConnection); 21 | boolean disconnectMarketConnection(String marketConnection); 22 | } 23 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/dataprovider/FeedName.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.dataprovider; 17 | 18 | import java.io.Serializable; 19 | 20 | import com.quantfabric.messaging.TargetSubject; 21 | 22 | public interface FeedName extends TargetSubject, Serializable 23 | { 24 | String getName(); 25 | } 26 | 27 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/net/rmi/RMIServiceReference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net.rmi; 17 | 18 | import java.io.Serializable; 19 | 20 | public interface RMIServiceReference extends Serializable 21 | { 22 | String getRmiHost(); 23 | int getRmiPort(); 24 | String getRmiServiceName(); 25 | int getRmiServicePort(); 26 | } 27 | -------------------------------------------------------------------------------- /quantfabric-server/src/main/java/com/quantfabric/algo/server/Messages.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.server; 17 | 18 | public final class Messages { 19 | public final static String ERR_STR_ILLEGAL_START ="Can't start. The strategy is already running"; 20 | public final static String ERR_STR_ILLEGAL_STOP ="Can't stop no running strategy"; 21 | } 22 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/CreditLimit.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway; 17 | 18 | import com.quantfabric.algo.instrument.Instrument; 19 | 20 | public interface CreditLimit 21 | { 22 | double getLimitValue(); 23 | void setLimitValue(Double limitValue); 24 | Instrument getInstrument(); 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/dataprovider/HistoricalDataViewRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.dataprovider; 17 | 18 | public interface HistoricalDataViewRequest extends DataViewRequest 19 | { 20 | String getServiceReference(); 21 | String getFeedName(); 22 | String getTimeFrame(); 23 | int getDepth(); 24 | } 25 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/util/Formatter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.util; 17 | 18 | public class Formatter 19 | { 20 | public static double formatDouble(double value, int decimalNumbers) 21 | { 22 | double scaleValue = (int)Math.pow(10, decimalNumbers); 23 | return (double)Math.round(value * scaleValue) / scaleValue; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/provider/aggregator/AggregatorDefinition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.provider.aggregator; 17 | 18 | import java.util.Properties; 19 | 20 | public interface AggregatorDefinition 21 | { 22 | Class getAggregatorClass(); 23 | Properties getProperties(); 24 | } -------------------------------------------------------------------------------- /quantfabric-server/src/main/java/com/quantfabric/algo/server/TradingUnitProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.server; 17 | 18 | import com.quantfabric.util.Configurable; 19 | 20 | public interface TradingUnitProvider extends TradingUnit, Configurable 21 | { 22 | void load() throws Exception; 23 | boolean isLoaded(); 24 | boolean isConfigured(); 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-server/src/main/java/com/quantfabric/algo/server/qserver/commands/ClientCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.server.qserver.commands; 17 | 18 | import org.quickserver.net.server.ClientHandler; 19 | 20 | public interface ClientCommand 21 | { 22 | ClientHandler getClientHandler(); 23 | void setClientHandler(ClientHandler clientHandler); 24 | } 25 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/feed/ExecutionFeedCollection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.feed; 17 | 18 | public class ExecutionFeedCollection extends CashedByFeedIdFeedCollection 19 | { 20 | /** 21 | * 22 | */ 23 | private static final long serialVersionUID = 1343850412063641326L; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-server/src/main/java/com/quantfabric/algo/server/jmx/AlgoServerMgmtMBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.server.jmx; 17 | 18 | import java.rmi.Remote; 19 | import java.rmi.RemoteException; 20 | 21 | public interface AlgoServerMgmtMBean extends Remote 22 | { 23 | String ping() throws RemoteException; 24 | void shutdown() throws RemoteException; 25 | } 26 | 27 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/gate/access/rmi/RmiMarketDataService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gate.access.rmi; 17 | 18 | import java.rmi.Remote; 19 | 20 | import com.quantfabric.algo.market.gateway.access.MarketDataService; 21 | 22 | public interface RmiMarketDataService extends MarketDataService, Remote 23 | { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-server/src/main/java/com/quantfabric/algo/server/qserver/ClientContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.server.qserver; 17 | 18 | import org.quickserver.net.server.ClientData; 19 | 20 | public class ClientContext implements ClientData 21 | { 22 | 23 | /** 24 | * 25 | */ 26 | private static final long serialVersionUID = 7890905982576903086L; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/order/TrailingStopTradeOrder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.order; 17 | 18 | public class TrailingStopTradeOrder extends PeggedTradeOrder 19 | { 20 | /** 21 | * 22 | */ 23 | private static final long serialVersionUID = -1559541175564584680L; 24 | 25 | public TrailingStopTradeOrder() 26 | { 27 | super(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/gate/access/product/ProductManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gate.access.product; 17 | 18 | import com.quantfabric.algo.market.gateway.access.product.Product; 19 | 20 | public interface ProductManager 21 | { 22 | void addProduct(Product product); 23 | Product removeProduct(Product product); 24 | } 25 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/dataprovider/PipelineHistoryService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.dataprovider; 17 | 18 | import com.quantfabric.algo.market.datamodel.OHLCUpdate; 19 | 20 | public interface PipelineHistoryService extends PipelineService 21 | { 22 | OHLCUpdate[] getHistoricalBars( 23 | HistoricalDataViewRequest dataViewRequest); 24 | } -------------------------------------------------------------------------------- /quantfabric-strategyengine/src/main/java/com/quantfabric/algo/trading/strategy/ExecutionPoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.trading.strategy; 17 | 18 | public interface ExecutionPoint 19 | { 20 | String getTargetMarket(); 21 | String getConnection(); 22 | //public String getExecutionSettingByName(String settingName); 23 | boolean isActive(); 24 | boolean isEmbedded(); 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/InstrumentsManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway; 17 | 18 | import java.util.Collection; 19 | 20 | import com.quantfabric.algo.instrument.Instrument; 21 | 22 | public interface InstrumentsManager 23 | { 24 | void addInstrument(Instrument instrument); 25 | Collection getInstruments(); 26 | } 27 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/history/MultiTimeFrameHistoryProviderFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.history; 17 | 18 | public interface MultiTimeFrameHistoryProviderFactory 19 | { 20 | MultiTimeFrameHistoryProvider create(MultiTimeFrameHistoryProviderDefinition multiTimeFrameHistoryProviderDefinition, 21 | String name) throws Exception; 22 | } 23 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/util/CollectionHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.util; 17 | 18 | import java.util.List; 19 | 20 | public final class CollectionHelper 21 | { 22 | private CollectionHelper(){} 23 | 24 | public static void shrinkList(List list, int bound) 25 | { 26 | if (list.size() > bound) 27 | list.subList(bound, list.size()).clear(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/gate/jmx/mbean/MarketDataPipelineMBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gate.jmx.mbean; 17 | 18 | import java.util.Map; 19 | 20 | public interface MarketDataPipelineMBean 21 | { 22 | String getName(); 23 | void start(); 24 | void stop(); 25 | boolean isStrated(); 26 | Map getPipelineFeeds(); 27 | } 28 | -------------------------------------------------------------------------------- /quantfabric-strategyengine/src/main/java/com/quantfabric/algo/trading/strategy/StrategyRuntime.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.trading.strategy; 17 | 18 | import com.quantfabric.messaging.NamedMapSubscriber; 19 | 20 | 21 | public interface StrategyRuntime extends NamedMapSubscriber{ 22 | void activateDataSinks(); 23 | void deactivateDataSinks(); 24 | boolean validateEndPoints(); 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/access/subscription/SubscriptionOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.access.subscription; 17 | 18 | import java.io.Serializable; 19 | 20 | import com.quantfabric.algo.market.gateway.access.security.Credentials; 21 | 22 | public interface SubscriptionOptions extends Serializable 23 | { 24 | Credentials getCredentials(); 25 | } -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/history/MultiTimeFrameHistoryProviderDictionary.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.history; 17 | 18 | import com.quantfabric.algo.market.dataprovider.FeedReference; 19 | 20 | public interface MultiTimeFrameHistoryProviderDictionary 21 | { 22 | MultiTimeFrameHistoryProvider getMultiTimeFrameHistoryProvider(FeedReference feedReference); 23 | } 24 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/history/TimeFrameHistoryView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.history; 17 | 18 | import java.util.Collection; 19 | 20 | import com.quantfabric.algo.market.datamodel.OHLCValue; 21 | 22 | public interface TimeFrameHistoryView { 23 | OHLCValue[] getBars(int depth); 24 | OHLCValue getOpenBar(); 25 | Collection getGapIndexes(); 26 | } 27 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/dataprovider/DataViewRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.dataprovider; 17 | 18 | import java.util.Map; 19 | import java.util.Set; 20 | 21 | import com.quantfabric.messaging.TargetSubject; 22 | 23 | public interface DataViewRequest extends TargetSubject 24 | { 25 | Set getDependences(); 26 | Map getParameters(); 27 | } -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/runtime/RuntimeContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.runtime; 17 | 18 | public interface RuntimeContext { 19 | Object getProperty(String key); 20 | void setProperty(String key, Object value); 21 | Object getService(String klass); 22 | Object[] getServices(); 23 | void addService(Object service); 24 | void removeService(Object service); 25 | } 26 | 27 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/persistence/csv/CsvBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.persistence.csv; 17 | 18 | import java.util.List; 19 | 20 | //import org.supercsv.cellprocessor.ift.CellProcessor; 21 | 22 | public interface CsvBean 23 | { 24 | String getPersistingClassName(); 25 | int getFieldsCount(); 26 | List getValues(); 27 | //public CellProcessor[] getCellProcessors(); 28 | } 29 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/util/SessionId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.util; 17 | 18 | import java.util.Calendar; 19 | import java.util.UUID; 20 | 21 | public class SessionId 22 | { 23 | private static final String sessionId = Calendar.getInstance().getTime() + 24 | "@" + UUID.randomUUID(); 25 | 26 | public static String getSessionID() 27 | { 28 | return sessionId; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/gate/access/product/producer/Producer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gate.access.product.producer; 17 | 18 | import com.quantfabric.algo.market.gateway.access.product.ContentType; 19 | 20 | public interface Producer 21 | { 22 | ContentType getContentType(); 23 | Object[] produce(Object sourceData) throws ProducerException; 24 | } 25 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/feed/ExecutionFeed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.feed; 17 | 18 | 19 | public interface ExecutionFeed extends Feed 20 | { 21 | enum ExecutionType { 22 | ORDER_CHANGES, 23 | EXECUTION_REPORT 24 | } 25 | 26 | ExecutionType getExecutionType(); 27 | void setExecutionType(ExecutionType type); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/backtesting/manger/jmx/BackTestingManagerMXBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.backtesting.manger.jmx; 17 | 18 | public interface BackTestingManagerMXBean 19 | { 20 | void clearAllPersisterStorages(); 21 | void playBackTestingMarketData(); 22 | void stopBackTestingMarketData(); 23 | void reloadExecution(); 24 | void updateRunId(); 25 | String getRunId(); 26 | } 27 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/access/product/publisher/PublishersManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.access.product.publisher; 17 | 18 | import com.quantfabric.algo.market.gateway.access.product.ContentType; 19 | 20 | public interface PublishersManager 21 | { 22 | String getName(); 23 | Publisher getPublisher(String productCode, ContentType contentType); 24 | } 25 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/provider/aggregator/MarketViewAggregatorListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.provider.aggregator; 17 | 18 | public interface MarketViewAggregatorListener 19 | { 20 | void update(MarketViewAggregator source, Object event, boolean forceProcessing); 21 | void update(MarketViewAggregator source, Object[] events, boolean forceProcessing); 22 | } 23 | -------------------------------------------------------------------------------- /quantfabric-indicators/src/main/java/com/quantfabric/algo/cep/indicators/cycleidentifier/CImode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.cep.indicators.cycleidentifier; 17 | 18 | public class CImode 19 | { 20 | public static final int MAJORBUY = 1; 21 | public static final int MINORBUY = 2; 22 | public static final int MAJORSELL = -1; 23 | public static final int MINORSELL = -2; 24 | public static final int NOCYCLE = 0; 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-server/src/main/java/com/quantfabric/algo/server/process/ProcessWatcherHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.server.process; 17 | 18 | public interface ProcessWatcherHandler { 19 | void started(Process process); 20 | void stdout(Process process,String line); 21 | void stderr(Process process,String line); 22 | void ended(Process process,int value); 23 | void error(Process process,Throwable th); 24 | } 25 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/MarketFeeder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway; 17 | 18 | import com.quantfabric.algo.market.dataprovider.FeedName; 19 | import com.quantfabric.messaging.Publisher; 20 | import com.quantfabric.messaging.Subscriber; 21 | 22 | public interface MarketFeeder extends Publisher,FeedName,Object> 23 | { 24 | String getIdentifier(); 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/access/agent/AgentFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.access.agent; 17 | 18 | import java.util.Properties; 19 | 20 | import com.quantfabric.util.PropertiesViewer.NotSpecifiedProperty; 21 | 22 | 23 | public interface AgentFactory { 24 | Agent createAgent(String agentName, Properties gatewayAgentProperties) throws NotSpecifiedProperty; 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-indicators/src/main/java/com/quantfabric/algo/cep/indicators/ohlc/OHLCUpdateListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.cep.indicators.ohlc; 17 | 18 | import com.quantfabric.algo.market.datamodel.ComplexAccumulatedOHLC; 19 | import com.quantfabric.algo.market.datamodel.OHLCValue; 20 | 21 | public interface OHLCUpdateListener 22 | { 23 | void update(OHLCValue value); 24 | void update(ComplexAccumulatedOHLC value); 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/net/rpc/RpcServer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net.rpc; 17 | 18 | import com.quantfabric.net.RequestHandler; 19 | 20 | public abstract class RpcServer implements RequestHandler 21 | { 22 | private final Object service; 23 | 24 | public RpcServer(Object service) 25 | { 26 | this.service = service; 27 | } 28 | 29 | public Object getService() 30 | { 31 | return service; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/persistence/esper/EsperEventPersister.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.persistence.esper; 17 | 18 | import com.espertech.esper.client.EventBean; 19 | import com.quantfabric.persistence.StorageProvider.StoragingException; 20 | 21 | public interface EsperEventPersister 22 | { 23 | void persistEvent(EventBean eventBean) throws StoragingException; 24 | void dispose() throws StoragingException; 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/dataprovider/FeedReference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.dataprovider; 17 | 18 | public interface FeedReference 19 | { 20 | boolean DEFAULT_ENABLE_STATUS = true; 21 | 22 | boolean isEnable(); 23 | void setEnable(boolean enable); 24 | boolean isConnected(); 25 | void setConnected(boolean connected); 26 | FeedName getFeedName(); 27 | String getConnectionName(); 28 | } 29 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/MarketGatewayManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway; 17 | 18 | 19 | public interface MarketGatewayManager 20 | extends 21 | MarketConnectionsManager, 22 | MarketDataPipelinesManager, 23 | InstrumentsManager 24 | { 25 | boolean isConnectionAutoStart(String name); 26 | 27 | void connectToAll(boolean onlyAutoConnect); 28 | void disconnectAll(); 29 | } 30 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/util/timeframes/MinutesTimeframe.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.util.timeframes; 17 | 18 | import java.util.Date; 19 | 20 | public class MinutesTimeframe extends Timeframe 21 | { 22 | public Interval interval(Date referenceDate) { 23 | 24 | return interval(referenceDate, 0); 25 | } 26 | 27 | @Override 28 | public int getLengthInSeconds() 29 | { 30 | return intervalLength() * 60; 31 | } 32 | } -------------------------------------------------------------------------------- /quantfabric-gatewayagent/src/main/java/com/quantfabric/algo/market/gateway/access/remote/DefaultGatewayAgent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.access.remote; 17 | 18 | public class DefaultGatewayAgent extends GatewayAgent 19 | { 20 | public DefaultGatewayAgent(String agentName, String host, String rmiServiceName) 21 | { 22 | super(agentName, new RmiGatewayConnector(host, rmiServiceName), new ZMQGatewayFeeder()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/dataprovider/orderbook/OrderBookInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.dataprovider.orderbook; 17 | 18 | import com.quantfabric.algo.market.dataprovider.FeedName; 19 | 20 | public interface OrderBookInfo 21 | { 22 | enum OrderBookTypes 23 | { 24 | BID_BOOK, 25 | OFFER_BOOK, 26 | TRADE 27 | } 28 | 29 | FeedName getFeedName(); 30 | OrderBookTypes getOrderBookType(); 31 | } 32 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/MarketConnectionsManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway; 17 | 18 | import java.util.Collection; 19 | 20 | public interface MarketConnectionsManager 21 | { 22 | void addConnection(MarketConnection connection); 23 | void removeConnection(String name); 24 | 25 | Collection getConnections(); 26 | MarketConnection getConnection(String name); 27 | } 28 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/feed/FeedProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.feed; 17 | 18 | public interface FeedProvider extends ExecutionFeedProvider, MarketDataFeedProvider 19 | { 20 | void addFeed(MarketDataFeed feed); 21 | void addFeed(ExecutionFeed feed); 22 | void removeFeed(MarketDataFeed feed); 23 | void removeFeed(ExecutionFeed feed); 24 | 25 | Feed getFeed(int feedId); 26 | } 27 | -------------------------------------------------------------------------------- /quantfabric-strategyengine/src/main/java/com/quantfabric/algo/trading/strategy/MarketUpdatesDataStreamPoster.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.trading.strategy; 17 | 18 | import com.quantfabric.algo.market.datamodel.ComplexMarketView; 19 | import com.quantfabric.algo.market.datamodel.MDOrderBook; 20 | 21 | public interface MarketUpdatesDataStreamPoster 22 | { 23 | void post(ComplexMarketView marketView); 24 | void post(MDOrderBook orderBook); 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/commands/ManageAcceptedOrder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.commands; 17 | 18 | import com.quantfabric.algo.order.TradeOrder; 19 | 20 | public interface ManageAcceptedOrder 21 | { 22 | TradeOrder getOrder(); 23 | void setOrder(TradeOrder order); 24 | String getInstitutionOrderReference(); 25 | void setInstitutionOrderReference(String institutionOrderReference); 26 | } 27 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/util/timeframes/TimeframeException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.util.timeframes; 17 | 18 | public class TimeframeException extends RuntimeException 19 | { 20 | 21 | private static final long serialVersionUID = 1L; 22 | 23 | public TimeframeException(String msg, Throwable cause) 24 | { 25 | super(msg, cause); 26 | } 27 | 28 | public TimeframeException(String msg) 29 | { 30 | super(msg); 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/MarketDataPipelineFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway; 17 | 18 | import com.quantfabric.algo.market.dataprovider.MarketDataPipeline; 19 | 20 | public interface MarketDataPipelineFactory 21 | { 22 | MarketDataPipeline createMDPipeline(String name, boolean singleThread); 23 | MarketDataPipeline createMDPipeline(String name, String pipelineClassName, boolean singleThread); 24 | } 25 | -------------------------------------------------------------------------------- /quantfabric-gatewayagent/src/main/java/com/quantfabric/algo/market/gateway/access/remote/GatewayConnector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.access.remote; 17 | 18 | import com.quantfabric.algo.market.gateway.access.MarketDataService; 19 | import com.quantfabric.algo.market.gateway.access.agent.exceptions.RemoteGatewayException; 20 | 21 | public interface GatewayConnector 22 | { 23 | MarketDataService connect() throws RemoteGatewayException; 24 | } 25 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/commands/UnsubscribeCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.commands; 17 | 18 | import com.quantfabric.algo.market.gateway.feed.MarketDataFeed; 19 | 20 | public class UnsubscribeCommand extends SubscribeCommand 21 | { 22 | public UnsubscribeCommand() 23 | { 24 | super(); 25 | } 26 | 27 | public UnsubscribeCommand(MarketDataFeed feed) 28 | { 29 | super(feed); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /quantfabric-strategyengine/src/main/java/com/quantfabric/algo/trading/execution/jmx/ExecutionMgmt.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.trading.execution.jmx; 17 | 18 | public class ExecutionMgmt implements ExecutionMXBean 19 | { 20 | @SuppressWarnings("unused") 21 | private final ExecutionJMXService executionJMXService; 22 | 23 | public ExecutionMgmt(ExecutionJMXService executionJMXService) 24 | { 25 | this.executionJMXService = executionJMXService; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/backtesting/virtualcoin/VirtualCoinBackTestingMarketAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.backtesting.virtualcoin; 17 | 18 | import com.quantfabric.algo.backtesting.BackTestingMarketAdapter; 19 | 20 | 21 | public class VirtualCoinBackTestingMarketAdapter extends BackTestingMarketAdapter { 22 | 23 | public VirtualCoinBackTestingMarketAdapter() { 24 | super(new VirtualCoinBackTestingCommandFactory()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/feed/ExecutionFeedProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.feed; 17 | 18 | import com.quantfabric.algo.market.dataprovider.FeedName; 19 | 20 | import java.util.Collection; 21 | 22 | public interface ExecutionFeedProvider 23 | { 24 | Collection getExecutionFeeds(); 25 | ExecutionFeed getExecutionFeed(int feedId); 26 | ExecutionFeed getExecutionFeed(FeedName feedName); 27 | } 28 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/history/MultiTimeFrameHistoryProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.history; 17 | 18 | import java.io.Closeable; 19 | 20 | import com.quantfabric.algo.market.dataprovider.PipelineService; 21 | 22 | public interface MultiTimeFrameHistoryProvider extends PipelineService, Closeable{ 23 | TimeFrameHistoryTable getTimeFrameHandler(TimeFrame tf); 24 | MultiTimeFrameHistoryProviderDefinition getDefinition(); 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-server/src/main/java/com/quantfabric/algo/server/HostManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.server; 17 | 18 | import java.util.Set; 19 | 20 | public interface HostManager 21 | { 22 | Set getAvailableUnitConfigurations(); 23 | 24 | Set getUnits(); 25 | NodeProvider getUnit(String unitName); 26 | String getUnitDescription(String unitName); 27 | 28 | void createUnit(String name, String configuration); 29 | void removeUnit(String name); 30 | } 31 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/persistence/ConsoleStorageProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.persistence; 17 | 18 | import org.slf4j.Logger; 19 | import org.slf4j.LoggerFactory; 20 | 21 | 22 | public abstract class ConsoleStorageProvider extends BaseStorageProvider 23 | { 24 | private static final Logger log = LoggerFactory.getLogger(ConsoleStorageProvider.class); 25 | public void store(Object object) 26 | { 27 | log.debug(object.toString()); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/access/product/Connector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.access.product; 17 | 18 | import com.quantfabric.algo.market.gateway.access.product.publisher.PublisherAddress; 19 | import com.quantfabric.algo.market.gateway.access.product.subscriber.Subscriber; 20 | 21 | public interface Connector 22 | { 23 | void connect(PublisherAddress endpoint, Subscriber subscriber) throws Exception; 24 | void close() throws Exception; 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/commands/UpdatePeggedOrderCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.commands; 17 | 18 | import com.quantfabric.algo.order.TradeOrder; 19 | 20 | public class UpdatePeggedOrderCommand 21 | extends ReplaceOrderCommand 22 | implements UpdatePeggedOrder 23 | { 24 | public UpdatePeggedOrderCommand() 25 | { 26 | super(); 27 | } 28 | 29 | public UpdatePeggedOrderCommand(TradeOrder order) 30 | { 31 | super(order); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/history/MultiTimeFrameHistoryProviderDefinition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.history; 17 | 18 | import java.util.Properties; 19 | 20 | import com.quantfabric.algo.market.dataprovider.PipelineServiceDefinition; 21 | 22 | public interface MultiTimeFrameHistoryProviderDefinition extends PipelineServiceDefinition 23 | { 24 | Class getFactoryClass(); 25 | String getStorage(); 26 | Properties getProperties(); 27 | } -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/net/stream/kryo/KryoFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net.stream.kryo; 17 | 18 | import com.esotericsoftware.kryo.Kryo; 19 | 20 | public class KryoFactory 21 | { 22 | public static Kryo create() 23 | { 24 | Kryo kryo = new Kryo(); 25 | registerDefaultTypes(kryo); 26 | return kryo; 27 | } 28 | 29 | private static void registerDefaultTypes(Kryo kryo) 30 | { 31 | kryo.register(java.util.Date.class); 32 | kryo.register(java.util.ArrayList.class); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | com.quantfabric.algo 5 | quantfabric 6 | 0.0.1-SNAPSHOT 7 | 8 | quantfabric-marketgateway 9 | 10 | 11 | com.quantfabric.algo 12 | quantfabric-core 13 | 14 | 15 | com.quantfabric.algo 16 | quantfabric-indicators 17 | 18 | 19 | 20 | 21 | 22 | org.apache.maven.plugins 23 | maven-surefire-plugin 24 | 2.16 25 | 26 | true 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/gate/access/MarketDataServiceHost.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gate.access; 17 | 18 | import com.quantfabric.algo.market.gate.access.product.ProductManager; 19 | import com.quantfabric.algo.market.gateway.access.MarketDataService; 20 | 21 | public interface MarketDataServiceHost extends MarketDataService, ProductManager 22 | { 23 | String getServiceHostName(); 24 | 25 | void start() throws Exception; 26 | void stop() throws Exception; 27 | } 28 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/MarketConnectionFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway; 17 | 18 | import java.util.Properties; 19 | 20 | public interface MarketConnectionFactory 21 | { 22 | MarketConnection createConnection(String name, MarketConnectionSettings settings) throws MarketGatewayException; 23 | MarketConnection createConnection(String name, String provider,Properties settings,Properties credentials, boolean autoConnect) throws MarketGatewayException; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/persistence/test/TestBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.persistence.test; 17 | 18 | public class TestBean 19 | { 20 | private int intValue; 21 | 22 | public TestBean() 23 | { 24 | this(0); 25 | } 26 | 27 | public TestBean(int intValue) 28 | { 29 | super(); 30 | this.intValue = intValue; 31 | } 32 | 33 | public int getIntValue() 34 | { 35 | return intValue; 36 | } 37 | 38 | public void setIntValue(int intValue) 39 | { 40 | this.intValue = intValue; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/MarketDataPipelinesManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway; 17 | 18 | import java.util.Collection; 19 | 20 | import com.quantfabric.algo.market.dataprovider.MarketDataPipeline; 21 | 22 | public interface MarketDataPipelinesManager 23 | { 24 | void addMDPipeline(MarketDataPipeline pipeline); 25 | void removeMDPipeline(String name); 26 | 27 | Collection getMDPipelines(); 28 | MarketDataPipeline getMDPipeline(String name); 29 | } 30 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/feed/MarketDataFeedProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.feed; 17 | 18 | import java.util.Collection; 19 | 20 | import com.quantfabric.algo.market.dataprovider.FeedName; 21 | 22 | public interface MarketDataFeedProvider 23 | { 24 | Collection getMarketDataFeeds(); 25 | MarketDataFeed getMarketDataFeed(int feedId); 26 | MarketDataFeed getMarketDataFeed(String symbol); 27 | MarketDataFeed getMarketDataFeed(FeedName feedName); 28 | } 29 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/gate/access/product/producer/ProducerFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gate.access.product.producer; 17 | 18 | import com.quantfabric.algo.market.provider.aggregator.MarketViewAggregator; 19 | import com.quantfabric.algo.market.gateway.access.product.ContentType; 20 | 21 | public interface ProducerFactory 22 | { 23 | Producer createProducer(String productCode, ContentType contentType, 24 | Class aggregatorType); 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-server/src/main/resources/quantfabricAlgo.cfg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 26 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/feed/CachableFeedCollection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.feed; 17 | 18 | import com.quantfabric.algo.market.dataprovider.FeedName; 19 | 20 | public abstract class CachableFeedCollection 21 | extends CachedHashMap 22 | { 23 | /** 24 | * 25 | */ 26 | private static final long serialVersionUID = -566771959861437637L; 27 | 28 | public T get(FeedName key) 29 | { 30 | return super.get(key); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/net/rpc/RpcClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net.rpc; 17 | 18 | import com.quantfabric.net.Transceiver; 19 | 20 | public abstract class RpcClient 21 | { 22 | private final Transceiver transceiver; 23 | 24 | public RpcClient(Transceiver transceiver) 25 | { 26 | this.transceiver = transceiver; 27 | } 28 | 29 | public Transceiver getTransceiver() 30 | { 31 | return transceiver; 32 | } 33 | 34 | public abstract T getProxyObject(Class proxyInterface) throws Exception; 35 | } 36 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/gate/access/product/producer/ProducerException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gate.access.product.producer; 17 | 18 | public class ProducerException extends Exception 19 | { 20 | private static final long serialVersionUID = -7736477355648789202L; 21 | 22 | public ProducerException(String message, Throwable cause) 23 | { 24 | super(message, cause); 25 | } 26 | 27 | public ProducerException(String message) 28 | { 29 | super(message); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/access/agent/exceptions/GatewayAgentException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.access.agent.exceptions; 17 | 18 | public class GatewayAgentException extends Exception 19 | { 20 | private static final long serialVersionUID = 5365572441262444995L; 21 | 22 | public GatewayAgentException(String message, Throwable cause) 23 | { 24 | super(message, cause); 25 | } 26 | 27 | public GatewayAgentException(String message) 28 | { 29 | super(message); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/access/agent/exceptions/RemoteGatewayException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.access.agent.exceptions; 17 | 18 | public class RemoteGatewayException extends Exception 19 | { 20 | private static final long serialVersionUID = -1673547282973846957L; 21 | 22 | public RemoteGatewayException(String message, Throwable cause) 23 | { 24 | super(message, cause); 25 | } 26 | 27 | public RemoteGatewayException(String message) 28 | { 29 | super(message); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /quantfabric-strategyengine/src/main/java/com/quantfabric/algo/trading/execution/commands/RejectTradeStrategyOrderCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.trading.execution.commands; 17 | 18 | public class RejectTradeStrategyOrderCommand extends ManageStrategyOrderSoftFillCommand 19 | { 20 | public RejectTradeStrategyOrderCommand() 21 | { 22 | super(); 23 | } 24 | 25 | public RejectTradeStrategyOrderCommand(String originalOrderReference, 26 | String fillExecutionId) 27 | { 28 | super(originalOrderReference, fillExecutionId); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/OrderBookSnapshotsProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway; 17 | 18 | import com.quantfabric.algo.market.dataprovider.FeedName; 19 | import com.quantfabric.algo.market.dataprovider.orderbook.processor.OrderBookSnapshotListener; 20 | 21 | public interface OrderBookSnapshotsProvider 22 | { 23 | void addOrderBookSnapshotListener (FeedName feedName, OrderBookSnapshotListener listener); 24 | void removeOrderBookSnapshotListener (FeedName feedName, String listenerName); 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/cep/UpdateConsoleWriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.cep; 17 | 18 | import com.quantfabric.persistence.esper.AsynchronEsperEventPersister; 19 | import com.quantfabric.persistence.esper.EsperConsoleStorageProvider; 20 | import com.quantfabric.persistence.esper.PersistingUpdateListener; 21 | 22 | public class UpdateConsoleWriter extends PersistingUpdateListener 23 | { 24 | public UpdateConsoleWriter() 25 | { 26 | super("Console", new AsynchronEsperEventPersister(new EsperConsoleStorageProvider())); 27 | } 28 | } -------------------------------------------------------------------------------- /quantfabric-strategyengine/src/main/java/com/quantfabric/algo/trading/strategy/views/SettingsView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.trading.strategy.views; 17 | 18 | import com.quantfabric.algo.trading.strategy.BaseTradingStrategy; 19 | import com.quantfabric.algo.trading.strategy.settings.StrategySetting; 20 | 21 | public class SettingsView 22 | { 23 | public static StrategySetting[] getStrategySettings(String strategyId) 24 | { 25 | return BaseTradingStrategy.getStrategy(strategyId).getSettings().values().toArray(new StrategySetting[]{}); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/gate/access/product/producer/AbstractProducer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gate.access.product.producer; 17 | 18 | public abstract class AbstractProducer implements Producer 19 | { 20 | @Override 21 | public PT[] produce(Object sourceData) throws ProducerException 22 | { 23 | return make(cast(sourceData)); 24 | } 25 | 26 | protected abstract ST cast(Object sourceData) throws ProducerException; 27 | public abstract PT[] make(ST sourceData) throws ProducerException; 28 | } 29 | -------------------------------------------------------------------------------- /quantfabric-strategyengine/src/main/java/com/quantfabric/algo/trading/execution/commands/ConfirmTradeStrategyOrderCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.trading.execution.commands; 17 | 18 | public class ConfirmTradeStrategyOrderCommand extends ManageStrategyOrderSoftFillCommand 19 | { 20 | 21 | public ConfirmTradeStrategyOrderCommand() 22 | { 23 | super(); 24 | } 25 | 26 | public ConfirmTradeStrategyOrderCommand(String originalOrderReference, 27 | String fillExecutionId) 28 | { 29 | super(originalOrderReference, fillExecutionId); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/access/product/Product.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.access.product; 17 | 18 | import java.io.Serializable; 19 | import java.util.Set; 20 | 21 | import com.quantfabric.algo.market.gateway.access.product.publisher.PublisherAddress; 22 | 23 | public interface Product extends Serializable 24 | { 25 | String getProductCode(); 26 | Description getDescription(); 27 | Set getAvailableContentTypes(); 28 | PublisherAddress getPublisherAddress(ContentType contentType); 29 | } 30 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/cep/QuantfabricCEPException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.cep; 17 | 18 | import com.quantfabric.util.QuantfabricException; 19 | 20 | public class QuantfabricCEPException extends QuantfabricException { 21 | 22 | /** 23 | * 24 | */ 25 | private static final long serialVersionUID = -808062712562131913L; 26 | 27 | public QuantfabricCEPException(String message, Throwable cause) { 28 | super(message, cause); 29 | } 30 | 31 | public QuantfabricCEPException(String message) { 32 | super(message); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/history/TimeFrameHistoryRecorder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.history; 17 | 18 | import com.quantfabric.algo.market.datamodel.OHLCValue; 19 | 20 | 21 | public interface TimeFrameHistoryRecorder { 22 | 23 | void addBar(int open, long openSourceTimestamp, 24 | int high, long highSourceTimestamp, 25 | int low, long lowSourceTimestamp, 26 | int close,long closeSourceTimestamp, 27 | boolean closed); 28 | 29 | void addBar(OHLCValue ohlcValue); 30 | void replaceBar(OHLCValue ohlcValue); 31 | } 32 | -------------------------------------------------------------------------------- /quantfabric-marketgateway/src/main/java/com/quantfabric/algo/market/provider/StatementProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.provider; 17 | 18 | import com.quantfabric.cep.StatementDefinition; 19 | import com.quantfabric.messaging.NamedMapSubscriber; 20 | 21 | public interface StatementProvider { 22 | void attachSubscriber(NamedMapSubscriber subscriber,String statement) throws Exception; 23 | void detachSubscriber(NamedMapSubscriber subscriber, String statement); 24 | void registerStatement(StatementDefinition statement) throws Exception; 25 | } 26 | -------------------------------------------------------------------------------- /quantfabric-strategyengine/src/main/java/com/quantfabric/algo/trading/strategy/DataSinkInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.trading.strategy; 17 | 18 | import com.quantfabric.algo.market.dataprovider.DataViewRequest; 19 | 20 | public interface DataSinkInfo 21 | { 22 | boolean isActive(); 23 | //void setActive(boolean isActive); 24 | //void setName(String name); 25 | String getName(); 26 | //void setObservation(DataViewRequest observation); 27 | DataViewRequest getObservation(); 28 | String getPipeline(); 29 | //void setPipeline(String pipeline); 30 | boolean isEmbedded(); 31 | } 32 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/backtesting/player/track/TrackInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.backtesting.player.track; 17 | 18 | 19 | public class TrackInfo 20 | { 21 | public static final int DEFAULT_TRACK_NUMBER = 0; 22 | 23 | private int trackNumber; 24 | 25 | public TrackInfo(int trackNumber) 26 | { 27 | super(); 28 | this.trackNumber = trackNumber; 29 | } 30 | 31 | public int getTrackNumber() 32 | { 33 | return trackNumber; 34 | } 35 | 36 | public void setTrackNumber(int trackNumber) 37 | { 38 | this.trackNumber = trackNumber; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/feed/CashedByFeedIdFeedCollection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.feed; 17 | 18 | public class CashedByFeedIdFeedCollection 19 | extends CachableFeedCollection 20 | { 21 | /** 22 | * 23 | */ 24 | private static final long serialVersionUID = 4552491440995482975L; 25 | 26 | 27 | public T get(int key) 28 | { 29 | return getByCashKey(key); 30 | } 31 | 32 | @Override 33 | protected Integer getCachedKey(T feed) 34 | { 35 | return feed.getFeedId(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /quantfabric-core/src/test/java/com/quantfabric/net/stream/json/JsonAlgoHostListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net.stream.json; 17 | 18 | import com.quantfabric.net.Receiver; 19 | import com.quantfabric.net.stream.ZMQReceiver; 20 | 21 | public class JsonAlgoHostListener 22 | { 23 | public static void main(String[] args) throws Exception 24 | { 25 | Receiver receiver = new ZMQReceiver("localhost", 5555); 26 | JsonStreamClient streamClient = new JsonStreamClient(receiver); 27 | 28 | while(true) 29 | { 30 | System.out.println(streamClient.read()); 31 | } 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/dataprovider/orderbook/OrderBookView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.dataprovider.orderbook; 17 | 18 | import java.util.List; 19 | 20 | import com.quantfabric.algo.market.datamodel.MDPrice; 21 | import com.quantfabric.algo.market.datamodel.MDTrade; 22 | 23 | public interface OrderBookView extends OrderBookInfo, Cloneable 24 | { 25 | MDPrice getTop(); 26 | MDTrade getTrade(); 27 | MDPrice getLevel2(); 28 | MDPrice getLevel3(); 29 | List getAllLevels(); 30 | long getSourceTimestamp(); 31 | OrderBookView clone(); 32 | } 33 | -------------------------------------------------------------------------------- /quantfabric-indicators/src/test/java/com/quantfabric/algo/cep/indicators/Log4j.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.cep.indicators; 17 | 18 | import org.apache.log4j.ConsoleAppender; 19 | import org.apache.log4j.Level; 20 | import org.apache.log4j.Logger; 21 | import org.apache.log4j.PatternLayout; 22 | 23 | public class Log4j 24 | { 25 | public static void init() 26 | { 27 | Logger.getRootLogger().addAppender(new ConsoleAppender(new PatternLayout("%d{ABSOLUTE} [%t] %-5p %c{1} - %m%n"), ConsoleAppender.SYSTEM_OUT)); 28 | Logger.getLogger("com.espertech.esper").setLevel(Level.INFO); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /quantfabric-indicators/src/main/java/com/quantfabric/algo/cep/indicators/AbstractPlugInViewParameters.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.cep.indicators; 17 | 18 | import com.quantfabric.algo.cep.indicators.util.ViewAdditionalProps; 19 | 20 | public class AbstractPlugInViewParameters 21 | { 22 | private final ViewAdditionalProps additionalProps; 23 | 24 | public AbstractPlugInViewParameters(ViewAdditionalProps additionalProps) 25 | { 26 | this.additionalProps = additionalProps; 27 | } 28 | 29 | public ViewAdditionalProps getAdditionalProps() 30 | { 31 | return additionalProps; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/persistence/util/MapWrapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.persistence.util; 17 | 18 | import java.lang.reflect.InvocationTargetException; 19 | 20 | public class MapWrapper extends PropertyWrapper 21 | { 22 | 23 | public MapWrapper(String name, Class valueType, PropertyWrapper parent) 24 | { 25 | super(name, valueType, parent); 26 | } 27 | 28 | @Override 29 | public Object getValue(Object rootObject) throws IllegalArgumentException, 30 | IllegalAccessException, InvocationTargetException 31 | { 32 | return rootObject.toString(); 33 | } 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/commands/CancelOrderCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.commands; 17 | 18 | import com.quantfabric.algo.order.TradeOrder; 19 | 20 | public class CancelOrderCommand extends BaseManageAcceptedOrder implements CancelOrder 21 | { 22 | public CancelOrderCommand() 23 | { 24 | super(); 25 | } 26 | 27 | public CancelOrderCommand(TradeOrder order) 28 | { 29 | super(order); 30 | } 31 | 32 | public CancelOrderCommand(TradeOrder order, String institutionOrderReference) 33 | { 34 | super(order, institutionOrderReference); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/net/stream/kryo/KryoSupport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net.stream.kryo; 17 | 18 | import com.esotericsoftware.kryo.Kryo; 19 | import com.quantfabric.net.stream.TypeRegistrator; 20 | 21 | public class KryoSupport implements TypeRegistrator 22 | { 23 | private final Kryo kryo; 24 | 25 | public KryoSupport() 26 | { 27 | this.kryo = KryoFactory.create(); 28 | } 29 | 30 | @Override 31 | public void registerType(String name, Class type) 32 | { 33 | this.kryo.register(type); 34 | } 35 | 36 | public Kryo getKryo() 37 | { 38 | return this.kryo; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /quantfabric-core/src/test/java/com/quantfabric/net/stream/json/JsonStreamClientTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net.stream.json; 17 | 18 | import com.quantfabric.net.Receiver; 19 | import com.quantfabric.net.stream.Client; 20 | import com.quantfabric.net.stream.ZMQReceiver; 21 | 22 | public class JsonStreamClientTest 23 | { 24 | public static void main(String[] args) throws Exception 25 | { 26 | Receiver receiver = new ZMQReceiver("localhost", 7777); 27 | JsonStreamClient streamClient = new JsonStreamClient(receiver); 28 | 29 | Client client = new Client(streamClient, false); 30 | client.start(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /quantfabric-core/src/test/java/com/quantfabric/net/stream/kryo/KryoStreamClientTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.net.stream.kryo; 17 | 18 | import com.quantfabric.net.Receiver; 19 | import com.quantfabric.net.stream.Client; 20 | import com.quantfabric.net.stream.ZMQReceiver; 21 | 22 | public class KryoStreamClientTest 23 | { 24 | public static void main(String[] args) throws Exception 25 | { 26 | Receiver receiver = new ZMQReceiver("localhost", 7777); 27 | KryoStreamClient streamClient = new KryoStreamClient(receiver); 28 | 29 | Client client = new Client(streamClient, true); 30 | client.start(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /quantfabric-strategyengine/src/main/java/com/quantfabric/algo/trading/strategy/DataSink.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.trading.strategy; 17 | 18 | import com.quantfabric.algo.market.dataprovider.DataViewRequest; 19 | import com.quantfabric.messaging.SubscriberBuffer; 20 | 21 | public interface DataSink extends DataSinkInfo 22 | { 23 | void setSubscriberBuffer(SubscriberBuffer subscriberBuffer); 24 | SubscriberBuffer getSubscriberBuffer(); 25 | 26 | void setActive(boolean isActive); 27 | void setName(String name); 28 | void setObservation(DataViewRequest observation); 29 | void setPipeline(String pipeline); 30 | } -------------------------------------------------------------------------------- /quantfabric-xchange/src/main/java/com/quantfabric/market/connector/xchange/exception/EmptyPropertiesException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.market.connector.xchange.exception; 17 | 18 | public class EmptyPropertiesException extends RuntimeException{ 19 | 20 | public EmptyPropertiesException() { 21 | super("Adapter setting was not configured correctly: " + 22 | "please add subscribeType with polling\\pushing value to the .xml file. " + 23 | "The type is set to polling by default."); 24 | } 25 | 26 | public EmptyPropertiesException(String s) { 27 | super(s); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/instrument/Instrument.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.instrument; 17 | 18 | import java.io.Serializable; 19 | import java.math.BigDecimal; 20 | 21 | public interface Instrument extends Serializable 22 | { 23 | String getId(); 24 | String getSymbol(); 25 | 26 | int getPointsInOne(); 27 | long castToLong(double price); 28 | 29 | long castToLong(BigDecimal price); 30 | 31 | double castToDecimal(long price); 32 | 33 | //FIXME move to specific type for Currency Exchange istrument 34 | //@Deprecated 35 | String getBase(); 36 | //@Deprecated 37 | String getLocal(); 38 | } 39 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/gateway/feed/MarketDataFeedCollection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.gateway.feed; 17 | 18 | public class MarketDataFeedCollection extends DoubleCachedFeedCollection 19 | { 20 | /** 21 | * 22 | */ 23 | private static final long serialVersionUID = 5909602175747212877L; 24 | 25 | public MarketDataFeed get(String symbol) 26 | { 27 | return getBySecondCashKey(symbol); 28 | } 29 | 30 | @Override 31 | protected String getSecondCashedKey(MarketDataFeed value) 32 | { 33 | return value.getInstrument().getSymbol(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/backtesting/eventbus/BackTestingEventListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.backtesting.eventbus; 17 | 18 | import java.util.EventListener; 19 | 20 | import com.quantfabric.algo.backtesting.eventbus.events.BackTestingEvent; 21 | 22 | public interface BackTestingEventListener extends EventListener 23 | { 24 | void clearPersisterStrorages(BackTestingEvent event); 25 | void playBackTestingMarketData(BackTestingEvent event); 26 | void stopBackTestingMarketData(BackTestingEvent event); 27 | void reloadExecution(BackTestingEvent event); 28 | void updateRunId(BackTestingEvent event); 29 | } 30 | -------------------------------------------------------------------------------- /quantfabric-strategyengine/src/main/java/com/quantfabric/algo/trading/execution/commands/CancelStrategyOrderCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.trading.execution.commands; 17 | 18 | 19 | public class CancelStrategyOrderCommand extends ManageStrategyOrderCommand 20 | { 21 | public CancelStrategyOrderCommand() 22 | { 23 | super(); 24 | } 25 | 26 | public CancelStrategyOrderCommand(String originalOrderReference) 27 | { 28 | super(originalOrderReference); 29 | } 30 | 31 | public CancelStrategyOrderCommand(String complexOrderReference, 32 | int complexOrderLegId) 33 | { 34 | super(complexOrderReference, complexOrderLegId); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /quantfabric-core/src/main/java/com/quantfabric/algo/market/datamodel/MDFeedEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.quantfabric.algo.market.datamodel; 17 | 18 | public interface MDFeedEvent 19 | { 20 | String getSymbol(); 21 | 22 | void setSymbol(String symbol); 23 | 24 | int getFeedId(); 25 | 26 | void setFeedId(int feedId); 27 | 28 | String getFeedName(); 29 | 30 | void setFeedName(String feedName); 31 | 32 | int getFeedGroupId(); 33 | 34 | void setFeedGroupId(int feedGroupId); 35 | 36 | String getInstrumentId(); 37 | 38 | void setInstrumentId(String instrumentId); 39 | 40 | int getPointsInOne(); 41 | 42 | void setPointsInOne(int pointsInOne); 43 | 44 | } --------------------------------------------------------------------------------