Introduction To Rotational Trading Systems
Introduction To Rotational Trading Systems
TRADING SYSTEMS
What are we going to learn in this course
• Position Score Vs Ranking
• Three Different Types of Ranking methodology in Amibroker
• Understanding Position Score
• Understanding SetOption Functions for Portfolio Backtesting
• Understanding StaticVarGenerateRank Function
• What is a Rotational Strategy
• How to deploy Amibroker Rotational Trading Strategy
• Custom Backtesting and Rebalancing
Pre-Requesites
• Basic Amibroker Programming Language
• Basic Understanding on Static Variables
• Basic Understanding on Custom Backtesting
Requirements
• Amibroker 6.0 or later version.
• Installed a EOD data source and configured to work with Amibroker
• Basic familiarity with AFL, How to do backtest & optimization with
Amibroker
• Understand How the Custom Bactesting in Amibroker Works.
PositionScore Vs Rank
• PositionScore is the scoring method based on the value of indicator or
a combination of indicators or result of unique mathematical models.
• Ranking is a ordinal number that explains how higher/lower the
ranking are. It is more of a relative measure among the given set of
stocks. Ranking is derived from the positionscore.
Three Different Kind of Rankings in
Amibroker
• use ranking of trade entry signals (buy/short) to decide which entries
are preferred over the others during portfolio backtesting/optimization
using PositionScore variable
• display multiple rankings in tables created using Exploration using
Addrankcolumn function
• generate numeric ranks for later use (general-purpose functionality) –
using StaticVarGenerateRanks function
PositionScore
• It is a inbuilt variable which is used to determine the order of trader
entries (Buy and Short Signals)
• Position Score has no effect on scale-ins, scale-outs or exit signals.
• PositionScore variable to decide which trades should be
entered if there are more entry signals on different securities
than maximum allowable number of open positions or available
funds
• AmiBroker will use the absolute value of PositionScore variable
to decide which trades are preferred
Position Score and Execution Delay
• From an Investing Perspective if you are signals are generated today
and you execution happens next day then you have to introduce one
day delay in position score as the trading entries are decided based on
yesterdays positionscore not based on next days positionscore.
• Positionscore = ref(PositionScore,-1)
What is Asset
Allocation
• Asset allocation is the implementation
of an investment strategy that attempts
to balance risk versus reward by
adjusting the percentage of each asset
in an investment portfolio according to
the investor's risk tolerance, goals and
investment time frame. The focus is on
the characteristics of the overall
portfolio – Wikipedia
What is Rebalancing?
• Rebalancing is the process of realigning the weightings of a portfolio of
assets. Rebalancing involves periodically buying or selling assets in a
portfolio to maintain an original or desired level of asset allocation or risk. -
Investopedia
• For example, say an original target asset allocation was 50% stocks and 50%
bonds. If the stocks performed well during the period, it could have increased
the stock weighting of the portfolio to 70%. The investor may then decide to
sell some stocks and buy bonds to get the portfolio back to the original target
allocation of 50/50.
Resources
• Portfolio Level Backtesting & PositionScore
• https://www.amibroker.com/guide/h_portfolio.html
• Ranking
• https://www.amibroker.com/guide/h_ranking.html
THANKS