Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Genetic Optimizer
Collapse
X
-
Originally posted by whitmark View Post
5. Have you considered implementing a parameter stress test feature. If not, you might be interested in learning more about it and how it can promote more stable parameter selection.
-
Doubles are supported. You just can't (yet) specify the increment. The code looks at the data type & rounds double parameters to 2 decimal places. You don't need to do what you are talking about regarding multiplying the params.
I was first introduced to GA stress testing when using the Grail Genetic Optimizer for TS that is no longer being distributed. I'll pm you some information on the stress testing idea. I wanted to mention too that your fitness function threshold idea for screening multiple instruments would be very useful. I suspect the threshold value could be passed in as a strategy parameter.
Regards,
Whitmark
Comment
-
Money Management combined with SQN
Hi Pete,
Since you did such a great job with SQN and the genetic optimizer, I come back to you with another important missing link in NT (to my knowledge): Money Management. This is for me the third pillar that should be implemented.
Still referring to Van Tharp, as I did for SQN, Money Management is critical to any serious trader in terms of defining the goal he wants to achieve and protecting his capital. Any strategy should include this feature because it is the one which by far will have the largest impact on the final gain. Combined with an optimization based on the SQN number, it is the best way to grow and protect your capital.
Basically, what should be achieved should go along these lines:
1. Beeing able to define a level of risk in terms of % of the trading capital. When I speak of capital here, I mean the capital evolving with time after each trade (going up and down according to the result of the previous trade).
Risk_Capital(%)= n(# of future contracts or stocks)*(Entry($)-Stoploss($))/Capital($)
A typical value for Risk_Capital is of the order of 1% or less. This could eventually be increased if you have a SQN above 4. Any value above 3% is considered as “financial suicide”.
By defining Risk_Capital, you will be able to define for each “next” trade the amount of contracts or stocks “n” as:
n(number of contracts or stocks)= round(Risk_Capital(%)*Capital($)/(Entry($)-Stoploss($))). n has to be greater than 1 or the trade can't be taken.
By doing this, you see that if you enter in a serie of losing trades, your Capital($) will decrease and n will decrease accordingly. Inversely, if your Capital increase, n will increase also. This is Money Management 101…
2. Beeing able to impose a minimum reward to risk ratio defined as:
RewardtoRisk= (MinimumProfitTarget($)-Entry($))/(Entry($)-Stoploss($))
RewardtoRisk should be higher than 2. Statistically, on a large number of trades, you should not enter a trade if you have not the opportunity to gain at minimum the double of your initial risk.
Defining the RewardtoRisk allow to calculate the MinimumProfitTarget($) as:
MinimumProfitTarget($)=Entry($) + RewardtoRisk(>2)*(Entry($)-Stoploss($))
Today, I don’t see this being clearly defined in NT, so I use the following to optimize strategies on ES:
Parameters
ProfitTarget: 24, 512,1
Stoploss: 1,12,1 (This allow a minimum RtoR of 2 with 24/12)
These two parameters are used in the window “Stops and Targets” window.
Very brutal and inefficient way to try to achieve a RtoR above 2 combined with the optimization of the StopLoss and the ProfitTarget.
Optimize
Optimize on: my system quality number
Optimizer: genetic optimizer
Order Handling
Entries per direction: 10
To allow more than 1 entry in a given direction but does not achieve any kind of Money Management.
Order Properties
Set order quantity: by strategy
In the end, in the Order Properties, could it be possible to select a “by Money Management” option that would allow to enter:
Risk_Capital(%): 0.1%, 1%, 0.1% (min, max, increment)
RewardtoRisk: 2, 10, 1 (min, max, increment)
They could be a constant or preferably parameters to be optimized.
“by Money Management” would compute “n” and “ProfitTarget” for each trade in function of Entry, Stoploss, RewardtoRisk, Risk_Capital and updated Capital.
Thanks for you feedback.
Best regards.Last edited by Ragingbull; 07-26-2008, 06:06 AM.
Comment
-
This is such a great piece of work. Thank you for sharing. You are great! I cant believe that this GA did find the best set of paramter in almost 1/1000th of time it would have taken to run thru all the parameters.
Thanks to you, I can now really focus on making my strategies as flexible as possible and test it for almost any parameter. Do you ever intend to add support for boolean? I think that can be a great asset. And if you add Datetimem then it will help a crazy person like me to find out what is the most optimal time to trade in the market.
Kudos for the work!!
Rishi
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by judysamnt7, 03-13-2023, 09:11 AM
|
4 responses
57 views
0 likes
|
Last Post
by DynamicTest
Today, 08:25 PM
|
||
Started by ScottWalsh, Today, 06:52 PM
|
4 responses
36 views
0 likes
|
Last Post
by ScottWalsh
Today, 07:40 PM
|
||
Started by olisav57, Today, 07:39 PM
|
0 responses
7 views
0 likes
|
Last Post
by olisav57
Today, 07:39 PM
|
||
Started by trilliantrader, Today, 03:01 PM
|
2 responses
19 views
0 likes
|
Last Post
by helpwanted
Today, 07:25 PM
|
||
Started by cre8able, Today, 07:24 PM
|
0 responses
9 views
0 likes
|
Last Post
by cre8able
Today, 07:24 PM
|
Comment