Click here to Login

Optimization in the statistical data analysis tool

Updated on 2009-07-16

In the last post, Statistical data analysis of time series, we have introduced the rule analyzer and explained how it works and what you can accomplish with.

In this post, we are going to discuss the optimization feature of this tool.
You know now how to create a trading rule and how to analyze it for a specific output.
The ability to create custom output is what makes this tool great. But there is another important feature, which is the optimizer, whose role is to let you quickly discover rules that match your output expectation.
Whether you are looking for securities return, future volatility, a likelihood of an event to occur, optimizing trading rules is something you will find interesting and useful.

To explain how it works, we will use an example. Let us take a simple one; a security making a new high.
The formula for this pattern is: close >= hhv(close, 30)
In the above example we are looking for securities that are making a 30 bar new high.

Here is when the optimizer comes into play, imagine you want to test not the 30 bar new high, but other values (10, 20, 40...)
This is easily accomplished in the rules manager, you just need to change 30 to a variable, let us say 'a'.
Our trading formula will be: close >= hhv(close, a); in the grid below the formula editor, you have to define the maximum, the minimum and the step value.

Setting 10 as minimum, 100 as maximum and 10 as step will let us create 10 variations of the original formula. Click now on 'Analyze the list' and set your symbols list, start and end dates, output... and then start the analyzing process.
After the optimization process is complete you will get detailed results about how the 10 rules variations performed for the specified outputs; you will be presented with a grid that contains the pre-defined metrics as well as your custom metrics if any.
It would be interesting to see how the average output changes for every value of the variable 'a'. It certainly interests a lot of trader.
Here is how to display this graph:
Right click on any formula to open a menu, click on the variable 'a' to display the graph.

Below the chart there are two combo-boxes, the first one let you choose which output formula to use. In this example I have only added one output formula, but you can have as many outputs as you want.

The second one let you choose a metric, this could be a pre-defined metric or you own metric.
I will let you decide how to use and analyze this data.
Note that you can create a formula with 2 or more variables and you will still be able to display how the output varies depending on the value of each of these variables.

In the menu that appears when you have right clicked on a rule. You may have noticed two others elements.
Search: Let you check trading formulas that contain specific keywords. The checked rules could be used to create a new list of rules.
Graph per output: Shows a graph that displays metric values for every output formula.

Combined with the rule analyzer and the custom metrics, I hope you can see how powerful this statistical data analysis tool is. But because we are never satisfied and always seeking for new features that would benefit our users, we will continue improving this tool as well as other QuantShare tools and plug-ins.

no comments (Log in)

QuantShare Blog
Search Posts

Recent Posts

Create Graphs using the Grid Tool
Posted 1292 days ago

Profile Graphs
Posted 1397 days ago

Previous Posts

How to deal with StockTwits data
Posted 5455 days ago

Trend following systems
Posted 5458 days ago

Working with the formula editor
Posted 5460 days ago

Optimization of trading rules
Posted 5471 days ago

Volatility and trading systems
Posted 5473 days ago

Trading Optimization
Posted 5474 days ago

Same chart, different symbols
Posted 5481 days ago

More Posts


Create an account
Affiliate Program
Contact Us
Trading Forum
How-to Lessons
About Us
Terms of Use

Copyright 2024
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
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.