Adaptive Modeler™
Version 1.1.0
User’s Guide
Copyright © 2003 - 2008 Jim Witkam. All rights reserved.
Brief Contents:
1.1 What are agent-based models and why use them for price forecasting?
1.2 How does Adaptive Modeler use agent-based models for price forecasting?
1.3 How does Adaptive Modeler differ from conventional trading software?
1.4 What are the possibilities of Adaptive Modeler?
3. How does Adaptive Modeler work?
4.2 Supported quote file formats
5.2 Agent-based Model parameters
5.6 Saving and restoring model configurations
6.1 Controlling model evolution
6.11 Customizing the User Interface
6.13 Computation performance issues
7.1 Interpreting forecasting success
7.2 Using the Trading Simulator
8.2 Setting the compounding period
8.4 Recomputable vs. non-recomputable data series
10.3 Saving and opening batch settings
10.4 Starting a batch from the command line.
I.2 Agent-based Model data series
I.3 Trading System data series
III. Genetic programming in Adaptive Modeler
III.1 General introduction to genetic programming
III.2 Genetic programming in Adaptive Modeler
Full Contents:
1.1 What are agent-based models and why use them for price forecasting?
1.2 How does Adaptive Modeler use agent-based models for price forecasting?
1.3 How does Adaptive Modeler differ from conventional trading software?
1.4 What are the possibilities of Adaptive Modeler?
2.1.1 Starting a new model based on the sample quote file and default model parameters
2.1.2 Opening an already evolved sample model
3. How does Adaptive Modeler work?
3.1.4.1 Running multiple model evolutions
3.2.1 Trading Signal Generator
4.1.3 Accepted quote intervals
4.1.4 Quote bar timing convention
4.1.6 Missing or irregular quotes
4.2 Supported quote file formats
4.2.1 General quote data formatting requirements (applies to all formats)
5.1.1 Quote history file of security
5.1.2 Security name/description
5.1.4 Model evolution start date and time
5.1.5.1 Handling changes in Market Trading Hours
5.1.6 Pause model after creation
5.2 Agent-based Model parameters
5.2.4 Broker commission (for agents)
5.3.3 Minimum initial genome depth
5.3.4 Maximum initial genome depth
5.3.5 Genome creation gene selection
5.3.5.1 Genome Creation and Mutation Tester
5.4.1 Breeding cycle frequency
5.5.2 Significant Forecast Range
5.5.3 Generate Cash Signal when forecast is outside range
5.5.6 Enable Trading Simulator
5.5.11 Avg slippage or price improvement
5.6 Saving and restoring model configurations
6.1 Controlling model evolution
6.3.2 Adding data series to an existing chart
6.3.4 Removing data series from a chart
6.3.5 Scrolling through charts
6.3.10 Showing the data overlay
6.3.12 X-Axis for time series charts
6.3.12.2 Positioning and meaning of X-Gridlines
6.3.13 X-Axis for distribution series charts
6.3.13.3 Positioning and meaning of X-gridlines and labels
6.6.3 Using the Z (color) dimension
6.6.4 Changing the axes ranges
6.6.5 Changing the gridline intervals
6.6.6 Showing the data overlay
6.6.7 Showing correlation and regression
6.6.8 Setting the agent dot size
6.7.1.2 Calculate since Trading Simulator Start / number of periods
6.9.1 Showing an agent’s genome
6.11 Customizing the User Interface
6.11.3 Hiding or closing a window
6.11.6 Creating window instances
6.11.7 Deleting a window instance
6.11.8 Renaming a window instance
6.13 Computation performance issues
7.1 Interpreting forecasting success
7.2 Using the Trading Simulator
8.2 Setting the compounding period
8.4 Recomputable vs. non-recomputable data series
9.1.1 Selecting data series to export
9.1.2 Selecting the export file
9.1.3 Export historical values
9.2.1 Adding data series to the selection
9.2.2 Removing data series from the selection
9.2.3 Removing a data series from a chart or the Current Values grid while it is being exported
9.2.4 Exporting distribution data series
9.2.6 At what point in the Agent-based Model cycle are values being exported?
9.2.7 Date and time values in the export file
10.1.6 Run numbers start value
10.1.7 Run models until end of quote file
10.1.8 Run models for a given number of bars
10.1.9 Export data at end of run
10.1.10 Save models at end of run
10.1.11 Close models at end of run
10.3 Saving and opening batch settings
10.4 Starting a batch from the command line.
I.1.3.2 Compounded Average Return
I.2 Agent-based Model data series
I.2.6.1 VM Return Distribution
I.2.8.1 Forecasted Price Change
I.2.8.5 Root Mean Squared Error
I.2.8.6 Right / Wrong Forecasted Price Changes
I.2.8.7 Forecast Directional Accuracy
I.2.8.8 Forecast Directional Significance
I.2.8.9 Forecast Directional Area Under Curve (FD AUC)
I.2.10.9 Position Distribution
I.2.10.10 Breeding fitness return distribution
I.2.10.11 Breeding fitness excess return distribution
I.2.10.12 Replacement fitness return distribution
I.2.10.13 Replacement fitness excess return distribution
I.2.10.14 Trade Duration Distribution
I.2.10.15 Volatility Distribution
I.2.10.17 Generation Distribution
I.2.10.18 Offspring Distribution
I.2.10.28 Average Nodes Crossed
I.2.10.29 Average Nodes Mutated
I.2.11.5 Breeding fitness return
I.2.11.6 Breeding fitness excess return
I.2.11.7 Replacement fitness return
I.2.11.8 Replacement fitness excess return
I.3 Trading System data series
I.3.3.3 Monte Carlo Simulation
III. Genetic programming in Adaptive Modeler
III.1 General introduction to genetic programming
III.2 Genetic programming in Adaptive Modeler
III.2.1 Differences between the way Adaptive Modeler uses GP and the conventional approach
III.2.2 Input of the trading rules
III.2.3 Output of the trading rules
III.2.5 Function and terminal set
III.2.5.10 open, high, low, close
III.2.5.14 avgvol, minvol, maxvol
Adaptive Modeler is a tool for creating agent-based market simulation models for price forecasting of real world market-traded securities such as stocks, ETFs or forex currencies.
An agent-based model is a dynamic system of interacting autonomous entities. An agent-based model of a financial market consists of a population of agents (representing investors with their own assets and trading strategy) and a price discovery mechanism (representing a market).
Agent-based models have shown to be able to simulate complex systems such as stock markets better than traditional mathematical finance. Conventionally, financial markets have been studied using analytical mathematics based on a generalization of market participants and other simplifications and idealizations. However, the behavior of financial markets as observed in reality can not be fully described by such mathematical models. In reality, market prices are established by a large diversity of investors with different decision making methods and different investment goals (such as risk preference and time horizon). The complex dynamics of these heterogeneous investors and the resulting price formation process require a simulation model of multiple heterogeneous agents and a virtual market.
Research has shown that complex behavior as seen in actual markets can emerge from simulations of agents with relatively simple decision rules. Furthermore, commonly observed “stylized facts” of financial time series (such as fat tails in return distributions and volatility clustering) that have confronted the Efficient Market Hypothesis, have been reproduced in agent-based market models.
Adaptive Modeler creates an agent-based market model for a given real world security. The model consists of a population of thousands of agents each with their own technical trading rule (initially created randomly) and a virtual market. Adaptive Modeler then evolves this model step-by-step while feeding it with historical prices of the security. After every received price, the agents evaluate their trading rule and place buy or sell orders on the Virtual Market where an order matching and price formation process takes place. Agent and their trading rules evolve through adaptive genetic programming. Agents with poor performance are being replaced by new agents whose trading rules have been created through crossover of trading rules of agents with good performance.
Self-organization through the evolution of agents and the resulting price dynamics drives the model to learn to recognize and anticipate recurring price patterns while adapting to changing market behavior. Model evolution never ends. When all historical prices have been processed, the model waits for new price data to become available and then evolves further. The model thus evolves in parallel with the real world market. After every processed price bar the model generates a bar-ahead price forecast for the security based on the behavior of the Virtual Market. Trading signals are generated based on the forecasts and the user’s trading preferences.
More
about the inner workings of Adaptive Modeler is explained in 3. How does Adaptive Modeler work?
Most conventional trading software based on technical trading rules supports the user in finding or creating a (mostly static) rule-based trading strategy by optimizing and back-testing on historical data. If one searches long enough, this approach will always produce a trading strategy that seems highly profitable on historical data. This however doesn't mean that this strategy will also perform well in the future when price behavior may be different. The apparent past success of the strategy has in fact merely been caused by repeatedly optimizing and back-testing on the same historical data. This tends to lead to overfitting (or curve fitting) and is likely to produce trading rules that fail when exposed to new price data.
More advanced software may provide adaptive trading rules that automatically adapt to price developments using neural networks, genetic algorithms or other techniques. However, one adaptive trading rule will still not be able to capture the complex price behavior of a financial market caused by the interaction of various heterogeneous investors, and this approach still carries the risk of overfitting.
In financial markets no single trading rule continues to beat the market for any long period of time. Financial markets are constantly changing and new trading strategies come and go, affecting price behavior and each other’s returns. As the market evolves, trading strategies need to evolve as well in order to stay profitable.
Instead of optimizing one or a few trading rules by bac