TradingMarket – Advanced AmiBroker Coding
You already know that AmiBroker is an extremely powerful tool for performing technical analysis. At Connors Research, it’s the application that we use for everything from simple signal generation to simulating portfolio results for complex strategies involving limit orders, scaling, hedging and more. If you’re ready to tackle these advanced analysis tasks yourself, then this course is for you.
Sign-up for Our 2-Day Course
On June 9 & 10 Matt Radtke, Director Of Research for Connors Research taught the same AmiBroker programming techniques Connors Research uses in order to create and build high performing strategies. By the end of this course, you will have the ability to do your own high grade testing and analysis that so many professional traders rely upon to improve their trading and investing returns.
By harnessing the full power of AmiBroker, you can simulate historical results for a system that mirrors exactly the way you trade, and thereby gain insights into how it might perform in the future. In this course we will teach you exactly how to do this.
This course is designed for traders who want to use AmiBroker to create complex backtests and optimizations using the Custom Backtester (CBT) interface. At the completion of this course, you will be able to:
- Determine when to use each of the three levels of the Custom Backtester. Within minutes customize any system to fit your personal trading style, psychological profile and risk preference. Get into the nitty-gritty details of system development to build your private trading system. You will learn how to customize your own position sizing, your own hedging strategy, your own trade timing, and your own scale-in strategy.
- Add custom metrics via the Custom Backtester. Flesh out more robust trade results so you can compare different trading systems using customer metrics like Trade Quality. Integrate annual breakdowns of trades or annual breakdown of returns into your results. Verify that your system will perform consistently month after month and year after year, and remain robust through both good years and difficult years.
- Develop your own trading model from scratch so that you can evaluate how your ideas would do under historical trading conditions.
- Use some of AB’s more powerful functions. Now you can refine and improve your existing trading system, lower your risk, and improve performance.
- Perform correct optimizations. Avoiding the pitfalls for “over-optimization” develop historically validated enhancements to your trading system.
- Utilize multiple time frames, such as using weekly bars in a daily bar test. Further improve your system’s accuracy by trading along with short and long-term time frames.
- Scale into positions. Build into your trading system, the same proprietary scaling-in methods of Connors Research’s best strategies.
- Take portfolio considerations into account in your coding. Find ways to lift the performance of multiple positions in your portfolio, taking into consideration the overall performance of your portfolio.
- Over seven hours of online instruction with Matt Radtke.
- Several breakout sessions during which you will spend hands-on time with AmiBroker
- AFL and CBT code templates that you can easily modify for you own needs.
- AmiBroker version 5.5 or later installed.
- A data source configured to work with AmiBroker (we can help you with this before the class, if needed).
- Basic familiarity with AFL and the topics covered in the “Introduction to AmiBroker” course.
AmiBroker is an extremely powerful analysis tool, and like any powerful tool it requires training and practice to use it effectively. In today’s course we will do a deep dive into some of AmiBroker’s most powerful functionality, including portfolio backtests, optimizations, and the Custom Backtester Interface or CBT.
AmiBroker’s AFL scripting language provides a diverse set of variables, commands and functions that you can use to develop custom indicators, scans, explorations, backtests, and explorations. In fact, the AFL help file lists over 350 AFL functions. In this session we will discuss a few of the functions that you will find most useful as you begin to develop more advanced AFL scripts.
An optimization allows you to automatically execute a set of backtests in which each test has a unique set of input parameters. Each test (combination of parameters) typically corresponds to a specific strategy variation. For example, we might want to test a strategy in which the ConnorsRSI threshold for trade entry varies from 10 to 25 in increments of 5. In this session we will discuss how to convert the AFL for a back test into an optimization.
- How to set up
- The Optimize function
- Using the Switch function to handle odd increments
TimeFrame Compress/Expand and Set/Restore
When you run a backtest, AmiBroker allows you to select the base duration for each “bar” of the test. This is also known as the timeframe. You can test 1-minute bars, daily bars, weekly bars, etc. Sometimes, however, you want to use multiple timeframes within a single test. For example, some of our strategies use a market timing rule that compares the current weekly close of SPY to the weekly closes over the past year. In this section we’ll illustrate the use of the AFL functions for manipulating timeframes.
- Functions: TimeFrameCompress, TimeFrameExpand, TimeFrameSet, TimeFrameRestore
- How to use weekly bars during a daily bar test
- Easily setting end of week/month/quarter variables
- Review TimeFrame code examples
Scaling & the Position Size Array
Scaling into trades is a powerful tool for increasing gains. In this session we will discuss how to implement a basic scaling strategy for an All Trades test.
- The 2/3/5 scale in
- Review the Scale-In Code Template
- Average entry price
- Interpreting the trade list
Exercise: Creating an All Trades Test with Scaling
This hands-on session will be devoted to executing the scale-in code template and verifying that the strategy logic is working as expected.
Simulating how a strategy would actually be traded as part of a portfolio is a big step up from simply generating trading signals or running an “all trades” test. In this session we’ll discuss money management issues like position sizing and margin, as well as mechanics like prioritizing your trade signals and limiting the number of open positions.
- Max Positions
- Round Lot Size
- Position Score
Introduction to the CBT
The Custom Backtester Interface, or CBT, is one of the most powerful tools available in AmiBroker. Writing your own backtesting code gives you an enormous amount of control over how your trading signals are executed as well as opening up a myriad of possibilities for reporting and metrics. In this section we will introduce the CBT and discuss the simplest possible implementation of a custom backtesting procedure.
- Why is it useful?
- Three levels: high/medium/low
- CBT-specific functions: SetBacktestMode and SetCustomBacktestProc
- Static Variables
- Review the High-Level CBT Code Template
High Level CBT and Custom Metrics
Using the high level CBT is a great way to implement custom metrics without having to handle the intricacies of processing all the trade signals. In this session we will discuss both per-trade custom metrics and summary custom metrics, and illustrate how those are implemented using a code template.
- Custom Trade Metrics
- Custom Portfolio/Summary Metrics
- Review the Trade Metrics Code Template
- Review the Portfolio Metrics Code Template
Exercise: Generating Custom Metrics using the Code Templates
This exercise will give you hands-on experience implementing, executing, and troubleshooting custom metrics.
Low Level CBT
The low level CBT is the go-to interface that members of Connors Research use for implementing backtests and optimizations. We will discuss the types of problems that can be solved with this construct, particularly in the context of portfolio tests, and illustrate the solutions with example code.
- Types of tasks that typically require the Low Level CBT
- Applying a custom interest rate such as T-Bill to available cash
- Portfolio test with limits and/or scale-ins
- Controlling order of entries and exits
- Rotational systems
- Review the Low-Level CBT Code Template
Exercise: Implementing a Portfolio Test with Limit Entries
In this exercise, students will implement their own portfolio test with limit entries, using the code templates provided. This mini-project will combine many of the skills used throughout the course.
The more power and flexibility that a tool provides for its user, the more opportunities there are for things to go awry. In this session we will discuss some common pitfalls that occur when doing portfolio tests with AmiBroker. As one colleague stated, “if the results seem too good to be true, I probably made a mistake”.
- Trade timing
- Looking into the future
- Implementing trading rules that are impossible to execute in real life
Additional Sources and Q&A
Total Time Estimate: 7-8 hours
Get TradingMarket – Advanced AmiBroker Coding or the other courses from the same one of these categories: Course, Trading, Advanced, AmiBroker, TradingMarket, Coding, Advanced AmiBroker for free on Cloud Share.
Share Course Advanced AmiBroker Coding, Free Download Advanced AmiBroker Coding, Advanced AmiBroker Coding Torrent, Advanced AmiBroker Coding Download Free, Advanced AmiBroker Coding Discount, Advanced AmiBroker Coding Review, TradingMarket – Advanced AmiBroker Coding, Advanced AmiBroker Coding, TradingMarket.