To get a useful reply your first post should have included your objective.
Otherwise, people replying are only shooting in the dark.
is it to have a good thesis?
Is it to have solid test of a trading system over random?
What time frame and what instruments?
What market period?
IF you are trading stocks then certain MA crosses are for trend change (with the divergence for trend direction eg shorter above longer is up IF there is an appreciable slope to the MAs).
Others -shorter time frame - for entry.
Exit can be done with stops and profit targets.
(Some people use MAs as support/resistance as mention in a prior post)
Until you decide what you are trying to accomplish the selection of the periods is secondary.
Hi aquarian!
You are right when you say that I should be more specific. So here it goes!
I'm finishing a masters degree in Mathematical Finance. This is a new master in my university (my class will be the first one finishing it) so I'm still very suspicious wondering at what level are all teachers truly comfortable dealing with these kinds of models specific in this field ( but they are all excellent mathematicians

...)
Regarding my theses.... They gave me a lot of liberty to explore anything that a want. Since the beginning of this master that I'm very fascinate with algo trading. So I've told them that initially, I would like to study the basis of Technical Analysis. And this is what I thought of doing.
1) Starting with Moving Averages(MA) (because this is one of the most obvious ones, I believe...). Creating in R a script with MA. Then I would create a dynamic portfolio with only one stock, and implement a trading idea around the MA. Then I would have to find the best (short,long) pair of MA in order to optimize my portfolio results ( I will compare it with the Buy and Hold Strategy and see which one is better). To find the best (short,long) pair of MA I'm thinking about applying three different methods.
a) A simple grid. Just by choosing a grid and test all (short,long) in the grid and get the best one.
b) With a larger grid, but instead of going one by one, testing only a few, inside the gird, chosen randomly.
c) Trying to apply some learning methods.
The idea is to compare this three methods taking in consideration the performance comparing with the Buy and Hold strategy and SPEED. For example, the method a) can probably give better results compared to b) since it will see all combinations of (short, long) but it can take a lot of time for a reasonable large grid. Since b) doesn't look to all dots in the grid, it will be faster but sometimes it can miss some good pairs of the grid.
Then i would like to introduce some other technical indicator and see the impact ( hopefully positive) that it can have in my portfolio.
I've already have the grid method, so a). I will start soon trying to do b) ( doesn´t seem rocket science). And then I'm trying to choose a learning method which i haven't been able to do it yet.
Thks a lot to EVERYONENE for all your help.
Tomás