CTSS: A COMMODITY TRADING SIMULATION SYSTEM Developments in Business Simulation & Experiential Exercises, Volume 11, 1984 198 CTSS: A COMMODITY TRADING SIMULATION SYSTEM Ramesh Sharda, Oklahoma State University Chandru C. Bolaki, Iowa State University ABSTRACT A computer program to simulate commodity trading has been developed. The model has been used to evaluate the performance of a few trading rules. It provides a computerized commodity trading environment through which one can execute buy-sell signals generated by social decision criterion. A random price generator has been included to add a realistic dimension. Complete accounting and statistical analysis is also performed within the CTSS. This paper describes the system arid its possible uses in the classroom and research. It is available to others interested in developing it further. INTRODUCTION Commodity speculation requires players who are best suited to win the frequently irrational roulette of the commodity market. It is the investor’s desire to minimize the risk associated with the investment and maximize the return. Decision rules, such as technical analysis and charting, as well as sophisticated techniques such as portfolio theory, have been developed to provide a guideline for entering or exiting a particular market so that the return on capital invested can be maximized and the risk minimized. The use of decision rules originated in the stock market, but has extended to the commodity market. A number of commodity trading decision rules using technical analysis and fundamental analysis have been proposed by commodity traders. Technical analysis, or charting as it is commonly called, is a study of the price action of a market itself. The technical analyst studies price movements, plus other important indicators such as volume and open interest, on the basis that the supply and demand of futures contracts govern the price level of futures. By using charts, the technical analyst attempts to anticipate the future direction of prices by analyzing the trends of the past and present. Fundamental analysis, on the other hand, is an approach to studying market behavior that emphasizes the underlying factors of supply and demand in commodities. This school of thought believes that such analysis will enable one to profit by being able to anticipate price trends. Kroll and Shishko (1973) note that most speculators tend to rely on both technical analysis and fundamental analysis for making trading decisions. Many rules have been proposed by commodity traders for specific trading decisions in the commodities market. However, the authors of these rules seldom report on the performance of their rules. This paper reports the development of an exploratory system for simulating the performance of various commodity trading rules. The program is called Commodity Trading Simulation System (CTSS). THE MODEL CTSS is a powerful program-package (in PL/I) to aid in the testing of different decision criteria (rules) for trading on the commodities market. The major objective is to provide the researcher with a computerized commodity trading environment, that simulates the actual trading in which he can execute the buy-sell signals generated by his rules. The system is set up for an investor who wants to buy and hold and then sell at appropriate times. The system simulates a person who at the end of a day evaluates all of the information available and makes a trading decision for the following morning. Since no day trading is permitted, our investor makes the decisions just once every day. The Commodity Trading Simulation System was designed to incorporate as many “real life” scenarios as possible. It is possible, for instance, to choose what maximum percentage of a total portfolio will be in a particular contract. The system considers transactions costs, margin requirements and other pertinent features of commodity trading. Basically, the program operates on historical commodity data in conjunction with a trade decision rule. The rule is used to generate a trade recommendation (buy, sell, no trade). The action is then completed by the Transaction Processing System (TPS). The basic steps involved in CTSS are illustrated in Figure 1. TI’S also takes other considerations, such as maximum quantity to be held, into account. The effect of trading using a particular rule can be simulated by performing trades using the rule over a specified time period. Three reports are available: a chronological transactions statement, a ‘day-in day-out” report, and a statistical summary. The rule is taken as an external procedure, so the program can be used to evaluate other rules as well. The transaction processing system is a trade processor for buys, sells, and no trades. The TPS also is a record keeper of the market session purchases and sells; the transaction date, the market price, quantity traded1 commission, gross profits/losses, net profits/losses, and cumulative totals. Given a trading decision, the TPS executes the trades and maintains an accurate account of the portfolio holdings. It updates the trader’s equity, cash, commission, and portfolio. The TPS is the central component of the Commodity Market Simulation System. Figure 1 illustrates the steps required by the TI’S. A number of interrelated activities occur in the TPS. The first activity is the process of merging the data with a decision rule. The trading rule specifies the data necessary for a trading signal to be generated. Also, the rule describes in detail what activities must occur for a trade signal to be generated. For example, the one day price breakout rule states that the high price on day t must breakout above the previous day’s high price for a buy signal. After a signal is generated, the TPS examines the portfolio holdings. If the portfolio consists of the maximum quantity of contracts for that commodity, the signal is postponed. TI’S allows the user to specify how many commodities can be held in the portfolio at one time. Also, each type of commodity contract is treated as a distinct commodity. If the portfolio holdings are not at the maximum level, the buy signal can be processed. In the case of maximum portfolio holdings, a sell must be processed for a commodity in the portfolio before another buy can be executed. An option is available to increase maximum quantity held if many buy signals are repeatedly generated for a particular commodity. The signal generated first is processed first. Again, the user can change that to ,perform all buys before sells. Developments in Business Simulation & Experiential Exercises, Volume 11, 1984 199 RANDOM PRICE GENERATION When a trader places a buy or sell order based on a particular price, there is no guarantee that the price on the floor will be exactly the same when the order is executed. The investor has a choice of placing stop and limit orders, but those also work only as absolute limits and an actual transaction price may still be different. This is incorporated into the program through a random price generator. This random price serves as a clearing price. This random price generator is based on an idea by Griffin and Hummer (1975). It considers the market’s opening, high, low, and closing price. It is from these price quotes that a simulated intra-day environment is created. The ‘market” price generator developed by Griffin and Hummer implicitly assumes that intra-day prices will exhibit a random market pattern between the day’s high and low prices. The mathematical equation for the random market price generation routine is: Developments in Business Simulation & Experiential Exercises, Volume 11, 1984 200 the slope of a straight line between the market opening and the market closing prices is calculated (the base of this line spans one day of time). A random number generator is invoked and selects, from a uniform distribution, a number (X) between zero and one. This number, when applied to the horizontal axis, locates a value (µ) on a line connecting the opening and closing prices. A second random generator then selects a second number (T) from a standard normal distribution. This number is multiplied by the sample standard deviation (a). Assuming a 9th range of the standard normal distribution, two standard deviations lie on each side of the mean. Hence, the sample standard deviation is calculated as the difference between the market high and low, divided by four. (The divisor four is used because this range is equivalent to four standard deviations.) The product is added to the value µ to obtain the simulated market price (P). The case shown in Figure 1 is the market closing higher than open, and both open and close are within the trading range. The calculated market price is altered in certain circumstances. For example, the simulated market price cannot be higher than the market high, or lower than the market low. When such cases occur, the market high or low, respectively, becomes the market price. In cases where the market high is equal to the market close and also equal to the simulated market price, the market order will not be filled 75 percent of the time (determined by an independent random number generator). This restriction is imposed to logically reflect the possibilities of a locked up-the-limit market. Likewise, where the market low is equal to the close and also equal to the simulated market price, the market order remains unfilled 7~ percent of the time, reflecting a no trade down-the-limit market. however, one can always buy in a market locked down-the-limit, as well as sell in one locked up-the-limit. TRANSACTION PROCESSING AND REPORT GENERATION The transaction processing system of CTSS updates the accounting records each market session. It follows the traditional approach in setting up margin accounts, keeps track of investors’ equity, gain/loss, etc. The program allows a user to set margin reserve, cost of commission, initial cash level with the broker and total equity. It allows the user to specify the margin account and transactions cost in terms of either a percent of the contract price or a fixed amount per contract. CTSS can generate three types of reports. One is a complete record of every buy and sell. This is usually stored on a disk file for further analysis. A round-trip trade report and an end of simulation summary report can be either printed or stored on a disk. Examples of these two reports are given in Tables 1 and 2. CTSS APPLICATION This system is written in PL/I. It is a tool available for simulating the performance of any trading rule. Developments in Business Simulation & Experiential Exercises, Volume 11, 1984 201 The program has been tested with four trading rules which are currently available with CTSS. It can be run in batch or interactive mode. A User’s Guide is available describing all of the options and data requirements. In the authors’ view, CTSS has two educational uses. In a course dealing with commodity futures, CTSS can be used to demonstrate workings of the market. It can also be used to test the rules available in CTSS with data available to the educator, or it can be used to develop and test your own rules. Complete description and an example is provided in the User’s Guide. This, of course, requires knowledge of PL/I. But running the system with its current rules on other data sets requires no programming. The performance tests on trading rules should add a different dimension in courses teaching commodity futures. A second application of CTSS can be mainly as a transactions processor. The rules section can be disabled with minor changes in the program. Then groups of students can make the trading decisions using their own rules and CTSS can simply complete the transactions at the randomly generated price and maintain accounting records. We have used CTSS mainly as a research tool so far, but consider this type of application quite useful. We will be happy to provide a complete listing of the program to anybody interested in making further improvements to the program. REFERENCES [1] Commodities, “Amos Hostetter: he Turned Theories Into Dollars,” Vol. X, No. 11, November l981, pp. 44- 45. [2] Griffin, Steven C., and Paul D. Hummer, Computerized Futures Market Simulation System User’s Guide, Department of Agricultural Economics, Oklahoma State University, Stillwater, OK, April 1975, pp. 1~4. [3] Kroll, Stanley and Irwin Shishko, The Commodity Futures Market Guide, Harper & Row Publishers, New York, 1973, pp. 3, 38-39, 82-83, 86-87, 228-230, 236. [4] Oster, Merrill J., “How the Young Millionaires Trade Commodities,” Part 1, Commodities, Vol. V, No. 3, March 197b, pp. 12-lb. [5] Oster, Merrill J., “How the Young Millionaires Trade Commodities,” Part 2, Commodities, Vol. V, No. 4, April 19Th, pp. 22-27. [6] Schlobohm, Tom, “Spot Relative Strength Index Faster,” Commodities, Vol. XI, No. 1, January 19~2, pp. 7b-77. [7] Shulman, Morton) Anyone Can Still Make a Million) Stein and bay, New York, 1973, p. 137. [8] Wilder, J. Welles, Jr., “Relative Strength Index: A Momentum Oscillator That Can Help You Spot Market Turns,” Commodities, Vol. VIII, No. 6, June 19Th, pp. 34-36, 46-47. Table of Contents Volume 11, 1984 Simulation Gaming as a Means of Researching Substantive Issues: Another Look A Further Test of the Group Formation and its Impacts in a Simulated Business Environment Impact of Economic Patterns on Student Performance in Computer Business Simulation Games Majority Fallacy Game with Independent Student Simulation and a Case Introducing the Marketing Channel Laboratory A Comparative Evaluation of a Marketing Game A Study of Comparative Effectiveness of Problem-Solving Technologies The Impact of Hierarchical and Egalitarian Organization Structure on Group Decision Making and Attitudes Risk-Free Decision Making The EX-STRA Export Strategy Game Computer Education for Management Students Developing a Computer Game/Job Simulation to Teach Functional Literacy Skills Experiencing Socialization First Hand: An Experiential Exercise in Organizational Socialization Networking Distributive Versus Integrative Approaches to Negotiation: Experiential learning Through a Negotiation Simulation Managerial Education and the Real World: Foudations for Designing Educational Tools Diagnosing Group Climate to Improve Supervisory Effectiveness Student background as a Factor in Simulation Outcomes: The Collective bargaining Example The Use of Pre-Plays in Management Education Experiencing the Process Debrief: A Workshop ABSEL Megatrend Roots MEGATRENDS for Business Simulation and Experiential Learning The Effects and Consequences of the Megatrends on Simulation Gaming: One View Opportunities for the Future: ABSEL's Role Experiential Learning-Based Discussion vs. Lecture Based Discussion: A Comparative Analysis in a Classroom Setting An Evaluation of the Minitab Package in Teaching Business Statistics Concepts A Path Analytic Study of the Effects of Alternative Pedagogies Developing and Using Weighted Application Blanks: An Experiential Exercise Building Airplanes Individual vs. Group Grade: An Exercise in Decision making A Marketing Plan Exercise: Development of Interteam Cooperation Using a Coordinated Experiential Approach Using Student Experience as the Basis for a Consumer Behavior Learning Exercise Student Evaluations of Instructors: What do Students Believe? A Description of the SOFTCAT Computer Assisted Teaching System Comparisons of Practitioners' and Professors' Perceptions of Business Policy Content and Learning Methods The Perceived Relationship Between Pedagogies and Attaining Course Objectives in the Business Policy Course The Use of Simulation in the Teaching of Business Policy A Research Study on Strategic Decisions in a Business Simulation Strategic Management Decision Making Researched Via Simulation Gaming Using Simulation to Investigate Factors in Competitive Bidding Combining Experiential Learning and management Assistance A Model for Teaching Management Skills Putting Experience Back into Experiential Learning: A Demonstration The Teaching and Behavioral Measurement of Managerial/Organizational Competencies: Developing Experiential Exercises and Simulations A Simulation Game Model for Conglomerates QCLAB - A Microcomputer Laboratory in Quality Control CTSS: A Commodity Trading Simulation System Problem Solving: An Exercise on Learning, Coaching, and Operant Conditioning A Demonstration of the Effects of Feedback as a Category of Reinforcement The Assessment of Feedback and Disclosure in Interpersonal Relations: An Experiential Exercise A Study to Determine Whether the Teaching of Basic Grammar Skills in Business Communication Classes Improves Students' Business Letter Writing Corporate Maladies Through the Eyes of the Memo Writer: A Seldom Used Experiential Tool Executive Bailout at Shake & Spear, Inc. The H.E./L&P Merger Intercultural Nonverbal Communications: An Experiential Exercise The Evolving Business Policies Course - Is Management Gaming the Logical Pedagogy? The Use of Decision Simulations in Management Training Programs: Current Perspectives Humanizing the Business of Medicine: The Use of Simulated Patients to Train medical Students Systematic Integration of Simulation Methods in a Graduate Management Curriculum Modeling Non-Price Factors in the Demand Functions of Computerized Business Using Spacial Relationships to Estimate Demand in Business Simulations Two Algorithms For Redistribution Of Stockouts In Computerized Business Simulations Leadership And Strategic Behavior A Comparison Of Two Business Strategy Simulations For Microcomputers Incorporating Decision Support Systems Into Management Simulation Games: A Model And Methodology Using Micro-Computers To Support The Analysis Of Complex Cases: It's As Easy As 1-2-3 Strategic Formulation Consistent With Pims: A Micro-Computer Application