Click here to Login





How to add a metric in the trading system simulation report

Updated on 2011-10-20 05:42:59

Share |

The simulation report appears when you backtest or optimize a trading system. In the top panel, it displays a table, where each row represents a trading system backtest result. The table contains the following columns: Name, Annual return, Maximum drawdown, Sharpe ratio, Percent of winner trades and optimizable fields.

In this post, we will show you how to create a custom metric.


Steps:

- Select "Analysis" then "Simulator"
- Click on "Create a metric" (If the menu is not extended then click on the "+" icon)
- Click on "Help" to get information about the methods and variables available in the metric script tool
- Type the following script:

if(AnnualReturn > 10 && SharpeRatio > 1 && SortinoRatio > 1.5)
{
  Fitness = 1;
}


Our metric returns one if the backtested strategy meets the following criteria: Annual return higher than 10%, Sharpe ratio higher than 1 and Sortino ratio higher than 1.5

- Click on "Save Formula", type a name for the metric (Example: MyMetric) then click on "Save Item"
- Close the form then click on "Metrics" in the simulator manager
- Check "MyMetric" then click on "OK"
- Select a trading system then click on "Simulate" or "Optimize"

The report tool will display a new column called "MyMetric".




Note that you can also add a metric by using the money management tool.








2 reviews (Log in)







Other how-to articles




How to add custom position-based metrics to your trading system





How to optimize the stop limit of a trading system





How to debug a trading system using the money management tool





How to optimize the number of positions in a trading system





How to download a trading item from the Sharing Server





How to generate buy/sell signals from a trading system





How to add a trading indicator to a chart





How to set order type of a trading system programmatically





How to optimize an indicator in your trading system







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.