The Ultimate Algorithmic Trading System Toolbox + Website
eBook - ePub

The Ultimate Algorithmic Trading System Toolbox + Website

Using Today's Technology To Help You Become A Better Trader

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

The Ultimate Algorithmic Trading System Toolbox + Website

Using Today's Technology To Help You Become A Better Trader

About this book

The accessible, beneficial guide to developing algorithmic trading solutions

The Ultimate Algorithmic Trading System Toolbox is the complete package savvy investors have been looking for. An integration of explanation and tutorial, this guide takes you from utter novice to out-the-door trading solution as you learn the tools and techniques of the trade. You'll explore the broad spectrum of today's technological offerings, and use several to develop trading ideas using the provided source code and the author's own library, and get practical advice on popular software packages including TradeStation, TradersStudio, MultiCharts, Excel, and more. You'll stop making repetitive mistakes as you learn to recognize which paths you should not go down, and you'll discover that you don't need to be a programmer to take advantage of the latest technology. The companion website provides up-to-date TradeStation code, Excel spreadsheets, and instructional video, and gives you access to the author himself to help you interpret and implement the included algorithms.

Algorithmic system trading isn't really all that new, but the technology that lets you program, evaluate, and implement trading ideas is rapidly evolving. This book helps you take advantage of these new capabilities to develop the trading solution you've been looking for.

  • Exploit trading technology without a computer science degree
  • Evaluate different trading systems' strengths and weaknesses
  • Stop making the same trading mistakes over and over again
  • Develop a complete trading solution using provided source code and libraries

New technology has enabled the average trader to easily implement their ideas at very low cost, breathing new life into systems that were once not viable. If you're ready to take advantage of the new trading environment but don't know where to start, The Ultimate Algorithmic Trading System Toolbox will help you get on board quickly and easily.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access The Ultimate Algorithmic Trading System Toolbox + Website by George Pruitt in PDF and/or ePUB format, as well as other popular books in Business & Finance. We have over one million books available in our catalogue for you to explore.

Information

Publisher
Wiley
Year
2016
Print ISBN
9781119096573
eBook ISBN
9781119262978
Edition
1
Subtopic
Finance

Chapter 1
Introduction to Trading
Algorithm Development

What Is an Algorithm?

An Algorithm is an effective procedure, a way of getting something done in a finite number of discrete steps.
David Berlinski
Berlinski's definition is exactly right on the money. The word algorithm sounds mysterious as well as intellectual but it's really a fancy name for a recipe. It explains precisely the stuff and steps necessary to accomplish a task. Even though you can perceive an algorithm to be a simple recipe, it must, like all things dealing with computers, follow specific criteria:
  1. Input: There are zero or more quantities that are externally supplied.
  2. Output: At least one quantity is produced.
  3. Definiteness: Each instruction must be clear and unambiguous.
  4. Finiteness: If we trace out the instructions of an algorithm, then for all cases the algorithm will terminate after a finite number of steps.
  5. Effectiveness: Every instruction must be sufficiently basic that it can in principle be carried out by a person using only pencil and paper. It is not enough that each operation be definite as in (3), but it must also be feasible. [Fundamentals of Data Structures: Ellis Horowitz and Sartaj Sahni 1976; Computer Science Press]
These criteria are very precise because they can be universally applied to any type of problem. Don't be turned off thinking this is going to be another computer science text, because even though the criteria of an algorithm seem to be very formal, an algorithm really is straightforward and quite eloquent. It is basically a guide that one must follow to convert a problem into something a computer can solve. Anybody can design an algorithm following these criteria with pencil and paper. The only prerequisite is that you must think like a Vulcan from Star Trek. In other words, think in logical terms by breaking ideas down into rudimentary building blocks. This is the first step—translation of idea into an algorithm. It takes practice to do this, and this is in part why programming can be difficult.
Another thing that makes programming difficult is understanding a computer language's syntax. Most people who have been exposed to a programming or scripting language at one time or another in their lives have probably exclaimed something like, “I forgot one stupid semicolon and the entire program crashed! Isn't the computer smart enough to know that? Arrgh! I will never be a computer programmer!” The question that is proffered in this temper tantrum is the question of the computer's intelligence. Computers are not smart—they only do what we tell them. It doesn't matter if you spend $500 or $5,000 on the hardware. They do things very quickly and accurately, but their intelligence is a reflection of their programmer's ability to translate idea into algorithmic form and then into proper syntax.
Algorithmic (algo) traders don't necessarily need to be programmers, but they must understand what a computer needs to know to carry out a trading signal, position sizing, and money management. If you can create an algorithm, then you are more than 50 percent there. I say more than 50 percent because most traders will utilize trading software and its associated programming or scripting language. Learning the syntax of a scripting language or a small subset of a programming dialect is much easier than learning an entire programming language like C# or C++. An algo trader only needs to be concerned with the necessary tools to carry out a trading system. The developers of EasyLanguage, AmiBroker, or TradersStudio's main objective was to provide only the necessary tools to put a trading idea into action. They accomplished this by creating a vast library of trading functions, easy access to these functions, and a simplified programming syntax. Now if you want to develop your own testing platform and want to use a full-blown programming language to do so, then you will need to know the language inside-out. If you are interested in doing this, chapters 5 and 6 will give you a head start. In these chapters, I show how I developed testing platforms in Python and Microsoft VBA from scratch.
However, at this introductory stage, let's take a look at a very simple trading algorithm and the possible exchange between a computer and trader. Pretend a trader wants to develop and test a simple moving-average crossover system and wants to use software specifically designed for system testing. Let's call this first trader AlgoTrader1, and since he has used this particular testing platform he knows it understands a trading vernacular and provides access to the common indicator functions and data. Box 1.1 shows a possible exchange between trader and computer.

Box 1.1 Algo Testing Software

AlgoTrader1 – AlgoTester ON Computer – AlgoTester ready AlgoTrader1 – load crude oil futures data Computer – data loaded AlgoTrader1 – buy whenever close is above moving average Computer – "moving average" function requires three inputs AlgoTrader1 - help with moving average function Computer - function calculates simple, weighted, exponential average Computer - function syntax moving average (type, price, length) AlgoTrader1 - buy whenever close is above moving average (simple,close,21) Computer – command completed AlgoTrader1 –short whenever close is below moving average (simple,close,21) Computer – command completed AlgoTrader1 – save algorithm as MovAvgCross Computer – command completed AlgoTrader1 – run MovAvgCross algorithm Computer – run completed and results are: $12,040 profit, $8,500 draw down, $1,200 avg. win AlgoTrader1 – load euro currency data Computer – command completed AlgoTrader2 – run MovAvgCross algorithm Computer – run completed and results are: -$32,090 profit, $40,000 draw down, $400 avg. win AlgoTrader1 – edit MovAvgCross algorithm Computer – command completed AlgoTrader2 – edit moving average function Computer - command completed AlgoTrader2 – change length input to 30 Computer – command completed AlgoTrader2 – run MovAvgCross algorithm Computer – run completed and blah blah blah
As you can see, the computer had to be somewhat spoon-fed the instructions. The software recognized many keywords such as: load, buy, short, run, edit, change, and save. It also recognized the moving average function and was able to provide information on how to properly use it. The trading algorithm is now stored in the computer's library and will be accessible in the future.
This simple exchange between computer and AlgoTrader1 doesn't reveal all the computations or processes going on behind the scene. Loading and understanding the data, applying the algorithm properly, keeping track of the trades, and, finally, calculating all of the performance metrics did not involve any interaction with the trader. All this programming was done ahead of time and was hidden from the trader and this allows an algo trader to be creative without being bogged down in all the minutiae of a testing platform.
Even though the computer can do all these things seamlessly it still needed to be told exactly what to do. This scenario is similar to a parent instructing a child on how to do his first long-division problem. A child attempting long division probably knows how to add, subtract, multiply, and divide. However, even with these “built-in” tools, a child needs a list of exact instructions to complete a problem. An extended vocabulary or a large library of built-in functions saves a lot of time, but it doesn't necessarily make the computer any smarter. This is an example of knowledge versus intelligence—all the knowledge in the world will not necessarily help solve a complex problem. To make a long story short, think like a computer or child when developing and describing a trading algorithm. Box 1.2 shows an algorithmic representa...

Table of contents

  1. Cover
  2. Series Page
  3. Title Page
  4. Copyright
  5. Table of Contents
  6. About The Author
  7. Introduction to The Ultimate Algorithmic Trading Systems ToolBox
  8. Chapter 1: Introduction to Trading: Algorithm Development
  9. Chapter 2: Stochastics and Averages and RSI! Oh, My!
  10. Chapter 3: Complete Trading Algorithms
  11. Chapter 4: Introduction to AmiBroker's AFL
  12. Chapter 5: Using Microsoft Excel to Backtest Your Algorithm
  13. Chapter 6: Using Python to Backtest Your Algorithm
  14. Chapter 7: An Introduction to EasyLanguage
  15. Chapter 8: Genetic Optimization, Walk Forward, and Monte Carlo Start Trade Analysis
  16. Chapter 9: An Introduction to Portfolio Maestro, Money Management, and Portfolio Analysis
  17. Appendix A: AmiBroker
  18. Appendix B: Excel System Backtester
  19. Appendix C: Python System Backtester
  20. Appendix D: TradeStation and EasyLanguage
  21. Appendix E
  22. About the Companion Website
  23. Index
  24. End User License Agreement