AlgoTraderAlgoTrader Documentation

Reference Guide

AlgoTrader


Preface
1. Document Conventions
1.1. Typographic Conventions
1.2. Pull-quote Conventions
1.3. Notes and Warnings
1. Introduction
2. Installation and Deployment
2.1. Development Environment Installation
2.1.1. Prerequisites
2.1.2. AlgoTrader Eclipse IDE Installation
2.1.3. AlgoTrader Server Code Installation
2.1.4. Next Steps
2.2. Server Environment Installation
2.2.1. Docker based Installation
2.2.2. Docker Containers
2.2.3. Docker Compose
2.2.4. Docker Management
2.3. VM Arguments
3. Starting AlgoTrader
3.1. Simulation Mode
3.2. Live Trading Mode
3.2.1. Embedded Mode
3.2.2. Distributed Mode
3.3. Server Environment
3.3.1. Embedded Mode
3.3.2. Distributed Mode
4. Strategy Development
4.1. Creating a Trading Strategy
4.1.1. AlgoTrader Strategy Wizard
4.1.2. AlgoTrader Maven Archetype
4.1.3. Generated Artifacts Simple Archetype
4.1.4. Generated Artifacts Esper Archetype
4.2. Building a Trading Strategy
4.3. Hints for Strategy Development
4.3.1. Java based Strategies
4.3.2. Esper based Strategies
4.4. Strategy life-cycle events
4.5. Strategy Groups
5. Strategy Backtesting
5.1. Exchange Simulator
5.2. Simulation Process
5.3. Single Run Simulation
5.4. Automated Parameter Optimization
5.5. Performance Statistics
5.6. In-Process Exchange Simulator
5.7. Multi Security Simulations
6. Architecture
7. Domain Model
7.1. Entities
7.1.1. Strategy
7.1.2. Security
7.1.3. Market Data Events
7.1.4. Order
7.1.5. Account
7.1.6. Transaction
7.1.7. Position
7.1.8. Cash Balance
7.1.9. Subscription
7.1.10. Exchange
7.1.11. Property
7.1.12. Order Preference
7.2. Services
7.2.1. Main Services
7.2.2. Client Services
7.2.3. Account Service
7.2.4. Calendar Service
7.2.5. Combination Service
7.2.6. Future Service
7.2.7. Historical Data Service
7.2.8. Market Data Service
7.2.9. Measurement Service
7.2.10. Option Service
7.2.11. Order Service
7.2.12. Portfolio Service
7.2.13. Position Service
7.2.14. Property Service
7.2.15. Reference Data Service
7.2.16. Market Data Cache Service
7.2.17. Lookup Service
7.2.18. Strategy Service & Config Aware Strategy Service
7.2.19. Subscription Service
7.2.20. Reconciliation Services
7.2.21. Reset Service
7.3. Value Object
7.4. Enumerations
8. Esper Engine
8.1. Esper Introduction
8.1.1. Introduction to event streams and complex events using Esper
8.1.2. Event representations
8.1.3. Event Stream Analysis
8.1.4. Combining Pattern Matching with Event Stream Analysis
8.1.5. Named windows
8.1.6. Variables
8.2. Esper Quick Start Guide
8.2.1. Event Types
8.2.2. Creating a Statement
8.2.3. Adding a Subscriber
8.2.4. Adding a Listener
8.2.5. Sending events
8.2.6. Configuration
8.3. Esper Documentation
8.4. AlgoTrader specific Esper Artifacts
8.4.1. Engine & EngineManager
8.4.2. Modules
8.4.3. Tags
8.4.4. Subscribers
8.4.5. Listeners
8.4.6. Service method invocation in Esper scripts
8.4.7. Aggregation Functions
8.4.8. Callbacks
8.5. Esper Threading
9. Database
9.1. Data Source
10. Client
10.1. HTML5
10.1.1. Header
10.1.2. Order Table
10.1.3. Transaction Table
10.1.4. Positions Table
10.1.5. Market Data Table
10.1.6. Column Selection and Grouping
10.1.7. CSV Export
10.1.8. Chart Widget
10.1.9. Technologies
10.1.10. HTML5 Custom Widgets
10.2. AlgoTrader Eclipse IDE
10.2.1. AlgoTrader Perspective
10.2.2. Strategy Wizard
10.2.3. AlgoTrader Configuration Editor
10.2.4. Esper Colorer
11. Performance Measurement
11.1. Portfolio Value Logging
11.2. Portfolio Value Restoration Feature
12. Risk Management
13. Forex Handling
13.1. Currency Handling
13.1.1. Futures
13.1.2. Forex
13.1.3. Currency Attribution
13.2. Forex-Hedging
13.2.1. Virtual FX Positions (IB only)
13.2.2. FX Future
14. Options & Futures
14.1. Expiration
14.2. Leverage & Exposure
14.3. Symbol, ISIN & RIC
14.4. Delta Hedging
14.5. Option & Future Chain Download
14.6. Option Greeks
14.7. Option Pricing Engine
14.7.1. SABR Calibration
14.7.2. Option Pricing
14.7.3. References
14.8. OTC Options
15. Reconciliation
15.1. Partner Systems
15.2. Email Handling
15.3. FTP Handling
16. Broker/Exchange Interfaces
17. Order Management
17.1. Place Order
17.1.1. Order Preferences
17.1.2. Trade Suggestions
17.1.3. Order Properties
17.2. Receive Fills
17.3. Handling of Fees and Commissions
17.4. Internal Order Id Format
17.5. Symbology
18. Market Data
18.1. Creation of Bars based on Ticks
18.2. Numeric Precision
18.3. Price normalization
18.4. Market Data Gap Checking
18.5. Generic Events
18.6. Generic Tick Events
19. Historical Data
19.1. InfluxDB
19.2. Live Data Recording
19.3. Historical Data Download
19.4. Interactive Brokers Historical Data Download
19.5. Quandl Historical Data Download
19.6. Google Finance Historical Data Download
19.7. Market Data File Format
19.7.1. Tick Data Files
19.7.2. Bar Data Files
20. Reference Data
21. Account Data
22. Adapters
22.1. Fix Interface
22.1.1. FIX configuration
22.1.2. FIX logging
22.1.3. FIX message persistence
22.1.4. FIX Drop-copy support
22.2. Session life-cycle events
22.3. Crypto Exchange interfaces
22.3.1. Crypto Exchange vs. Margin Trading
22.3.2. Custom currency mapping
22.4. Bloomberg
22.5. Currenex
22.6. DukasCopy
22.7. EzeSoft / Real Tick
22.8. Fortex
22.9. FXCM
22.10. IB Native Interface
22.10.1. IB Market Data Subscriptions
22.11. IB Fix Interface
22.12. JP Morgan
22.13. LMAX
22.14. Nexus Prime
22.15. PrimeXM
22.16. Quandl
22.17. QuantHouse
22.18. SocGen
22.19. Trading Technologies (TT)
22.20. UBS
22.21. Binance
22.22. Bitfinex
22.23. Bitflyer
22.24. BitMEX
22.25. Bitstamp
22.26. CoinAPI
22.27. Coinigy
22.27.1. Setup Instructions
22.28. CoinMarketCap
23. Execution Algos
23.1. Existing Execution Algos
24. Synthetic Securities and Derivative Spreads
24.1. Combination Example
24.2. Combination Service
24.2.1. Create Combination
24.2.2. Update Component Quantity
24.2.3. Remove a Component
25. Spring Services
25.1. Starter Classes
25.2. Spring Profiles
26. Configuration and Preferences API
26.1. Configuration Files
26.2. Esper Variables
27. Processes and Networking
27.1. SSL security
27.1.1. Importing Certificate into Chrome Browser
28. Metrics
28.1. Configuration
28.2. Metrics Reporting
29. Logging
29.1. log4j2.xml
29.2. Production log4j2.xml
30. Reporting
A. Example Strategy "BreakOut"
A.1. Trading Idea
A.2. Example
A.3. Implementation
A.4. Installation & Startup
B. Example Strategy "Box"
B.1. Trading Idea
B.2. Implementation
B.3. Strategy Monitoring
B.4. Installation & Startup
C. Example Strategy "Pairs Trading"
C.1. Trading Idea
C.1.1. What Is Pairs Trading?
C.1.2. Pair Trading Lab
C.1.3. AlgoTrader - Pair Trading Lab Integration
C.2. Implementation
C.3. Installation & Startup
C.4. Strategy Monitoring
D. Example Strategy "IPO"
D.1. Trading Idea
D.2. Strategy Monitoring
D.3. Implementation
D.4. Installation & Startup
E. Example Strategy "EMA"
E.1. Trading Idea
E.2. Implementation
E.3. Installation & Startup
F. Example Strategy "Random"
F.1. Trading Idea
F.2. Implementation
F.3. Installation & Startup