beginners – Helping you Master EasyLanguage https://easylanguagemastery.com Helping you Master EasyLanguage Tue, 26 Apr 2022 02:59:36 +0000 en-US hourly 1 https://wordpress.org/?v=7.0 https://easylanguagemastery.com/wp-content/uploads/2019/02/cropped-logo_size_icon_invert.jpg beginners – Helping you Master EasyLanguage https://easylanguagemastery.com 32 32 Getting Down To Business! https://easylanguagemastery.com/building-strategies/getting-down-to-business/?utm_source=rss&utm_medium=rss&utm_campaign=getting-down-to-business https://easylanguagemastery.com/building-strategies/getting-down-to-business/#comments Mon, 06 Aug 2018 10:00:56 +0000 http://systemtradersuccess.com/?p=14938

In the previous parts of this 3-part article (see part 1 and part 2), I introduced you to algo trading, and then discussed features of algo trading, along with advantages and disadvantages.

Algo trading can definitely help you compete with the “big boys,” but it is not automatically a “supertrader” creator. There is no easy way to trade, and algo trading is no exception. Rest assured there are retail algo traders out there surviving against the hedge funds, commodity trading advisors, etc.

At this point, it is time to set aside theory and words, and get down to business: the business of actually starting to algo trade. In this final section, I’ll give some tips on:

  •             Testing
  •              Selecting A Trading Platform
  •              Info On Popular Platforms

Testing

One key feature of algo trading is testing. The idea is you historically test an idea to prove its profitability BEFORE you actually trade it live. There are a few different ways to test. You could manually test your approach by recording entries and exits on a chart by hand. You could also hire a programmer to code and test your idea. You could even create your own backtester, using a computer language like Python or R. While all of those are possible alternatives, I like retail trading software.

Trading software is probably the best one for most retail traders. In today’s market, there are literally dozens of trading software packages designed for the retail trader. All have pros and cons, obviously, but the best of them allow traders with little programming knowledge to successfully develop their own trading algorithms.

The great thing about the retail software option is that once you know how to operate the software, and do some simple strategy programming, your focus can be on developing algorithms – exactly where it should be.

Retail Trading Software – Pros

  •              Most platforms are easy to use and learn
  •              Used and debugged by other traders, so you can trust results
  •              Relatively inexpensive, some platforms are even free
  •              Easy to share strategies with other traders using same software

Retail Trading Software – Cons

  •              Easy to trick most packages into giving false results
  •              With so many choices, hard to pick “right” platform
  •              If software company goes out of business, algos might be useless

This is why I recommend standard trading software for most retail traders. The available software is just too powerful and convenient to disregard.

In case you are wondering, I started out my trading career with the first option, manual backtesting. What a pain! As soon as I had access to a personal computer at night, outside of my regular career working hours, I switched to option 3 – building my own backtesting platform. I did that for a number of years, and had more success in programming the platform than I did in building the algorithms.

I had a few decent algos – or so I thought – but after talking to some more experienced traders, I realized there were issues with my bespoke platform that I was not accounting for properly (for example, some of the intricacies of rollovers). I realized I had to make a drastic change.

Eventually, I decided to go the retail platform route, and I got a copy of Tradestation. I was very scared and intimidated at first by the package (for example, for years I trusted only “buy/sell next bar at market” orders), but eventually I came to understand and felt comfortable with strategy development. And guess what? The algo strategies I started to build became a lot better!

Today, I have been using Tradestation for over 10 years. And baring some unforeseen circumstances, I see myself using it for years to come.

Selecting A Trading Platform

Back when I started using a retail trading platform (Tradestation), there really weren’t too many choices out there. And Tradestation was far and away the best; it had the most features, its backtesting was the most accurate, support was superb and its user group was active and helpful.

Fast forward to today, and the retail software platform landscape is a bit different. Now, there are dozens of trading platforms, and most are pretty good. Each one has some specific “niche” areas it tries to address, usually areas that Tradestation was traditionally not as good at. Of course, Tradestation has responded, and is continually building a better platform. The competition is raising the standard for all platforms, which is tremendous.

This is all great for the retail trader – more competition, better features, lower costs – but it can be overwhelming! Which platform is the best? Which platform has the features you are looking for? Which platform is the easiest to build with? The list of questions goes on and on.

So, I’m not going to try to tell you which platform to, but I will identify some “must haves” that you want for algo trading. In the section after this, I’ll also tell you the most popular platforms, based on trader surveys I have done in the past few years. You might think popularity is a poor criteria to use, but I think it is important. You want a trading platform that will be around for years and years, since transferring your algos from a defunct platform will be cumbersome.

Here are some of the features that are important to an algo trader:

Charting Capabilities - Many times, during the idea creation phase, an algo trader will want to see his or her idea – an indicator, histogram, bar patterns, whatever – in action. A good charting module in the software will help with that.

Figure - Charts Can Help You Visualize Aspects Of Your Algorithms

Broker Integration - Some retail platforms, such as Tradestation, are tied directly to one brokerage (in this case, Tradestation Brokerage). Other platforms, such as NinjaTrader, have a few limited choices in brokers. Finally, some platforms (like Multicharts) have a huge selection of brokers to choose from.  There are pros and cons to each approach.

So, searching for a trading platform might also be a search for the proper broker. 

Ease of Programming - Most good platforms offer you the ability to create your own indicators, strategies, etc. – in addition to providing standard indicators with parameters you can change and optimize. Of all the topics discussed in this section, I think this is the most important. Having a programming language you can easily learn, and feel comfortable with, is a big deal. Spend a lot of time upfront investigating what is best for you, and it will pay dividends down the road.

Integrating With Market Data - Most of the premier trading platforms these days integrate well with market data. Make sure the platform you choose connects with the data you need.

Standard Indicators and Studies - Before selecting a platform, make sure it has a long list of indicators and functions already programmed in. Most platforms do, but it is always good to check first.

Optimization - If your code has any parameters or numbers in it, for example the number of bars in a moving average, or the buy threshold in an RSI calculation, chances are at some point you will want to optimize that number. While too much optimization is definitely a bad thing, you at least will want the capability to do it in the software.

Walkforward Analysis - In my algo development work, I use a technique called walkforward testing to create “out-of-sample” results. These results tend to mimic live trading better than traditional “plug and chug” backtest optimizations.

Walkforward testing is an advanced topic, one that a new algo trader might not need right away. But it is a good feature for trading software to have. 

Trader Community - Having a large and active trading community is critical for any software platform you choose. A vibrant community is a definite plus, and should be a very important part of your search criteria.

Live Trading & Automation - Once you create and test your algo, the last thing you want to do is convert it or move it to a different platform in order to trade it live or automate it. You want a package that does it all: development, test, and automated trading. 

Info On Popular Platforms

​In 2017-8, I asked readers of my blog to tell me which trading platform was their favorite. Here are the latest results:
- Worldwide Survey, Trading Platforms

Figure - Worldwide Survey, Trading Platforms

Depending on your needs, my guess is one of these platforms will be sufficient for your algo trading. Contact info for each of the major ones is given below:

Conclusion

This 3-part article (see part 1 and part 2) has covered a lot of ground about the basics of algo trading for the retail trader. Trading is a tough world, but algo trading may just be a good route for your trading success. If you follow the steps in detailed article series, you might actually become as good as the professional traders you are competing against! It is hard work though, and never seem to get very easy. Remember that. I always tell prospective traders, “Trading is the hardest way to make easy money!”

​-- by Kevin Davey from KJ Trading Systems

]]>
https://easylanguagemastery.com/building-strategies/getting-down-to-business/feed/ 1
The Different Types of Trading https://easylanguagemastery.com/building-strategies/different-types-trading/?utm_source=rss&utm_medium=rss&utm_campaign=different-types-trading https://easylanguagemastery.com/building-strategies/different-types-trading/#respond Mon, 09 Jul 2018 10:00:52 +0000 http://systemtradersuccess.com/?p=14815

“Algos” and “algorithms.” These two words strike fear into the hearts of many a trader. Visions of computer programs running wild, buying and selling with reckless abandon, are a common nightmare. A trader goes to sleep flat, and wakes up to find a rogue robot algorithm frittered away his or her account, buying and selling all night, due to a simple programming bug.

A Trading Robot Run Amuck?

Or worse yet, the trader wakes up to find he is short 100 ES (mini S&P) contracts, when he only wanted to be short one contract!

Maybe instead your nightmare vision is of hedge funds, executing “killer bot” algos with lightning speed, draining the accounts of all the slower traders.

The truth, of course, is that trading algos can do those things, and worse.  Horror stories abound of these sorts of account killing computer codes. These exact nightmare scenarios have happened.  But, properly designed algos can also be friendly, too.

I obviously will focus on the friendly algos!

But before I dive into details of algos, it is important to discuss some of the different types of trading.  That will help you understand what an algo is, what it can do, and most importantly, what it cannot do.

Discretionary Trading

Most retail people out there are discretionary traders. Discretionary simply means traders use some sort of judgment to enter and exit trades.

For example, a trader hears about a hot stock on CNBC, and immediately decides to buy some. That is discretionary trading.

Another trader has a chart that she stares at all day. It may be filled with indicators, trendlines, moving averages, etc. Or it may be naked, except for price data. Once that trader makes a trade decision based on all she sees, that is a discretionary trade.

Our third trader has a DOM ladder only, a visual tool which shows all the resting buy and sell orders along with prices. He trades based on this tool. He is likely a discretionary trader, too.
At the end of the day, if you asked any of these traders about why they took certain trades, and why they avoided taking other trades (that may have looked exactly the same), they might give you a “deer in the headlights” look, or a vague response like “I don’t know, it just felt right!”
The truth is discretionary traders may or may not have rules, they may or may not follow these rules, and they may not be consistent in applying these rules. Heck, they might not even be able to describe the rules that caused them to trade.

I remember being in a trading room with a “price action” guru a while back. He was calling the market live, and it went something like this: “yes, the market is looking weak, and there is a short setup here that I usually take, so I am just waiting for a short entry…waiting…waiting…no, it’s a long trade! I just got out with a profit!”

Huh?

When asked about it later, the guru could not explain how a textbook (according to him) short entry suddenly turned into a profitable long scalp trade. “It just felt right,” he explained.
It made me wonder if he was even live trading, but that is another story. The point is that he was trading (likely simulated trading) in a discretionary fashion.

Discretionary trading, then, involves trading decisions that involve some degree of human judgment. Maybe it is intuition, or a sixth sense, or even random guessing, but the trade selection usually includes something that can’t quite be defined or tested.

Now, that type of trading might sound wrong to you (“who trades based on intuition?”) or it may sound appealing (“great, I get to use my brain to help me decide!”). But the fact is many people do it, and some people are successful at it. It is a legitimate way to trade.

Yet discretionary trading is definitely NOT algorithmic trading.

I’m guessing, if you are reading this article, chances are you might have already tried and failed at discretionary trading. Don’t feel bad, I count myself in your ranks – I was never a good discretionary trader. That is the main reason I dove into algo trading.

Algorithmic Trading

Algo trading is all about rules.  In fact, it is nothing but rules. No discretion.  No human judgment.

Trading algorithms can be as simple as you want, or as complicated as you want. How simple?  Here is a basic 2 line strategy:

If close < average close of last 5 bars, go long
If close > average close of last 5 bars, go short

Buy/Sell Signals For A Simple Algo

Over the past 13 years, this strategy would have made over $92,000 after slippage and commissions, trading just one contract!  And it makes money on both the long and short side! Don’t get too excited though, the last few years have not been kind to this strategy…

A Simple (But Not Consistently Profitable) Algo Equity Curve

Typical Algo Performance Report

That was a very simple algo.  In contrast, algorithmic strategies can also be extremely complicated, too.  There are traders with single algorithms that run 25,000 lines of code or more – real rocket science stuff!

There are two keys to trading algorithms:

  1. They can be tested.  Most algorithms can be historically tested, commonly referred to as a backtest.  This turns out to be a major advantage of creating algorithms, which I’ll describe later.  For algos that cannot be historically tested, they almost always can be live tested in simulation mode, with proper precautions and some caveats.  In either case, the trader can usually determine the acceptability of the strategy BEFORE trading it with real money.
  2. Algorithms are rigidly defined.  If the algorithm sees a long setup today, it will tell you to go long.  If it sees that same setup tomorrow, it will tell you to go long again. The algo only looks at what it was programmed to look at.  It doesn’t care what the Fed thinks, does not care about the news, and does not care that Jim Cramer screamed that a certain stock was a buy last night – unless, of course, you program those types of rules into your algorithm.  The algo is consistent in how it follows the rules.

Many traders speak of “black boxes,” a special type of algorithm.  With black boxes, the rules (the algorithm) remain hidden to the trader.  He or she only gets the entry and exit signals, and has no idea how those signals were produced.

That type of algorithm might sound unappealing or scary, but many people like that approach.  It is really hard to interfere with computer code you cannot even see!

Some Examples Of Algo Trading

So what does an algo trader look like?  Here are some typical examples:

  • A retail trader, trading at home.  He works full time, so trading is his hobby.  Every night, he downloads the latest prices, calculates his signals either by hand or on a computer, and places trades according to the rules.  He may or may not check positions during the day, but since he places orders during non-work hours, he knows he is following his strategies each and every day.
  • A prop trader, trading full time.  He enters and exits trades all day long, again according to set rules.  He never, ever deviates from the rules, since he knows his boss spot checks his trades for adherence to the rules.
  • A hedge fund computer code, written by numerous PhDs in math, statistics and physics.  The computer code they run has 50,000 lines of code, and does everything – enter trades, exits trades, calculates position sizing, automatically performs rollovers, etc.  A junior trader is always nearby, monitoring trades in case of a malfunction, but the computer controls the show. The strategies they run can be on the order of microseconds (in and out quickly), to day trades of a few hours, to swing trades lasting weeks.
  • A professional retail trader, using a standard retail platform, Tradestation.  He creates strategies, then lets Tradestation run those strategies automated. He is usually closely monitoring positions, because as Tradestation personnel say “automated trading does not mean unattended trading.”  He can trade quite a few automated strategies, assuming he has enough capital, and if his strategies are diversified enough.

What makes these people algorithmic traders is that they follow strict rules for entry and exit.  That is the real key – they are 100% rule followers. With those strict rules, they can historically backtest their approaches, and while “past performance is not indicative of future results” (as a U.S. government disclaimer correctly states), it is very nice to realize that the strategies traded have worked in the past.

Many traders can’t commit to 100% rule following, so they fall into the last major category – hybrid trading.

Hybrid Trading

Now that I have discussed discretionary trading, and algorithmic trading, it is time to bring another type of trading into the mix – what I call hybrid trading.

Hybrid trading is simply a mix of discretionary and algo trading.  Some examples:

  • Entries are based on technical indicators and rules, but exits are left to the discretion of the trader
  • Entries are based on trader judgment, but once in a trade, an automated exit “bot” controls the trade, with no trader intervention
  • Entries and exits are both well defined by rules, but the trader has discretion to overrule.  For example, a trader might decide to ignore long stock signals after a natural or manmade disaster.  Or a trader might decide to go flat before major world events (Brexit vote, Trump election night).

The advantage in hybrid trading is that the trader can still have some discretionary influence on the trade.  That is also a disadvantage! One thing I have noticed with my own algo trading is that some of my best algo trades turn out to be ones that my “human judgment” absolutely hated!  If I treated those trades as hybrid trades, I would have negated all the good effects of the algo.

*****

Reading the last section, you might wonder “what are the professional traders out there doing, and how can I possibly compete with them?”  Great question! Pros are using all of the methods detailed above. You can compete by treating trading as a serious endeavor. Don’t wish for “I have 15 minutes a day for trading” type systems.  Wish for being the best you can be at trading – then you’ll be good competition for the pros.

Of all these types of trading, it is hard to decide which trading route is for you.  In future articles, I’ll discuss some of the characteristics and traits that make for good algorithmic traders, but for now I will assume that you already know algo trading is the path you want to pursue.  If you still aren’t sure, though, keep reading and maybe by the end of this series you will be sure!

-- by Kevin Davey from KJ Trading Systems

]]>
https://easylanguagemastery.com/building-strategies/different-types-trading/feed/ 0