Click here to Login




Simulator


Simulator

1. Simulator

 

1.1. Introduction

The Simulator lets you test strategies or trading systems under historical market conditions to determine whether certain scenarios would have worked well in the past. The idea is that if a trading strategy would have performed well previously, it may be worth considering today.

A trading system includes:

  • Buy rules
  • Sell rules
  • Short rules
  • Cover rules
  • Capital settings
  • Stops
  • Money management rules
  • Long and short ranking systems

 

1.2. Create a Trading System

 

Open the 'Simulator' (Analysis->Simulator)

·         Click on 'New'

·         Set entries and exits

·         Set the capital settings

·         Set stops

·         Set money management rules

·         Set symbols that are going to be used in this trading system

·         Set a ranking system

Finally, click on 'Create trading system'. 

1.4. Entries, Exits and Stops

 

simulator_entries.gif


System Type: specify whether to create a long, a short or a long/short trading system
Number of positions: Specify the maximum number of positions in the portfolio. You can use the advanced money management script to dynamically change the number of positions in your portfolio.
Entries and exits settings: If a label is underlined when the mouse is over it, click on the mouse left button to display a small menu. You can also update values directly using the mouse wheel.

simulator_controlbuy.gif

Entries and exits rules: Click on a rule or on "add rule" to update, add, remove and manage rules.

Specify the stops to apply to the trading system by clicking on the appropriate icon:

·         Maximum loss stop: Exit a position if the symbol's performance (points or percent) falls below this level

·         Profit target stop: Exit a position if the symbol's performance reaches this level

·         Trailing stop: Exit a position if the symbol's drawdown falls below this level

·         N-bar stop: Exit a position after a specific number of bars 

1.3. Capital Settings

simulator_capital.gif

 

The Capital settings include:

  • Initial equity
  • Periodicity: rebalance period
  • Reference symbol: generally an index like the SP500
  • Risk free rate
  • Percent of capital to invest: Specify the percentage of capital to invest
  • Activate stop immediately: If activated then when exiting a trade because of a stop, uses the stop value as the trade exit price, otherwise exit as defined in the sell or cover price and delay settings)
  • Reverse entry forces exit: When checked, the back-tester will close a long position if he encounter a short signal for the same symbol and close a short position if he encounters a long signal for the same symbol.
  • Reject trade if position size is higher than x times the symbol's volume for that day: tell the back-tester to enter position only if there is enough liquidity.
  • Margin: a factor to specify the margin you want to allow for this trading system (A value of 2 means that the amount of money you are allowed to use within this trading system is twice your current equity value)
  • Minimum shares: This is the minimum number of shares you can buy or short. (The position will not take place if the number of shares to buy or short is less that this value)
  • Minimum position value: The same as 'Minimum shares', but we use here the position value or volume.
  • Commissions: Brokerage commissions
  • Slippage: specify the average slippage associated with each trade. (Difference between the simulated entry price and the real entry price)
  • Allow penny stocks: Reject a trade or a position if the stock price is lower than 2. Use this field only if you are trading stocks.

 

1.5. Money Management

See Advanced Money Management 

1.6. Optimize a trading system

 

You can optimize a trading system using the optimizer plug-in or using the simulator optimizer.
The optimizer plug-in uses complex algorithms to find the best trading system, while the integrated simulator optimizer use bulk optimization (that is, the simulator will back-test all the possibilities)
 

 

1.7. Run or optimize a simulation


To run a simulation, first select a trading system, and then click on "Simulation".
To optimize a simulation, first select a trading system, and then click on "Optimize". 


 

1.8. Trading System Report

 

1.8.1 Introduction


The "Trading System Report" analyzes all the signals generated by the simulation and gives you a detailed report.

1.8.2 Grid
 

The grid control shows you the simulation basic statistics.
When using optimization, this grid shows all generated simulations, a column for each variable shows you what value were used for each simulation.

 



Double click on the 'Report' column icon to open the report of the selected simulation.

1.8.3 Chart


Plot equity, drawdown and others time-series graphs.

Right click on the chart to open a menu.
You can create new panes, remove panes, and remove a graph from a pane...


To add a graph to a pane, select a time-series from the combo box as shown below then click on 'Drag' icon then drag the time-series and drop it into a chart's pane.

 

To draw entries and exits signals in a symbol chart, check 'Plot Entries & Exits on chart' then select a symbol that was used in the simulation.




The symbol chart will look like the picture below. Click on the arrows to display the position details.


 

1.8.4 Statistics

 

Capital:

Initial Capital – The size of your account before the simulation started

End Capital – The size of your account after the simulation ended

Net Profit – The profit generated by the trading system

Net Profit in Percentage – The profit generated by the trading system in percentage

Exposure – The percentage of your account that was invested for all bars

Net Risk Adjusted Return – Net profit % divided by Exposure %

Annual Return – Compounded annual return %

Risk Adjusted Return - Annual return % divided by Exposure %

Average Profit/Loss - (Profit of winners + Loss of losers)/(number of trades)

Average Profit/Loss in Percentage - (% Profit of winners + % Loss of losers)/(number of trades)

Average Bars Held - sum of bars in trades / number of trades


Winners:

Total Profit – Total profit generated by winning trades

Number of Winners – The number of winning trades

Average Profit - Average profit of the winning trades

Average Profit in Percentage – Average profit of the winning trades in percentage

Average Bars Held For Winners

Max Consecutive Winner

Largest Winner

Number of Bars in Largest Winner


Losers:

Total Loss – Total loss generated by loosing trades

Number of Losers – The number of loosing trades

Average Loss - Average loss of the loosing trades

Average Loss in Percentage – Average loss of the loosing trades in percentage

Average Bars Held For Losers

Max Consecutive Loser

Largest Loser

Number of Bars in Largest Loser


Drawdown:

Maximum Trade Drawdown - The largest peak to valley decline experienced in any single trade

Maximum Trade Drawdown In percentage - The largest peak to valley decline in percentage experienced in any single trade

Maximum system drawdown in dollar - The largest peak to valley decline experienced in portfolio equity

Maximum system drawdown in percentage - The largest peak to valley decline in percentage experienced in portfolio equity

Recovery factor - Net profit divided by Maximum system drawdown

CAR/MaxDD - Compound Annual percentage return divided by Maximum system percentage drawdown

RAR/MaxDD - Risk Adjusted Return divided by Maximum system percentage drawdown


Misc:

Number of trades – The total number of trades generated by the simulation

Percent of winners – The percentage of trade's winners

Annual turnover – Example: a value of 100% means that the average holding period of a trade is one year; a value of 200% means that the average holding period of a trade is six months

Total trading costs – The sum of all the trading costs generated by the simulation

Volume activity – The sum of all the positions size generated by the simulation

Percent trading cost of volume - Total trading costs / Volume activity

Percent positive days – The percentage of positive days in the simulation equity

Percent positive months - The percentage of positive months in the simulation equity

Percent positive years – The percentage of positive years in the simulation equity

Average daily return

Average weekly return

Average monthly return


Stats:

Ulcer index - Square root of sum of squared drawdown divided by number of bars

Ulcer performance index – This indicator is used to measure the riskiness of an investment

K Ratio - A ratio that is used in the performance evaluation of an equity relative to its risk. The ratio examines the consistency of equity's return over time. Higher is better

Standard deviation - A measure of the dispersion of a set of data from its mean. The more spread apart the data, the higher the deviation. Standard deviation is calculated as the square root of variance.

Downside standard deviation - The downside standard deviation from the ordinary standard deviation insofar as the sum is restricted to those returns that are less than the mean

Sharpe ratio - The Sharpe ratio tells us whether a portfolio's returns are due to smart investment decisions or a result of excess risk, the higher the better

Sortino ratio - The Sortino ratio is similar to the Sharpe ratio, except it uses downside deviation for the denominator instead of standard deviation, the higher the better

Profit factor - Profit of winners divided by loss of losers

Payoff ratio – Ratio of average wins / average loss


Performance Vs Benchmark:

Beta - A measure of the volatility, or systematic risk, of a security or a portfolio in comparison to the market as a whole; if a stock's beta is 1.2, it is theoretically 20% more volatile than the market. 

Alpha - A measure of performance on a risk-adjusted basis, a positive alpha of 1.0 means the fund has outperformed its benchmark index by 1%. Correspondingly, a similar negative alpha would indicate an underperformance of 1%.

R Squared – The percentage, of a fund or security's movements, that can be explained by movements in a benchmark index. R-squared values range from zero to 100. An R-squared of 100 means that all movements of a security are completely explained by movements in the index

Correlation - a statistical measure of how the security and the benchmark move in relation to each other

 

1.8.5 Trades


Realized trades: This window shows you the list of all realized trades.

Trades flow: This window shows you the list of all the trade's entries.


 

 

1.8.6 Detailed trades


This window shows you the entries and exits of the trades on a bar-basis.


 

1.8.7 Performance Per


This window shows you the performance of the trading system per day, week, month and year.


 

1.8.8 Symbols


The Symbols tab contains the list of the symbols that were used by the simulation.

 

1.8.9 Formula


The formula tab contains the formula that was used to create the trading system.

 

1.8.10 Profit distribution


Display a graph that shows you the profit distribution.


 

1.8.11 MAE/MFE


Display two graphs, one for maximum adverse exclusion and the other for the maximum favorable exclusion.


 

 

1.8.12 Custom graphs


Create custom graphs, could be Trade/MAE or Drawdown/MFE...

 

1.8.13 S.I.M.I


Shows you the position symbols distribution over markets, industries, sectors and indexes.


 

1.8.14 Reference symbol


The symbol used as reference.

 

1.8.15 Exit rules


Shows you the exit rules distribution and the average trade's performance for each exit rule.


 

1.8.16 Report settings


The Report settings tab allows you to define the default graph interval values.

1.8.17 Errors Tab


This tab displays the errors, if any, that occurred during the execution of the money management scripts.

The tab name changes to "No errors" if no errors occur during the money management scripts execution or if no money management rules is defined.




Manual

 

Back Parent

 

Download Manual in CHM or PDF format







QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.