Strategy Development
Strategy Development for the Penn State Trading Strategy Competition
Guidelines
Your objective will be to construct several automated trading strategies in TradeStation. These will then be submitted as a TradeStation file and monitored throughout the competition. (Directions and a screencast for strategy creation are provided below.)
For Part I of the competition, you will be allowed to choose one stock listed within the S&P 500 (constituent list here) to trade during the competition using the strategy you submit
After creating a strategy, you must visit the strategy submission page and submit your strategy in the dropbox. We will run your strategy on the stock you select and measure the profit/loss statement to measure your return.
A trading strategy is a system of formulas, commonly referred to as an algorithm, that has the ability to automatically transmit buy and sell orders to a brokerage platform. This enables the user to take a hands-off approach to trading, and is seen as beneficial in many ways because of its execution speed and ability to remove emotion and irrational behavior from the trading process.
TradeStation software makes constructing and applying strategies extremely simple, allowing the user to construct a basic strategy in under 5 minutes once he/she is familiar with the software.
Downloading TradeStation
TradeStation will be used for constructing your trading strategies for the competition. This is a stand-alone software package with powerful tools to chart, analyze, and build automatic trading strategies.
You have the option of downloading the software onto your computer using the log-on information provided (alternatively, you may use TradeStation on the Trading Room computers):
Click here to download the TradeStation software, entering the user name and password given to you in your registration e-mail.
Select "Install" for Version 8.4 (bottom selection), and follow the steps to complete the installation of TradeStation
See the TradeStation tutorial pages for a walkthrough of building and submitting a strategy
Feel free to create and test strategies using TradeStation before and during the competition as you wish -- your performance will only be measured on the strategies you submit for the competition
Building Strategies
Click here to view a screencast of these instructions.
Open the Tradestation program.- In the left-hand toolbar, click the "Chart Analysis" button to open a new chart.
- To change the symbol on the open chart, left-click anywhere on the chart, enter the new symbol, and press enter. This can also be done by entering the symbol in the box in the top toolbar which reads "Type a symbol/command", or by right clicking on the chart, selecting "Format Symbol", and entering the new symbol.

- To change the time interval for the data points on the chart, scroll over the buttons in the toolbar along the top of the screen and click the one which reads "Interval". This can also be done by right-clicking on the chart, selecting "Format Symbol", and changing the interval and interval settings. In this window, the time period of data displayed may also be changed to incorporate more data onto the chart (ie – changing the date range on a 5 minute chart to 30 days back instead of the default of 5 days).
**Note: In many strategies, the shorter the bar interval, the more frequently the strategy will trade. Experimenting with both the bar interval and date range may prove helpful when backtesting strategies.
- To insert a strategy, right-click on the chart, select "Insert Strategy" and a window will appear which lists all of the strategies built-in to Tradestation.

Each listed strategy is generated by TradeStation's programming language, called Easy Language. The code for these strategies can be easily modified to create different or completely new trading strategies.
- Select at least 1 strategy to be applied to the chart, and click OK. (While viewing the strategy list, you may click on any of the available strategies and click the "Definition" button to view the characteristics of that strategy. This is a good way to familiarize yourself with the various strategies, especially if you have little or no background in technical analysis.)
If you are prompted with an additional window after selecting a strategy, a window titled "Format Analysis Techniques and Strategies" will appear. The values in the "Input Values" column affect your strategy, so you may double-click and change them, or just close the window. You are likely to need at least 2 strategies: 1 to initiate a long or short position, and 1 to exit that long or short position.
In the "Insert Strategies" window, several columns of checkmarks appear, representing the actions that that specific strategy will invoke.
-- For example, if a strategy you choose has 1 checkmark in the "buy" column, you will also need to select a strategy with a checkmark in the "sell" column to close that position, or a strategy with a checkmark in the "sell short" column to reverse your buy position and take a short position.
After applied to the chart, your strategy should then appear on the chart with a combination of blue, red, and/or white arrows connected by blue and red dotted lines.
If your strategy does not show up, make sure you have selected both entry and exit strategies. The blue arrows represent the initiation of a long (buy) position, while the red arrows represent a short entry and the white arrows an exit of either your long or short position. - You must next change a few settings to set your strategy up correctly with the guidelines of the competition. Doing this incorrectly can potentially result in your strategy producing different results from what you may have observed when your strategy performance is calculated for the competition.
After your strategy has been successfully inserted, click "Format" --> "Strategies" on the main menu. Click the "Properties for all" button. The window that appears will let you set up all of the constraints that your strategy is based upon. The area of this window labeled "Costs/Capitalization" must be modified as follows for each strategy you create:- Commission: $0.005 per share/contract
- Slippage: $0
- Initial Capital: $1,000,000
- Interest Rate: 1%
- "Use Look-inside-bar Back-testing": Checked
- "Intra-day [1] minute": Checked
- "Maximum number of bars study will-reference": Set to the longest look-back used by strategy (i.e., if a 200 bar average is used, this must be set to at least 200)
Note: The "Trade Size" settings will be important to your strategy. You may choose to trade a certain number of shares at a time, or a specific dollar amount of shares. Adjusting your trade size too high or too low will result in either reduced performance or bankruptcy.
For Example: 2 trades incurring 10% losses with your trade size set to $500,000 will produce a $100,000 loss. The same trades using a $5,000,000 trade size would bankrupt the account.
Strategy Testing and Optimization
Another important feature of Tradestation is its ability to backtest strategies. This entails applying your strategy to a specified date range of historical prices, and generating a performance report to show whether the strategy would have been a profitable one. Keep in mind that past performance does not guarantee future performance, so you are best off testing your strategy over numerous periods of time in the past.
To do this, click "View" "Strategy performance report" on the main menu. A window will appear, detailing your profit/loss figure ("Total Net Profit"), and nearly every aspect of your trading strategy. Notice the series of tabs along the bottom of the window, which will let you view a graphical view of your performance, a listing of every trade made by your strategy, and numerous statistical measures of the strategy.
It may be beneficial to backtest your strategy over a variety of periods, to determine the consistency of the strategy. To change the chart timeframe, right click on an open area of your chart and select "Format Symbol."
You may backtest over a specified period of time from the current day, or over a specific time period by entering start and end dates.

If your strategy very rarely places a trade during the backtesting periods, you might consider altering the strategy to reduce the risk of not meeting the minimum number of trades requirement during the competition.
To try and get the most out of your chosen strategy, you may choose to "Optimize" it using Tradestation's optimization algorithms.
- To do this, right click on the chart and select “Format Strategies”. A window will appear allowing you to customize your selected strategies.
- Most, although not all strategies will have a column next to the name of the strategy called "Input Values." The input values mean different things for different strategies, but they affect the way in which the strategy is calculated. To find the "best" value for any individual input value, double click on the "Input Value" field, which will open a list of the available input fields.
- Click on the one you want to optimize, and click the "Optimize" button below. A window will appear asking you for the range of input values you wish to test, and for the increment between input values which Tradestation will use when optimizing.
- Click "OK," and you will notice the text in the "Value" field has changed slightly. When ready, click "OK," then "Optimize."
- Tradestation will run through a series of calculations, select the optimal input values (which produced the highest net profit), and apply them to your strategy.
- When the optimization is done, you can go to the "View" menu and select either "View Strategy Optimization Report" or "View Strategy Performance Report" to view the results of the optimization, and your new net profit figure.
Strategy Submission
After you have taken the necessary steps to build a strategy, you will need to correctly save and submit the file so we can monitor the performance of your strategy.
With your strategy open and visible in Tradestation, from the main menu select File Save Workspace As… and name the file with the following format:
Your trader acronym, followed by a period, followed by the ticker symbol of the stock the strategy is trading.
For example, if your trader acronym is "ace:"
If you choose to trade Microsoft for your individual strategy, you would submit the TradeStation file ace.MSFT to the specified dropbox.
The file may appear as "ace.MSFT.tsw" after you save if your file extensions are visible.
Under the "week" dropdown box on the submission page, you will need to select the appropriate label based on the strategy you are submitting. You must submit with the correct label to have your results counted.
Visit the strategy submission page and upload the TradeStation file(s) you created to the dropbox by the given deadlines.
You can submit your strategy anytime prior to the deadline. If you decide to alter a submitted strategy, you may do so by submitting the updated strategy at anytime prior to the strategy deadline using the same file name.
TradeStation Support
Additional information on using TradeStation can be found in the following locations (you may need to use one of the TradeStation user name/passwords to access several of the links):
- Archived Webinar – Introduction to Strategy Trading (use the zip file with presentation)
- Tutorial - Introduction to Strategy Trading
- Tutorial - Strategy Testing & Optimization
- Tutorial - Strategy Automation
- Tutorial - Introduction to EasyLanguage
EasyLanguage File Library – TradeStation users contribute studies and exchange them with other community members. Students will find a wide variety of examples (all available for download) of how other TradeStation users are taking advantage of the power of EasyLanguage. Also , see EasyLanguage Support Forum

