Click here to Login




How to optimize a neural network using a genetic algorithm

Updated on 2011-11-19





If you haven't yet created your first neural network prediction model, I strongly suggest you look at the how-to lesson: How to create and trade a Neural Network model

A Genetic algorithm is an evolutionary algorithm that tries to solve optimization problems using techniques inspired by the natural evolution.

An example of an optimization problem is: Given several neural network inputs, which ones should I choose in order to generate a prediction model that is likely to be the most profitable.


Steps:

- In QuantShare trading software, select "AI" then "Optimizer"
- In the Optimizer Manager form, click on "Create"
- Select "Genetic Algorithm" then "Prediction Model" in the "What do you want to optimize?" list
- Update the genetic algorithm parameters then click on "Next". Example: for a quick optimization, set low values in the "Number of generations" and "Population size" fields.
- Click on "Select a prediction item" then select a neural network model
- Add as many inputs as you want. The optimizer will try to find the inputs combination that gives that highest fitness value.

Example of Inputs:
Relative Strength Index - RSI
Moving Average of the trading volume
Put/Call Ratio
Relative strength between a stock and the main market index
10-Bar Rate of Change

To create an optimization based on the neural net underlying trading strategy, type the following fitness formula:

Fitness = StrategyMetric;

- Click on "Next" twice then save your optimize item

To start the optimization of the neural network based on a genetic algorithm, select the previously saved item in the "Optimizer Manager" then click on "Run".











no comments (Log in)

Back







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.