Click here to Login





                                                   How to map the chromosome to the optimal rule in PBIL optimization?

  0

0
Kiran
2015-04-11 13:41:31


I followed this blog (http://www.quantshare.com/sa-586-let-me-show-you-how-to-create-hundreds-of-profitable-trading-systems) to build a multi-rule system and optimized using PBIL.
My rule-set has only 14 rules, but some of them have multiple parameters - e.g. P1 (min=10, max=60, step=20) and P2 (min=0, max=10, step=5), which generate 100's of rules.

How do i map the optimal chromosomes a and b below to the rules? Couldn't find a menu option in the Optimizer that shows this mapping.
I'm not sure what order the rules are numbered in this ?ApplyRule command, which determines the chromosome.
ct = ApplyRule("", "stock_picking", -1);


// Information from AI Optimizer
// Update the following variables in your formula:
// a = 3
// b = 44
// r1 = 0
// r2 = 0
// w1 = 10
// pick Entry rules
ct = ApplyRule("", "stock_picking", -1); // Return number of rules
Optimize("a", 0, ct - 1, 1); // Optimize variable "a" from 0 to Number of rules -1
Optimize("b", 0, ct - 1, 1); // Optimize variable "a" from 0 to Number of rules -1
rule1 = ApplyRule("", "stock_picking", a) AND ApplyRule("", "stock_picking", b) ; // Execute the rule specified by the index value referenced by variable "a"

Ruleset
http://www.quantshare.com/sa-586-let-me-show-you-how-to-create-hundreds-of-profitable-trading-systems



QuantShare
2015-04-13 02:39:27

  0

You just need to comment "Optimize" functions and add the variables like this:

// Optimize("a", 0, ct - 1, 1);
// Optimize("b", 0, ct - 1, 1);

a = 3;
b = 44;



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
The 2 Percent Rule
How far are the close prices from the support line
Market Rule based on the Crossover Between Stock Close prices and...
Number of Times an Event Occurred in the First N-Minutes of a Tra...
Trading Rules to use with the Trading System Optimizer

How-to Lessons
How to download a trading item from the Sharing Server
How to dynamically update the settings of an indicator
How to plot the relative performance of several stocks/indices
How to plot the number of stock tweets per day
How to automate the data downloading process

Related Forum Threads
How do you retrieve the entry and exit price for a position?
How do I refer to the close price of another symbol in a formula?
How to view the raw data files?
How do I simulate if then statements for the simulator?
How to determine if the a given day is a trading day?

Blog Posts
How to create market indicators using the composite function - Pa...
Buy the best/top rated stocks or how to create powerful rank base...
How to use the new Market Regimes Feature in QuantShare Trading S...
How to Pick the Best Trend Indicators
How to Display the Year-to-Date Excess Return in a Pivot Table









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.