[ Pobierz całość w formacie PDF ]
.D.That being said, let us continue with our dialogue.Joe Trader uses a trading strategy that employs moving averages in aquasi-systematic manner.He has enjoyed some degree of success employ-ing moving averages in a somewhat unique manner.Joe believes he wouldbe able to make more money trading if he understood more about howthey worked and why they were effective.In pursuit of this information, hehired Alex Programmer to write a computer program that will allow him toformulate and test his trading strategy.The following conversation ensuedas Joe explained his methods. I buy when the moving averages look good and I sell when the aver-ages look bad, says Joe Trader. Hmm, that s pretty interesting.Does it work? says AlexProgrammer. c07 JWPR070-Pardo December 18, 2007 19:18 Char Count=148 THE EVALUATION AND OPTIMIZATION OF TRADING STRATEGIES Sometimes, says Joe T. Interesting, says Alex P. But we are going to need to be a lit-tle more specific to test this idea.Do you mind if I ask you a fewquestions?Joe:  I guess not, but I hope it won t take too long.Alex:  Okay.Can you first tell me what you mean by the averages look-ing good?Joe:  Yeah, but I think it s pretty obvious.The averages look good whenthe short one just blasts through the long one.Alex:  Well, it may be obvious to you, but it is not to me nor will itbe to the computer.By  blasts through do you mean that the fastermoving average MA1 crosses from under to over the slower movingaverage MA2?Joe:  Yep.Alex:  Good.Does it matter how much MA1 crosses over MA2?Joe:  Sometimes yes, sometimes no.It all depends.Alex:  On what?Joe:  It s hard to say.Alex:  Well, then, maybe we should leave how much it crosses over forfuture improvements.Let s just get the basic system formulated first.We know that we will go long if MA1 crosses from under to over MA2.Now, what do you mean by  the averages look bad ?Joe:  That should be obvious, too.They just fall apart, go to hell in ahandcart.Alex:  Well, since we go long when MA1 comes from under to overMA2, am I correct in assuming that we go short when MA1 crossesfrom over to under MA2?Joe:  Uh-huh, you got it, Alex.Alex:  Good.This looks like we are always in a position.Is that cor-rect?Joe:  Most of the time.Alex:  When are you not in a position?Joe:  When the whole thing just falls apart.Alex:  What do you mean by that?Joe:  When the market isn t moving, moving averages just cut me topieces.Alex:  What do you mean when you say  the market isn t moving ? c07 JWPR070-Pardo December 18, 2007 19:18 Char Count=Formulation and Specification 149Joe:  There is just no action.Lots of little swings, but no big swings.Alex:  Does that mean that this moving average strategy is really onlyable to catch big swings?Joe:  Yes.Alex:  What is a big swing, then?Joe:  That depends.Alex:  On what?Joe:  The market.Alex:  I see.Does this vary from market to market and from year toyear?Joe:  You got it.Alex:  Do different length moving averages have an impact on this?Joe:  Yeah.Alex:  How do you determine which ones to use?Joe:  I play around with different moving averages in my charting pro-gram and use the ones that look good.Alex:  Well, you don t know anything about the profit and risk perfor-mance of these averages that  look pretty good, do you?Joe:  No I don t.That s why I hired you.You re supposed to figure thisall out for me.Alex:  Well, I will do my best.How do you control your risk when youtake a position?Joe:  It depends.If one average just blows through the other like a batout of hell, I usually make some money right away and it s no problem.But sometimes the market just looks pretty lame, and I put in a closestop on the position.Alex:  You mean sometimes you use a stop, and sometimes you don t?Joe:  Uh-huh.Alex:  That sounds inconsistent and could be dangerous as well.Doyou want to test the strategy with and without a risk stop?Joe:  Yes, that s a good idea.Alex:  Okay.I will build this in as an option.What do you do when youhave a winner?Joe:  If I get a couple of grand in it, I usually ring the cash register andtake profits.Alex:  Do you mean that you take a profit after you have made a certainamount of money in position? c07 JWPR070-Pardo December 18, 2007 19:18 Char Count=150 THE EVALUATION AND OPTIMIZATION OF TRADING STRATEGIESJoe:  Yep.Alex:  How much is enough?Joe:  It depends.Alex:  On what?Joe:  The market.How I have been doing lately.How I feel.A lot ofstuff.Alex:  Well should I build in some kind of profit idea as an option inthe program?Joe:  That would be great.Alex:  Let us see what we have here.Our basic trading model usestwo different-length moving averages.The model is always either longor short unless our optional risk or profit management exits a trade.We go long if the faster average goes from under to over the sloweraverage.We go short when the faster average goes from above to belowthe slower average.Is that correct?Joe:  So far, so good.Alex:  There are two variations on this basic model.A risk stop and aprofit target order.The use of either of these will lead to an alterationof the model.If a position is exited using a risk stop or a profit or bettertarget order, then the model will not always be in the market.Is thatokay?Joe:  Let s just play it by ear and find out.Alex:  Okay.I will set up this program to have user-definable movingaverage lengths.It will have an option to use a risk stop, a target profit,or both.The program will be capable of testing a batch of different-length moving average combinations.Do you think this will do it?Joe:  It s a start.Let s see what happens.MAKE A VAGUE IDEA PRECISEThis little melodrama serves to highlight the vagueness that can surrounda trading strategy at the inception of the development process.Joe Tradermay seem a bit extreme.The number of ways in which a trading strategycan lack clarity, however, are too numerous to list.And, in truth, Alex Pro-grammer was a lot better communicator and far more accommodating thanmany programmers.You may engage yourself in this type of dialogue or you may enlistoutside help.However, the collection, organization, and exact specification c07 JWPR070-Pardo December 18, 2007 19:18 Char Count=Formulation and Specification 151of the trading strategy, which are done next, and as were illustrated in thisdialogue, are the essential first steps.A trading strategy is a set of precise rules and formulae, no matter howsimple or complex.If the trading idea cannot be expressed in a way that isprecise and logical, then it is not a trading strategy.The trading strategy discussed in the dialogue above can be describedin three ways: ordinary English, precise rules and formulae, and computercode.The English version is pseudocode.The formulae represent a moreexact representation of pseudocode on its way to becoming computer-testable code [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • funlifepok.htw.pl
  •