Showing posts with label Technical Analysis. Show all posts
Showing posts with label Technical Analysis. Show all posts
Backtesting in AmiBroker

Backtesting in AmiBroker

 Backtesting-in-AmiBroker

Backtesting in AmiBroker

Before getting into any technicalities or know-how, it is important for us to know what do we mean by backtesting in Amibroker.

Backtesting is an easy process used by Traders to evaluate the Trading Ideas and provides information regarding how good is a trading system based on historical datasets. Precisely, it talks about the behavior of the trading system, risks involved in a particular trading system, and more regarding the performance of the trading system.

There is one such program AmiBroker which performs all these functions and does much more for the traders.

Introduction

To keep it simple, AmiBroker is a full-fledged professional Technical Analysis and charting tool which can be used by the traders to Analyse Market, prepare charts, and for backtesting trading strategies.

It is quite important for you to know about AmiBroker is before using it to backtest. Better make an informed decision rather than just going with a feature that you might regret later (which you won’t!)

Features of AmiBroker

Features-of-AmiBroker

Here is a list of features which are offered by the trading platform apart from backtesting–

Analysis Window –

analysis window

On the analysis window, you will be able to see almost everything, i.e. portfolio, walk-forward tests, optimization, backtests, explorations, Monte Carlo Simulation, and so on.

Exploration/Market Screening –

exploration

AmiBroker is a multi-purpose tool for data screening/mining which supplies programmable output with infinite rows and columns.

Charting –

This feature of Charting in AmiBroker comes with several built-in indicators, multiple time frames (which can be used as per your own convenience), drag and drop indicators, customizable parameters, object creating capabilities, etc. Sliders are the good options to modify parameters in real-time and can also customize it in various styles and gradients.

Walk-forward Testing –

It is ideal for confirming the robustness of the trading sample before and after optimization.

Multi-Threading –

AmiBroker assigns different threads for each graphics renderer and each formula chart.

Code Editor –

The code editor pairs up with parameter call-tips, auto indenting, code folding, etc. Whenever you encounter an error, a meaningful message alerts you promptly.

Ranking and Scoring –

ranking

It is used to perform bar-by-bar ranking depending upon the user score to find a suitable trade.

Advantages of AmiBroker

Advantages-of-AmiBroker

  • It provides the user with top-notch technical support for trading accounts.
  • The main features of this tool are fast array and matrix processing.
  • AmiBroker ensures that the traders are provided with safe and full-proof trading support in order to have 100% security and that you don’t lose money.
  • The features of AmiBroker are customizable and flexible.
  • It is the fastest backtesting tool and provides the user with a custom backtesting facility, custom metrics, rotational trading, etc. Also, it provides the user with advanced ranking, scoring, and positioning.

The most productive thing that can be done in the analysis window is to backtest the trading strategy on historical data. It helps you to gain insight into the strengths and weaknesses of the system before you begin to invest real money.

And thus, AmiBroker is a feature which can help you to save lots of money.

Writing Your Trading Rules

Writing-Your-Trading-Rules

The first thing that needs to be done is that you must have objective or mechanical rules to enter and exit the market. This step is necessary in order to create a base of your strategy and whether or not the system matches with risk tolerance, portfolio size, money management techniques, and several other factors.

Once you have established rules for trading, you must write to them as buy and sell rules in AmiBroker Formula Language.

Backtesting

Backtesting

In order to Backtesting in AmiBroker, you need to click on the Backtest button in the Automatic analysis window. Ensure that you have typed the formulas which contain buy and sell trading rules. Once the correct formula is entered, AmiBroker starts to analyze symbols according to trading rules and generates a list of simulated trades. This process is rapid in terms that you can easily backtest thousands of symbols in a few minutes. There is a progress window that will show the estimated completion time. If you wish to stop the process at any given point of time, click on the Cancel option in the progress window.

Analyzing Results

Analyzing-Results

When the process is completed, you will be presented with a list of simulated trades in the bottom part of the Automatic analysis window aka the Results pane. Here, you can examine when the buy and sell signals occur only by double-clicking on the trade in the Results pane. Post this, you are presented with raw or unfiltered signals for each bar where buy and sell conditions are met. If you wish to see only a single trade arrow (opening and closing currently selected trade) you are required to double click a line while holding the SHIFT key pressed down. The other option that you can choose is the kind of display by choosing the appropriate item from the context menu which appears once you click on the results pane with a right-click.

In addition to the results, you will also be provided with detailed statistics on the performance of your system by choosing the Report option.

Changing Your Backtesting Settings

Changing-Your-Backtesting-Settings

Backtesting in AmiBroker makes use of predefined values for performing its task including portfolio size, periodicity, i.e. daily/weekly/monthly, amount of commission, type of trades, price fields, interest rates, and so on. These settings can be altered by the user settings window. Post changing the settings, you must remember to run your backtesting if you wish the results to be in-sync with the settings.

Advanced Concepts

Until now, we have discussed fair simple use of the backtesting. However, AmiBroker comes with a lot more sophisticated concepts and methods.

We will be listing the new introduced-features of the back tester. There you go –

  • AFL scripting host for Advanced Formula Writers
  • Enhanced Support for Short Trades
  • Way to Control Order Execution Price from the Script
  • Types of Stops in Back-tester
  • Position Sizing
  • Round Lot Size and Tick Size
  • Margin Account
  • Backtesting Futures

Frequently Asked Questions (FAQs)

Ques. 1. What skills do I require to build an effective Algo Trading Solution using AmiBroker?

Ans. 1. Here is the list of following skills you may require to build an effective Algo Trading Solution using AmiBroker  –

  • It is necessary for you to have knowledge in AmiBroker AFL Programming, Backtesting, Optimization, System Validation of Training
  • You must have an understanding of the Broker API’s/Bridge Function and knowledge in the know-how of integrating with AmiBroker.
  • It is essential to have knowledge about VPS (Virtual Private Servers) and how to remotely connect and deploy AmiBrokers, Trading Terminal, and Bridge Components in the servers.
  • You have knowledge about Setting Risk Control Parameters and Order Execution Logic.
  • You must take data backup and trade logic backup at regular intervals.
  • It is necessary to use a statistical test like Monte Carlo Analysis to determine if the trading system has broken.

Ques. 2. Are there any additional requirements to build an effective automated trading system infrastructure?

Ans. 2. Yes, you do need additional requirements to build an effective automated trading system infrastructure.

Here are these additional requirements –

  • You must have a Good Historical Data for Backtesting.
  • It is necessary to have a Good Realtime for Live Trading.
  • You should have Trade Execution Capabilities, i.e. market order, limit order, bracket order, cover order, etc.
  • It is essential for you to have a good understanding of money management and types of systems, i.e. trend following, mean reversion, pattern recognition, seasonal, cynical, and so on.
  • It is important for you to have a sense of risk management in terms of what to trade, symbol level stop-loss, portfolio level stop-loss, fnoban check, panic button square-off, etc.
  • You require capabilities in position sizing, i.e. partial profit/loss booking, adding positions to the existing trade (scale).

Ques. 3. What availabilities does one need after taking your system live?

Ans. 3. You should have the following availabilities after taking your system live –

  • Ensure that the trading model that you use is free of glitches and that the system is tradeable.
  • You should have enough time to compute and place orders.
  • The assumptions that you make regarding trading costs, i.e. brokerage, commissions, slippage, taxes are realistic.

Ques. 4. Are there any disadvantages to use AmiBroker?

Ans. 4. Well, not technically disadvantages but yes, there are a few issues with AmiBroker which one must know –

  • This tool is not really suitable for those who aren’t tech-savvy and are unaware of the programming languages such as HTML, C/C++, etc.
  • This tool works best for those who are keen to write their own codes.
  • Since the tool is fully customizable, AmiBroker does not have a standard template, to begin with. It might not be an issue for an advanced coder, however, it can be quite cumbersome to come up with a new code or research about it.
  • The managing of quotes takes a lot of time.
  • It isn’t practically possible for you to run two or more databases per instance/session.
  • AmiBroker isn’t suitable for big traders who transact in lump-sum money and not for one-time traders or small traders.

AmiBroker is one of the best when it comes to coding, programming, developing, however, it does not satisfy those who are from a non-technical background. One requires extensive training before using the analysis and charting tool.

Even though AmiBroker has quite a number of features and tools, that makes it the trading process safe and satisfying.

We are hoping that in neat future AmiBroker will become popular among the non-technical users as well.

Till then, keep trading!

Best Technical Indicators

Best Technical Indicators


Best Technical Indicators

When we take our first step into the trading game, we choose the best resources for ourselves. For rookie brokers, it can be a tad bit tedious to look for the Best Technical indicator.
The purpose of using Technical indicators is to follow the action and it influences the way you interpret trends. Be it on positions and broad averages or the type of opportunities that pop-up in those researches of yours.
Technical indicators sure can be attractive and appealing, especially to those who are putting their foot in the market. The indicators return a clear sign on whether or not you should buy or sell the shares. One can interpret technical indicators very easily across different markets.
Novices usually wonder as to why technical indicators are of great importance in the market.

Here’s why?

When you don’t use technical indicators, it will be difficult for traders to assess the prevailing volatility of the market, the strength of a trend or whether market positions are overbought or oversold.

Before I go on listing the best technical indicators for you, there are three types of technical indicators which you should unquestionably know –

Trend-following Indicators

Trend-following Indicators

Trend-following indicators are meant for ascertaining the trends and measure the strength of a trending market. Which yes, it can be told by looking at the price chart, however, it is a bit difficult to measure its strength and to spot a trend when it is early in its transformation.

Momentum Indicators

Momentum Indicators

Momentum indicators measure the strength of current price fluctuations in previous periods. These indicators fluctuate between 0 to 100 which provides signals whether the market conditions are overbought or oversold.

Volatility Indicators

Volatility Indicators

Volatility indicators measure the volatility of the underlying instrument. Traders chase volatility across markets to ensure they find profitable opportunities to trade.

Here is a list of the best technical indicators and you shouldn’t be trading without these indicators.

Moving Averages

Moving Averages

These are not only popular day trading indicators but are ideal for both – trend-following indicator and counter-following indicator. Moving averages show the average of the last n-period closing prices. These averages are generally plotted on the price chart. As a new closing price comes in, the last closing price in the series drops and thus, moving average drops.

ATR – Average True Range Indicator

ATR – Average True Range Indicator

Average True Range Indicator is one of the best technical indicators which measures the volatility of the market by considering the following – the current low subtracted from the current high, previous close subtracted from the absolute value of the current high, and the absolute value of the current low minus the previous close.

ATR indicator takes together all the average of the values for a specified period of time, which is further then plotted in the form of a moving average on the chart.

RSI – Relative Strength Index

RSI – Relative Strength Index

RSI – Relative Strength Index is one of the popular and the best technical indicators. This indicator measures the change in current price-changes and reverts the reading between 0 to 100. Most of the time, RSI to know whether the market is overbought or oversold.

The reading which says above 70 is usually indicating that the market is overbought whereas a reading below 30 indicates that the market is oversold.

Bollinger Bands

Bollinger Bands

This technical indicator works on the basis of the moving average, it is ideal for detecting the present market volatility. Bollinger bands contain three lines –

  • The middle line is moving average.
  •  The upper and the lower lines are two standard deviations which create a band since it is away from the moving average.
We aren’t telling you to drop other kinds of analyses and trust technical indicators blindly. However, technical indicators can come in handy when you’re new to the market.

You need not worry about which one to use because we have already listed the best ones for you (they are not in any order of preference).

And now, we will be addressing a few frequently asked questions –

Which are the best indicators to identify short-term trend reversals in stock market trading?

To explain in simple words, a trend reversal is more or less your entry and exit in the stock market. When you identify the best reversals. You will be on the path to trading success in no time. There are consequences to false reversal such as missing potential trading setups or you will have to scramble back to be back in the flow.

With that being said, here is the list of best technical indicators to find short-term trend reversals –

Moving Average

Moving Average

One of the favored methods of using a moving average is by examining its direction. The strength of using moving averages is that it allows you to use a few of them to keep a track of differing degrees.
However, it comes with a drawback and that is if you use it too much then you will end up turning its strength into a disadvantage.

Donchian Channel 

Donchian Channel

Donchian channel has maintained its status as a powerful trend tracking tool. In fact, Donchian Channel is grounded with price action. It is not a typical indicator with hard-to-grasp formula.

This indicator has two lines. This helps in attaining the highest price and the lowest price attained within the lookback period.

In simple terms it means, defining a price range by using historical price action.

Moving Average Convergence Divergence (MACD)

Moving Average Convergence Divergence (MACD)

The two moving averages of different periods diverge, when the trend strengthens and the moving averages converge when the trend weakens.

A price divergence is a very compelling reverse signal and happens to occur when price and an oscillator disagree.

Which indicators are the most useful when combined with technical analysis?

There is a close relationship between technical indicators and Technical Analysis. Technical indicators help technical analysis respond to any important volatility or price action as it takes place in the price of a stock.

Technical analysis can help the traders to determine the levels of support and resistance in price whereas technical analysis helps the traders to determine whether the price of the stock has dropped lower or climbed higher and to break out of the last price range.

With the combination of technical analysis and technical indicators, it helps the traders to predict prices and start undervalued security with the right price size at the right time.

We have enlisted a few of the most useful technical indicators when combined with Technical Analysis.

Relative Strength Indicator

Relative Strength Indicator

Relative Strength Indicator or RSI is a momentum (the rate at which price rise or fall) oscillator. RSI helps to compare the magnitude of recent gains and losses over a particular period for measuring speed and variation of price movements of a security.

This indicator can show, whether the product is overbought or oversold by measuring the magnitude of recent price changes.

Moving Averages

Moving Averages

This is one of the oldest and the most popular technical indicators used by traders in technical analysis. It is more or less an average of past prices. It creates a smooth price data and a single flowing line.

Stochastic Oscillator

Moving Averages

This is one of the most reliable momentum tools which help traders to measure the current momentum, especially when compared to the lows and highs of a historical set of prices.

The prices tend to close near the high in an upward-trending market, and tend to close near their low, in a downward-trending market.

Which is one of the most reliable technical indicators for a Bullish Trend?

Technical indicators are ideal for predicting the forthcoming changes in the price of the stocks. For carrying out your Stock Analysis, trader can use the combination of different charts and technical indicators.

Some of the few reliable indicators for a bullish trend are –

Bollinger Band

Bollinger Band

This indicator helps you to analyze the direction in which the stock price is moving and also helps to find the market volatility. It consists of two bands, Upper Band and Lower Band. For particular security, lines are used to depict the volatility range on the basis of a standard deviation.

Stochastic Oscillator

Stochastic Oscillator

We compare one observation point in the current base with the highest and lowest points from a specified range. It further helps to predict the strength of the current trends.

What are the best technical indicators for Intraday Trading?

Following the basic intraday tips is a common practice for traders, be it a beginner or an established trader. Trading strategy for every trader change with time.

To maximize returns, it is necessary to understand the markets. Trading indicators can help in maximizing revenue, If used with a comprehensive strategy.

The information offered by intraday Trading Indicators –


  • The direction of the trend to ascertain the movement.
  • The lack of existing momentum within the investment market.
  • Profit potential due to the volatility.
  • Determine the popularity through volume measurements.

Here are the best technical indicators for intraday trading –

Moving Averages

Moving Averages

If long-term averages are more than short-term averages, it is an indication of a bullish market trend. Traders may take a buy call with specific strategies like stop-loss either at retracement support or long-term moving average and vice-versa. It can help users to earn decent profits.

Bollinger Bands

Bollinger Bands

There is a great chance for the price to increase in the future only if the stock is trading at a price prevailing below the Bollinger Band lower line. Traders can sell the share when the current stock price is over the upper line.

Using intraday indicators help to avert risk and place appropriate traders based on market sentiments and technical analysis.

It is not entirely true when they say that trading is based on our gut, rather it is a blend of whole other lot of analyses, indicators, and gut.

Our only advice is to keep trading and be safe.

And on that note…

Adios!