Strategy Trading in 4 Parts
Transcription
Strategy Trading in 4 Parts
Strategy Trading (In Four Parts) © 2012 Sunny J. Harris ALL RIGHTS RESERVED Introduction • After 30+ years of trading, research, & teaching, Sunny Harris has developed many strategies both for herself and for clients. • Primarily, Sunny trades for her own account. She does not trade OPM, or a Hedge Fund. Her own proprietary trading makes such high percentages she won’t even reveal it, because it seems unbelievable. • Sunny likes to teach other people to have great successes for their own accounts. That’s what this seminar is about. About Sunny • • • • Sunny J. Harris BA, MS, PhD Mathematics Trading since 1981 (30 years) #1 Rated trader by Stark Research 1993 & 1994 (365% & 178%) • Research: Programming & Testing since 1981 • Teaching others to trade since 1986 Books by Sunny • Trading 101—How to Trade Like a Pro • Trading 102—Getting Down to Business • Electronic Day Trading 101 • Getting Started in Trading • TradeStation Made Easy! • Working on Grading the Gurus • …and more after that Critical Acclaim – Technical Analysis of Stocks & Commodities magazine – Top 10 Consultants – Technical Analysis of Stocks & Commodities magazine – Top 10 Courses & Seminars – Top trader at 365% in under $10 mill – Stark Research Published Articles • • • • • • • • • • • • • • • How Good is Your Data? (TASC Feb 2011) Futures, Omega Magazine, Traders’ World, Active Trader, Stocks & Commodities (magazines) “From No System to a Proven System in Three Well-Defined Steps” “Clustering Effects of Good Optimization” “Day Trading Basics” “Trading Difficult Markets” “Learning to Trade: A Systematic Approach” “On the Job Training” Sunny Answers Users’ Questions on Quote.com “Nuggets of Profitability” “Testing, Testing, 1, 2, 3… “Working for a Living” “Optimal Trading” “Asking the Right Questions for Trading Success” …and many more: see www.moneymentor.com Appearances – – – – – – – – – – – – – – – – – – – – – – – – Frequent guest of Richard Saxton on Channel 22 KWHY TV in Los Angeles Radio Interviews Online Chat Sessions for INO.com and Quote.com Online Investor Expo (a Money Show production) —December 2000 Futures West International Online Trader Expo Online Investor Expo Equis Online Trading Summit —January 2001 “Get Off the Floor” —Chicago Mercantile Exchange —July 1998 Market Technicians Association Symposium —Chicago, November 1998 “Electronic Trading” Chicago Mercantile Exchange —January 1999 Futures South —February 1998 Futures West —September 1998 TAG 19 —November 1997 Omega Research Group of Dallas —1997 Omega Research Group of Orange County —1998 Omega Research Group of San Diego —1997 Omega World 1 Omega World 2 Online Investors Expo Barnes & Noble book signings Omega Research Users’ Groups AAII groups The Winner’s Edge” —Orlando, FL, March 1996 Sabbatical • From 2002 until 2011, Sunny took time off her hectic schedule to raise her grandsons, of whom she has custody. • Now, by 2011 they are independent enough to allow Sunny time to trade and teach again • “TradeStation Made Easy!” was released in early 2011 • And I’m back to Speed Trading on 1-& 5-minute charts. Four Sessions What is a Strategy & How Do I Get One? Designing YOUR Strategy Testing & Optimizing Your Strategy How to Trade a Strategy What is a Strategy and How Do I Get One? What is a Strategy? • • • • Recipe Map Set of Rules IF...THEN... Consequences – aka Boolean Algebra • Plan • A fixed set of rules that you follow What is a Strategy? • What if you don’t follow all the rules? • Then it is called discretionary trading • or Cheating What is a Strategy? • If you don’t follow the rules you can’t really measure the success of your system • How could you “backtest” a discretionary system? • That’s just using guessing or using intuition (aka “into-wishing”*) *term coined by Adrienne Toghraie What is a Strategy? • If you are using discretionary trading, you can’t run experiments on it and generate results that you can compare to other strategies or other input parameters • You can’t independently compare a discretionary system to another system What is a Strategy? • If you feel you need to use discretion, two things could be possible – you haven’t stated all your rules – your system isn’t “well-defined” – you don’t want to know the truth of the testing outcomes What is a Strategy? • Before risking capital in the markets, know how your strategy could have performed in the past. • Why do people NOT like to test? – – – – – Tedious Time Consuming Don’t Understand the Process Don’t Think it is Important Don’t Want to Know the Results What is a Strategy? • • • • You need some tools for testing Pen & Paper Excel (Microsoft Office) Already built-in to TradeStation’s EasyLanguage & MultiChart’s PowerLanguage • Called Reserved Words – or Built-In Functions – or Operators Boolean Logic/Algebra • George Boole, way back when, invented another way of doing arithmetic without numbers • He used logic • The terms are True and False • And IF and THEN Boolean Logic/Algebra • To properly use Boolean Algebra you must know the functions of operators on the values of True and False • These different outcomes are called Truth Tables • They look like this: Boolean Algebra: TRUE AND Premise 1 Premise 2 Outcome T T T T F F F T F F F F Boolean Algebra: OR OR Premise 1 Premise 2 Outcome T T T T F T F T T F F F IF…THEN… • Sunny has red hair = True • Sunny is 6’ tall = True • Sunny has green hair = False • Sunny has red hair AND Sunny is 6’ tall = True • Sunny has green hair OR Sunny is 6’ tall = True • Sunny has green hair AND Sunny is 6’ tall= False IF…THEN…Consequence • We specify it like this: • IF something happens THEN do the consequence • If the “something happens” is TRUE, we do the “consequence” • But if the “something” happens” is FALSE, we DON’T do the “consequence” • This is called Logic, or Boolean Algebra Set of Rules • Rules look like this: • IF {it rains today} THEN {take my umbrella}; • IF {it doesn’t rain today} THEN {don’t take my umbrella}; Set of Rules • It is the IF…THEN…Consequence pairing that makes a Strategy/System • You need rules to tell you: – When to get in – When to get out if you’re right – When to get out if you’re wrong • That’s it. What Is a Strategy? • Let’s get down to EasyLanguage / PowerLanguage Basics for a moment IF...THEN... • IF ( • Condition(s) • ) Conditions • Conditions can be any thing that evaluates to True or False • Examples: – – – – – – C > C[1] C > XAverage(C,10) H > Highest(H,10)[1] Angle less than certain value RSI > 70 etc Consequences • What to Do IF the Condition evaluates to TRUE: • Examples: – THEN – Buy – at H + 0.1 stop; The Whole Statement IF Condition1 THEN Buy at H+0.1 Stop; Condition0…99 • TS and MC allow unnamed conditions in the range from 0 to 99. • Thus you have 100 conditions you don’t have to name in input or variable statements • Condition0, Condition1, Condition2, etc all the way to Condition98, Condition99 IF…THEN…System Structure • • • • • IF … THEN logic BUY and SELL Setups Entries Exits IF…THEN… • • • • When to Enter When to Get Out if You’re Right When to Get Out if You’re Wrong (Thanks to Joe Krutsinger who put it so succinctly) IF…THEN… • Enter on Conditions – – – – – IF MovingAverageCrossover IF NewHigh IF HighVolume IF BreakOut etc • Enter on Stops (not Limits) • IF condition THEN BUY at Highest(H,3)[1]; • IF condition THEN SELL at Lowest(L,3)[1]; IF…THEN… • IF condition THEN Exit; • Conditions – Same as entry – Different from entry – Price hits pre-defined value • ie ProfitTarget • ie StopLoss – Price hits moving average – Price hits support or resistance – Secondary indicator performance IF…THEN… • When to get out if you’re wrong – – – – IF C < EntryPrice – amount IF C < Average(L,10) IF C < Lowest(L,10)[1] etc Why Do You Need One? • • • • • • Psychology Discipline Statistical Evaluation Promoting Yourself Your Business Plan Trading OPM How Do You Get One? • Buy It – See FuturesTruth http://futurestruth.com – See Club3000 Bo Thunman • Lease It – Brokerage houses • Create Your Own – – – – Years of Observation Years of Research Years of Programming & Testing Years of Simulated Trading • Employ Consultant to Do It For You – Tell them your rules – Let them suggest rules – Experiment How Do You Get One? • Discretionary Trading (no system) • Purchasing Systems – Sources – Performance Comparisons – Pit falls • Building Your Own System – Basic Structure of a Strategy • IF … THEN … BUY/SELL • Market vs Limits – Using TradeStation’s / MultiChart’s Components • Examples of Strategies – – – – Moving Averages Larry Williams Joe Krutsinger Sunny Harris Discretionary Trading (no system) • • • • • Hit and Miss Throwing Darts Feelings Intuition (“Into Wishing”) News & Events Purchasing / Leasing Systems • Sources • Performance Comparisons – Which Statistics Matter? • Pit falls – – – – Don’t know “what’s behind it” Might not know long-term performance “NIH” – Not Invented Here Expiration Leasing a Strategy Building Your Own System • Basic Structure of a Strategy – IF…THEN…Buy/Sell – Market vs Limits • Using TradeStation’s or MultiChart’s Strategy Components Components Examples of Strategies • • • • Moving Averages Larry Williams Joe Krutsinger Sunny Harris • See the upcoming “Grading the Gurus” for more Moving Averages • Price above or below Moving Average • Fast Moving Average crosses Slow Moving Average Price Crosses Above or Below MAV MAV Crosses Itself Larry Williams • OOPS • SmashDays Larry Williams OOPS INPUTS: jset(1) {which set of conditions}, jDay1(3), jDay2(4), {Not which days} jVLen(9), jLen(9); {Avg lengths} Condition1 = OpenD(1) < LowD(2); //Opening below the previous day's low (Buy setup) Indicates potential market reversal Condition2 = OpenD(1) > HighD(2); //Sell setup Condition3 = Dayofweek(Date)<>jDay1; //not day of week Condition4 = Dayofweek(Date)<>jDay2; //not day of week Condition5 = Volume > Average(Volume,jVLen); //Above average volume Value1 = Average(C,jLen); Condition6 = Value1 < Value1[1]; //Avg less than yesterday's Condition7 = Condition5 AND Condition6; //Above avg vol on decl momentum Condition8 = Value1 > Value1[1]; //Avg gt yesterday's Condition9 = Condition5 AND Condition8;//Above avg vol on incr momentum If jset = 1 THEN BEGIN //Conditions 1 ^ 3 ^ 4 Days of week If Condition1 and Condition3 and Condition4 THEN BUY next bar on open; If Condition2 and Condition3 and Condition4 THEN SELL SHORT next bar on open; END; If jset = 2 THEN BEGIN //Conditions 1 ^ 3 ^ 4 ^ 5 Days of week and volume If Condition1 and Condition3 and Condition4 and Condition5 THEN BUY next bar on open; If Condition2 and Condition3 and Condition4 and Condition5 THEN SELL SHORT next bar on open; END; …. If jset = 5 THEN BEGIN //Conditions 1 or 2 ^ 5 Volume but not Days of Week If Condition1 and Condition5 THEN BUY next bar on open; If Condition2 and Condition5 THEN SELL SHORT next bar on open; END; If jset = 3 THEN BEGIN //Days of Week ^ decr Avg on buy, incr Avg on sell If Condition1 and Condition3 and Condition4 and Condition6 THEN BUY next bar on open; If Condition2 and Condition3 and Condition4 and Condition8 THEN SELL SHORT next bar on open; END; If jset = 4 THEN BEGIN //Days of Week ^ Incr Vol ^ Decl Avg If Condition1 and Condition3 and Condition4 and Condition7 THEN BUY next bar on open; If Condition2 and Condition3 and Condition4 and Condition9 THEN SELL SHORT next bar on open; END; Larry Williams OOPS Larry Williams Smash Days //Smash Days Type 1: INPUTS: j_Side(0) {0=both, 1=long, -1=shorts}, j_Day1(0), j_Day2(0), j_Day3(0), j_Day4(0), j_Day5(0); //1=Monday // j_Days permit that day of the week as tradeable. If the number doesn't match, don't trade that day. // If j_Day = 0 => this day is allowed. If j_Side = 0 OR j_Side = 1 THEN BEGIN //Permits longs Condition1 = ( j_Day1 = Dayofweek(Date) ) OR j_Day1=0 ; //Permit this day If Condition1 THEN BEGIN If C < Low[1] THEN Buy next bar at High stop; If Barssinceentry >=1 then sell next bar at high stop; End; END; If j_Side = 0 OR j_Side = -1 THEN BEGIN //Permits shorts Condition1 = ( j_Day2 = Dayofweek(Date) ) OR j_Day2=0 ; //Permit this day If Condition1 THEN BEGIN If C > High[1] THEN Sell Short next bar at Low stop; If Barssinceentry >=1 then Buy To Cover next bar at low stop; End; END; Larry Williams Smash Days Joe Krutsinger BuyMonday • • • • //Joe Krutsinger BuyMonday w Sunny Harris modifications to allow for testing other days of the week { Have this one run on 1-min data and check for the open at 6:30a. If it is Monday and the open of the Session, then buy next bar will buy at 631. } inputs:Da(1) , Amount(500) ; • If DayOfWeek(Date)=Da THEN BEGIN • • • • • • Value1 = SessionStartTime(1,1)+1; //start time of regular session, first session If Time = Value1 THEN BEGIN Buy Next Bar at Market ; End; //End Time Check • End; //End day of week check • • SetExitOnClose; SetStopLoss( Amount ) ; Joe Krutsinger BuyMonday Sunny Harris • Sunny’s Dynamic Moving Average • SunnyBands Session Two • • • • • • • Session Two will contain: Evaluating Someone Else’s Strategies Backtesting What is Possible? Buying & Selling The Strategy Performance Report …and more Discount for Attendees • 30% 50% Discount for attendees of this webinar • Good until February 29, 2012, only • Or, later if you are viewing an old presentation. • PS: a price increase will take effect on Jan 31, 2012 Please Return • Please return to this same time and place next week, as we go into more depth in Session Two Keep In Touch • Sunny J. Harris • 1547 Mission Meadows Dr., Oceanside, CA 92057 • www.moneymentor.com • [email protected] • (760) 908-3070 • Skype: (760) 444-4174 • Fax: (760) 859-3057