Sessions
TradersStudio® Professional version comes with a list of systems, which you can pick from the dropdown and use for testing. Develop your own systems using our powerful system wizard, which allows you to develop trading systems without programming or write them directly in our powerful TradersStudio® Basic™ Language. In addition many commercial systems are also available to plug into TradersStudio Pro.

TradersStudio Professional is an offline product supporting a number of timeframes, namely daily, weekly, and monthly timeframes, and also includes “intra-day timeframes” for backtesting, down to 1 min bars. Using TradersStudio Pro you can, with a few mouse clicks add a complete directory, and you can create custom portfolios to add or select different markets from different directories. In addition TradersStudio Professional allows you to have data organized by groups or sectors.

By default TradersStudio Pro shows you the results on your basket but with as little as just one mouse click you can see the reports on each market as well as each market’s charts. TradersStudio Pro gives you all of the standard reports like Summary, Trade By Trade, Monthly Breakdown, Yearly Breakdown, as well as Active orders, which are, the orders you need to place for tomorrow. In addition it offers powerful reports like Correlation Analysis which lets you see how correlated the equity curves of each market that you are analyzing, so you can quickly design the best portfolio for your trading system.

In addition to these reports TradersStudio Pro offers custom reports, which you can write as part of your systems.
Besides having price charts on par with other trading platforms TradersStudio Pro has special charts which help you evaluate your trading system(s), which include Equity Curve, Trade Distribution, Underwater Equity Curve and Start Trade Drawdown. In addition in TradersStudio Professional we have added many new charts such as Monthly Distribution, Moving Equity window and various positive and negative excursion charts.

Start trade drawdown is a powerful analysis, which lets you know the probability that you will be successful using a given trading strategy based on your starting account size. No other product offers this statistical measure.

TradersStudio’s rich user interface lets you have all your analysis across different systems with your charts on the screen all at one time available for analysis and comparison with just a few mouse clicks.

Optimize
TradersStudio® Professional is the only product which allows you to optimize a system across a large portfolio and also allows you to view any individual market(s) results without rerunning the analysis.

Now view just the Cotton:

You can sort the results of the optimizing and even write your own functions to evaluate the performance of a given set of parameters you can sort and select your final parameters using this measure.

If you want to take a closer look at a given set of parameters just press the activate button on the row next to the parameter set you would like to see and it will rerun the session and give you the full sets of the reports.
Create Custom Portfolios
The Portfolio
Another powerful feature of TradersStudio® Professional is called The Portfolio. In the TradersStudio Main Menu click on Data Manager – Portfolio Management. When this menu tab is selected, the Portfolio Manager box appears on the screen.

In the Type of Portfolio box, select the Commodities radio button. By default, it is normally selected unless you typically do Stock Sessions. Select Add New from the Portfolio List drop down box and name it “Trending Markets.” Select a data directory listed in the Available Directory/Portfolio and Type list box. You can click on the ‘Add’ box to add it to the right hand list box. Select another data directory and continue to add more data directories to the right hand list box. This process allows you to combine data from multiple directories with a few clicks of the mouse.
For example, you can take ASCII data for a group of commodities and add CSI® data and click Apply. The directories can be re-selected and more data can be added, the Apply button can be clicked. This powerful feature allows you to combine data from different directories, put it into a portfolio, and create a session where the portfolio will appear as a data directory. If you created baskets of markets especially for a trading system and wanted to create a small portfolio with $20,000, a medium sized portfolio with $50,000, and/or a large portfolio with $100,000, you could create separate portfolios, and add them with one click of a button once they were created. The data does not have to be in one directory. It can be anywhere on the hard drive. That is the power of TradersStudio Professional when it comes to adding, managing, and utilizing data.
Translating Systems
The TradersStudio® Professional Migration Tool allows you to use existing TradeStation® EasyLanguage code into TradersStudio. This tool translates EasyLanguage code into TradersStudio Basic™, in some rare cases you may have to make small changes to translated code. It translates Systems and Functions, but not Indicators, Paintbars and ShowMe. In most cases, you will be able to take existing EasyLanguage code, using this tool, and run it in TradersStudio without any changes. The migration tool in TradersStudio® Professional is really two tools (a) one for translating code from TradeStation 2000i or lower and (b) other for translating TradeStation 8.X code the online version. TradeStation changed many keywords we have resolved this conflict by developing two different translators.
In the rest of this section, we will use the TradeStation 2000i translator. Let's look at a system written in TradeStation EasyLanguage code:
{Classic intermarket divergence system
Can go long, short or both and handles both positive and negative intermarket relationships}
Inputs: MkLen(10),InterLen(10),Relate(0),LSB(0);
Vars: MarkInd(0),InterInd(0);
MarkInd=Close-Average(Close,MkLen);
InterInd=Close of data2-Average(Close of data2,InterLen);
If Relate=0 then begin
If InterInd<0 and MarkInd<0 and LSB>=0 then buy at open;
If InterInd>0 and MarkInd>0 and LSB<=0 then sell at open;
If InterInd<0 and MarkInd<0 and LSB=-1 then exitshort at open;
If InterInd>0 and MarkInd>0 and LSB=1 then exitlong at open;
end;
If Relate<>0 then begin
If InterInd>0 and MarkInd<0 and LSB>=0 then buy at open;
If InterInd<0 and MarkInd>0 and LSB<=0 then sell at open;
If InterInd>0 and MarkInd<0 and LSB=-1 then exitshort at open;
If InterInd<0 and MarkInd>0 and LSB=1 then exitlong at open;
end;
This code is for an intermarket system that trades using two data streams.
Bonds would be in ‘data 1’ and the Commodity Research Bureau Index or silver would be in ‘data 2’. The first parameter to set is the length of the moving average for the market that you are trading and the second parameter is to set the length of the moving average for the intermarket.
(a) If ‘Relate is zero’, the markets are negatively correlated. An example would be silver or the Commodity Research Bureau Index.
(b) If ‘Relate is 1,’ the markets are positively correlated. Another example would be trading the 10-Year Note with the Eurodollars as the intermarket.
The next parameter in the system is ‘LSB’ which stands for long, short or both. This is a very simple system, but it is a classic example of TradeStation coding.
In the TradersStudio Migration Tool, select the "Translate SYSTEM" radio button because you are translating a system. For the system name, enter "IntermarketTool":

Click 'Next', to continue. A new dialog box will appear. Paste the TradeStation EasyLanguage code into the text box that is provided and then click on Next to continue:

In TradeStation, all variables are of the same type and past values can be accessed. This is true for variables like those used in the index of a ‘for loop’. This is unnecessary and wastes memory resources. In TradersStudio, you can decide which variables need to be BarArrays. Since, BarArrays store past values, memory resources are saved and execution of the code is much faster. There are two variables in this piece of code and the TradersStudio Migration Tool will ask which variable needs to be a BarArray. Since neither of them need to access past values, it is not necessary to select any of them as BarArrays:

Click on OK to continue. In this step, if you ever have any doubt, select all of the variables to be BarArrays. It will use more memory and make the code process slower, but it will always produce the correct answers. The code will be translated and displayed:
The average TradeStation function has two parameters in EasyLanguage, but in the translated code it has three parameters with the third being the length and the offset, which is zero. The ‘buy’ and ‘sell’ signals are translated.
There are several ways to take this code and use it in TradersStudio Pro. (a) The first way is to click the ‘Save all the functions to files’ button. You can locate the directory to save the code. (b) Other way is you can also save the file directly to TradersStudio Pro. Click on the ‘Save to TradersStudio’ button, the code will be saved into the Editor.
Click on the ‘ExitTranslator’ button to exit the TradersStudio Migration Tool.
The migration tool can even translate functions. In addition it can also detect dependent functions and automatically ask for the code for these dependent functions as part of the translation process.
Automatic Exchange Rate Conversion for International Futures
The Set Exchange File is used to establish the relationship between currencies and a matching overseas futures contract quoted in that currency. The ‘min move’ and the ‘min move value’ of a futures contract are quoted in its native currency.
The only way to correctly analyze a portfolio with mixed US and overseas futures contracts is to convert the current equity into US Dollars on a bar by bar basis. When you have completed setting the conversion method, the conversion method is set to run behind the scenes and allows you to combine sessions and trading plans with futures from different countries and correctly have your account value and equity curve converted back to US dollars.
This feature is not available in most of the popular backtesting programs like TradeStation® or Metastock®, it is only available in high end professional platforms, while TradersStudio® Professional has it at a fraction of the cost.

TradersStudio® Professional Has Realistic Forex Analysis
TradersStudio Pro has complex support for backtesting systems to trade Forex. TradersStudio has created a session, which handles all the special Forex issues.
1) Margin is based on account leverage and lot size. Account leverage is set just like in real time trading when the account is created at the session level.
2) Trading Profit and loss is adjusted for interest rate differential, between the borrowing and lending countries.
3) Profits reported both in pips as well as dollars.
And much more, if you want to learn more about TradersStudio Professional’s Forex support and also how the interest rate differential is calculated please download the Forex Zip File, please be registered.
Trading Plan Overview
Trading Plan Overview
A Trading Plan is an extension of a Session because it applies the ideas behind the Session concept to multiple markets and applies money management and filtering strategies to the process.
A TradersStudio® Professional Trading Plan is what is called a ‘Meta-Control’ of one or more sessions. A Trading Plan runs one or more Sessions one bar at a time while accessing all the information from each session on a symbol-by-symbol basis. The Trading Plan can communicate with the Session so that Property changes at the Session level can be made while the Trading Plan is running. A simple example of this would be altering the number of units to buy or sell at the Trade Plan level based on the money management strategy. You can also filter trades by setting the number of units to ‘0,’ which allows trading only the best performing markets from a given basket.
TradersStudio Professional ships with a collection of the most popular Trading Plan concepts already coded for use in backtesting analysis or as a learning tool. However, TradersStudio Professional also gives you the ability to write Trading Plans with its powerful language for Trading Plan scripts.
TradersStudio Professional comes with many built it Trade Plan scripts. One of them is a percent margin plan. Percent Margined is a simplified version of an ‘Optimal f’ or ‘Fixed-Fraction type of money management strategy’.
Using this strategy, current capital is divided by the number of different markets that we are trading. For example, if there is $100,000 in the trading account and we are trading across a basket of 10 markets. In this scenario, there would be $10,000 available for margin for each market. Using the Percent Margined strategy takes a percentage of that $10,000 amount.
In this example, if 30% of margin were chosen as the level of Percent commitment, there would have been $3,000 available to trade each of the 10 markets in the basket. If margin on a particular commodity were $2,500 per contract, we would trade one contract. If margin for a market were $500 per contract, we could trade 6 contracts. If it were $20,000 per contract, we would not have enough money to trade that market until profits had accrued in the account.
This methodology is a fixed fraction strategy because margins are set once per run. If margin on a market is $2,000 and we want to be margined 20% trading 10 markets, we would trade one contract for every $100,000. Here is a quick explanation of the math. At 20% margin, we need $10,000 per market to trade one contract. If we fund an account with $100,000 to trade 10 markets, the account divided equally would represent $10,000 per market.
Margins are established by the exchanges and are based on relative volatility making this a useful strategy.
In order to use a pre-written trade plan you just need to fill in the dialog box below and click on the Next button to continue.

When you run a trade plan just like systems they can have parameters here we are setting percent margin to 25 and Ceiling for the most number of contracts to 100. We can also change run dates.

After the Trading Plan has run, we can see the results of using percent margin money management with all the default reports.

Trading Plans have the standard reports that Sessions have. There are tabs at the bottom of the screen for the Summary Report, Trade-by-Trade Report, Active Orders, Monthly Breakdown, Yearly Breakdown and an Equity Report.

The Equity Report is very powerful because it provides the return over the period and annual return. A problem with the result is that Percent Return does not include any reinvestment of profits so these numbers are greatly over-inflated. The Compound Annual Growth rate is the returns that compound interest rates over this period would produce. From this report, this simple system produces 19.89% returns. We can also see that our MaxDrawdown is 63.65%.
The MAR Ratio is Compound Annual Growth Rate divided by Percent Max Drawdown. In this system, the MAR Ratio was .3125. The Sharpe ratio is .6569. The system also had 1379 days between new equity picks with an average time of about 57 days.
Trade Plans also include three charts – Equity Curve, Log Equity Curve and Underwater Equity Curve. An example of the Underwater Equity Curve is shown here.

The large spike drawdown that occurred in 1994 was caused by the equity curve giveback on a large coffee trade.
What really makes TradersStudio Professional Shine is that with a few mouse clicks you can add multiple sessions to this trade plan and apply the money management run to 2 or more sessions. For example, we added a simple opening range breakout system containing the S&P 500 Index, the NASDAQ Index and Natural Gas.

TradersStudio Professional trade plans now divides our capital by 10 markets rather than the 7 markets used previously when applying the Percent Margined algorithm.

When the Trade Plan has finished running, starting with the same amount of money and combining two sessions produced $158.25 million in profits over the 26 year testing period! Maximum drawdown was a little over $15 million. Two units of natural gas are being traded in this simulation but because of the way the Percent Margined algorithm works, they are being traded using different sub-pools of money.
Examining the Equity Report shows the power of combining multiple sessions.

The Compound Annual Growth Rate is over 22.3 percent with a Maximum Drawdown of 17.15 percent. The MAR Ratio is 1.30. By inspecting and comparing the two Underwater Equity Curves, we can also see that the performance of Natural Gas in 1994 solved some of the issues caused by the Coffee trade.
For Sessions, the Correlation Matrix is provided on a market-by-market basis. At the Trade Plan level, it is provided session-by-session.

Because there is very little correlation between these two sessions, the results of the Trade Plan are enhanced.
Walk–Forward Testing Overview
The concept for walk-forward testing is similar to using ‘in-sample’ and ‘out-of-sample’ testing periods. Instead of optimizing on twenty years of data and using the last four years of data for testing, the optimization is done across ten years and the system is tested on the eleventh. Once this test is completed, move the whole time window forward one year and run the test run on the next year. Find the optimum set of parameters for each of the 10-year windows and use that set of parameters to trade for the next year. Move the time window forward one year and run the test on the next year until all of the years in the data series have been tested.
When the system performance is evaluated, all of the one-year windows are consolidated to compose the out-of-sample periods for each of the optimal windows. The out-of-sample performance is used to judge how good the system is. A major problem with doing this type of testing is that there is currently no software available that does walk-forward optimization.
An example of this would be what if the optimal parameter value changes as the testing moves to a different time window, how do we change the parameter used in the ‘out-of-sample’ walk-forward period? If a parameter value changes from ‘20’ to ‘22,’ it is not much of a problem but if there are two peaks with one at ‘20’ and the other at ‘50’ and the optimal value changes from ‘20’ to ‘50’ on a single walk-forward step, what value do we use?
This is a problem called ‘transitional’ or ‘boundary trades’ in walk-forward analysis. Let’s look at the following example.

In this example, the optimal parameter is different for the two periods shown in the screen shot. It changes from 10 to 20, which sets up the possibility that the trades are different between the two ‘out-of-sample’ windows. This sets up a ‘transitional trade’ that is handled by different rules. We can exit the open trade at the end of the ‘out-of-sample’ period and enter the open trade that bridges both the next optimization period and the next run period. In this example, the trade from March 11, 2003 (top table) to April 14, 2004 (bottom table) bridges the training and run periods, which is why it is a ‘transitional trade.’
In our testing setup, if we choose to exit trades only when the direction changes, we would create a trade that was entered on March 11, 2003, old run period and exits on April 14, 2004, which is in the new run period since these trades are both on the ‘Sell’ side of the market.
If we wanted to exit all trades, then we would exit the trade for the old run period on March 25, 2003 and wait until the first new entry to buy on April 14, 2004. Finally, the last option is to exit and re-enter or ‘rollover.’ This method exits the trade from the run period and enters in whatever direction (the same or different) that the system is in on the first day of the new run period.
These are a few simple examples attempting to explain this very important walk-forward concept. Now that you have a basic understanding how this works, the TradersStudio Professional walk-forward optimizer will help you take care of it.
If you want to learn more about walk forward testing you can download the PDF below which explains it in more detail. Walk Forward. Please be registered.
|