Get and keep an advantage on the market

Congratulations! You have just committed yourself to one of the most difficult exercises in existence today. Algorithmic trading is a fascinating and exciting world. Its learning will allow you to push the boundaries of technical analysis and trading. I wrote this book to help you to design your own automated trading system using Prorealtime. As a first step, I give you a theoretical and conceptual basis needed to design trading algorithms. Then, step by step, I will lead you in the programming of your trading bot. Thereafter, a chapter about the backtest analysis will explain to you how to reduce the risk of over-fitting. I created a machine learning model specially adapted to the optimization of the automated trading systems that you will easily use to configure your trader robot. After running on a real account, you will have to manage your automated trading systems. There are some management rules that you need to know and strictly apply. These rules will allow you to know when to start and stop a trading system. Thanks to this book, you give yourself the means to create a robust and reliable automated trading system.

You will learn all that you need to know to develop a winner automated trading system in this e-book.

Numerous examples of Prorealtime source codes

Skills required:

  • knowledge of the Prorealtime platform
  • have at least a year’s relevant experience in trading
  • to know a programming language (vba, basic, etc)
Date of publication 2021/04/14
Editor Self-publishing
Format E-BOOK PDF
Number of pages 598

> Satisfied or your money back <

49,00

Category:
(7 customer reviews)
Spread the love

Description

Introduction

Algorithmic trading is a double activity that consists of developing an automated decision-maker to operate the financial market. There are many kinds of algorithmic trading, as order routing on markets places, arbitrage between several markets places, automatic hedging, high-frequency arbitrage, automated analyses of the news, or simply swing or day-trading. In my case, I developpe automated trading systems capable of opening and closing an entry, especially on the major index as the DAX30 index.

What is algorithmic trading?

Why have I chosen to create automated trading systems?

What is the style of trading that I have chosen?

An example of automated building entries

Automated trading expectations

Limitations and possibilities of automatic trading

Differences between automatic systems and autonomous systems
Unadaptability of automatic systems
The problem of the unadaptability to the environment
How to resolve the unadaptability of an automated system?
The extremes “complexity versus simplicity”
The management rules
The global context
The decision-making variables

Why Prorealtime?

The programming language of Prorealtime
Properties of the programming language
ProOrder Autotrading functioning
On which assets can I launch a bot?

 

Handling the Prorealtime platform

In this chapter, I am going to give you a quick overview of the Prorealtime platform. I will show you the different interfaces needed to create an automated trading system. I consider that you are already a user of the Prorealtime platform. Thus, I do not come back on the basics of its functioning. You can find a lot of documentation on the official site web of Prorealtime and the site web of Prorealcode.

Overview of the development environment

Development and test environment
Execution following environment
ProOrder Autotrading window
Opening entries window
Price graphical windows

Create and launch the first test

Create a ProOrder system
Probacktest and Automated Trading
Probacktest & Automated trading editor
Create by programming
Explanation of example code lines
First bloc
Second bloc

 

The great concepts of algorithmic trading

This chapter will take about the concepts that I consider essentials to know before beginning to develop an automated trading system. The purpose of this chapter consists of giving you a theoretical basis allowing you to organize your mind and your work.

The three pillars of automatic trading

Efficiency

Definition
Loss of efficiency
Maintain the efficiency of a system
Concept of software engineering

Effectiveness

Definition of the effectiveness
Complexity
Classes of complexities
Reduction of dimensionality
Reduce the dimensionality thanks to the booleans
The principal component analysis
Conclusion about the dimensionality reducing
Reduction of the granularity
The Monté-Carlo algorithm
Alpha-Beta pruning
Effectiveness and complexity – For further
The “ideal” number of technical indicators
Effectiveness and complexity synthesis

Performance

Definition
Involve the risk with the performance
Sharpe ratio
Be careful to the latent volatility
Conclusion

Risk management and integration

Risks related to the automated trading system
Exposure to the financial risk
Financial Risk integration
Example of risk integration

Trading and Gambling

The heads or tails game
Heads or tails game without fees
The heads or tails game with fees
The roulette gamble
Roulette gamble without the green color
The Martingale roulette gamble with the green color
Conclusions
The transaction cost
The risk by transaction
The spread/expected gain ratio

Strategy versus Tactic

Definitions

Strategy
Tactic

Strategical approach

Arbitrage opportunity
Big guys versus little traders
The actions of algorithms and robots
The target prices
The trading strategy cycles
My strategical approach
Conclusions

Tactical approach

Zero-sum games
Von Neumann Minimax theorem
MiniMax Algorithm
Is trading is a zero-sum game?
Why the tactical approach?
Should the strategy approach be rejected?
Tactic and strategy meshing
My tactical approach

Your two firsts tactical choices

1. Choice of your broker
2. Thin market versus thick market

The five activities of algorithmic trading

I. Automated systems design
II. Unitary tests and development
III. Backtest and validation
IV. Production launching
V. Automated system management

Creation cycle of an automated trading system

Research and development

Trading strategy research

Decision tree
Algorithm of chartist recognition
The conception cycle

Model of conception

The Cascade model
The V cycle model

I. Automated trading system conception

We have now come to the first step to build an automated trading system. This step will take the first time to translate the initial idea into a clear language without ambiguity. In a second time, we have to translate the strategy into a more technical language. That will facilitate the programming stage and will avoid the risk of programming errors. This step is essential because the choices you make now will have a great impact on all the life of your project.

General conception

Description of the strategy
Decisional description
Functional description
Management rules description

Example of a general conception

Bolinger bands tightening buying
Decisional description
Functional description
Management rules description

Detailed conception

Pseudo-code example
Explanation of the algorithm

II. Development of an automated trading system

Now, we will start the automated trading system programming. To begin, you have to create a ProOrder system on the ProRealTime platform. (see the “Create and launch the first test” chapter) This chapter aims to give you all that you need to develop a complete automated trading system.

1. Integrate the transaction cost

DAX spread table
IG Market spread

2. Global architecture of the system

Parameters and initialization
Entries opening
Opened entries management
Emergency stop

3. Parameters and initialization of the variables

Definition of the parameters

PRELOADBARS
CUMULATEORDERS
FLATBEFORE and FLATAFTER
Management of the time frame
Choice of the time frame
Multi time frame
Rebuild a superior time frame
The tick-by-tick mode
Tick-by-tick mode and reliability of a backtest

Perception and vision of the market

Human perception
Market perception by a system

Define an economic and market calendar

Market trading hours
Market trading days
Vacancy and closed market days
Particular days
Saturday and Sunday cases
Create a “calendar condition”
Central bank days
Wallstreet opening

Limit the number of openings by day

Source code to limit the maximal number of opening by a day
Source code explanations
The ideal number of entries by day

Initialization and reinitialization of the variables

INTRADAYBARINDEX
Undefined initialization
key takeaways about initialization

4. The types of markets

Identify the type of the market

The six types of markets
End of the trend and acceleration
Choose a type of market

Measure the market trend

Trend indicator slope
Moving average
Linear regression
Linear regression versus Moving average
Quadratic regression
“Smoothing – lag” adjustment of the technical indicators
The three technical configurations generating errors
Eliminate the false signals thanks to the smoothing
The Smoothing/lag ratio
Avoid the false signals thanks to the standard-deviations

Reflexion on the linear and polynomial regressions

Example of bullish trend market detection

Source code to recognize a bullish market
Interpretation of the result

Measurement of the market volatility

Measurement of the historical volatility
Implicit volatility

Market characteristics of the raw materials

Supply and demand balance
The seasonality
The storage capacities
Conclusions of raw materials

Measure the acceleration of the market

Measuring price direction
Measuring price acceleration

5. Open an entry

Configure the stop-loss and the target

Static positioning of the stop-loss and the target
Dynamic setting of the stop-loss and the target
The Grid algorithms
Algorithm of stop-loss range adjustment
My personal choice about stop-loss and target positioning

Opening entry instructions

Structure of the opening entry instruction
Open a long or short entry
Number of contracts by order
The types of entry opening orders
Trigger range orders
The validity period of the LIMIT and STOP orders
The time between two entries

Entry status of your trading system

How to use the entry state variables?

Entry opening conditions

Market conditions
Conditions of your trading strategy

6. Manage an opened entry

Stop-loss and target initialization

The four types of stop-losses
The four types of targets
Example of stop-loss and target positioning

Stop-loss and target management

Modification of the stop-loss and the target
Inactivation of stop-loss and target
Trailing stop-loss

Program a trailing stop-loss

The two type of trailing stop-loss
Trailing stop algorithm

Reinitialization of the variables

Loss of efficiency risk
Unexpected entry opening risk
Create a reset block

Target overwriting

Chose a moving average as a target

Algorithm of the Hundreds

The indicator of the hundreds
Algorithm of the rounded price detection
Choose the hundred as a target

Monthly pivot

Multi-timeframe monthly pivots settings

Profit securing algorithm

Needed variables to the profit securing algorithm
Management and adjustment of the STOP order

Replace the target with a stop order

Additional conditions to start the profit securing
Algorithm of the conditional activation of the stop selling
Enrich the algorithm of the stop selling order activation

7. Emergency stop of a trading system

The QUIT instruction

Warning on the QUIT instruction
Example of a QUIT instruction

When to stop a trading system?

Stop due to excessive volatility
Stop due to breakout of support
Stop due to excessive losses

III. Analysis of the backtests

The backtest analysis is one of the most important activities about automated trading system development. If you have a little experience in developing trading systems using Prorealtime, you may be already noted that finding a winner trading strategy is finally easy. The real difficulty is to find a strategy that will continue to make profits in the future. In this chapter, I will present the concepts, and the methods that I believe are necessary to find a trading strategy giving a stable result over time.

Launch a backtest on Prorealtime

Reading of a backtest result

Detailed report
The analysis metrics of a backtest
Gains and losses
Distribution of the trades
Times
Advanced widgets

Measure the efficiency of a trading system

Identify the common denominator

Is your trading system is over-optimized?

The two main risks of over-optimization
Example of over-optimization by an excessive precision
Example of over-optimization by an error of generalization

Evaluate the robustness of trading strategy at first glance

Global standard-deviation of your strategy

Too large standard deviation
Acceptable standard deviation

Earnings distribution

Too concentrated earnings distribution
Dispersed earnings distribution

The measure of Tracking Error

Tracking error of a strategy

The profit/loss ratio

Too low profit/loss ratio
Consequences of a too low profit/loss ratio

Profit securing

Time in the market

Standard-deviation of time in the market
The increasing of the time in the market

Duration of latent loss

Summary about the first visual controls

The stress-tests

Spread increase

How to conduct this stress test?
Simulation of spread increasing
Simulation running with Python
Simulation of spread increasing on Probacktest
Over-fitted strategy behavior
Under-fitted strategy behavior
Summary of spread increasing simulations and tests

Trigger stop loss by a single point

Why do this test?
Method of the test
Generalization of this methodology
Trigger stop-loss summary

Simulate the back to heads or tails

The example of an asymmetrical strategy
Back to heads or tails of an asymmetrical strategy
The example of the symmetrical strategy
Back to heads or tails of a symmetrical strategy
Make your simulations thanks to Python
Conclusion about back to heads or tails test

Series of losses and worst possible case

Estimate the series of losses cost
Worst possible case simulation

Flash crash simulation

USD/CHF Flash crash of 2015/01/15 :
Stress-tests summary

Optimization of the variables

Optimizer of the variable functioning

Launch the optimizer of the variables

Open the window of the optimizer
Optimizer window

Optimize a variable

Add a variable to the optimizer
Configure the interval and the step
Run the optimizer
Reading the result of the optimizer
Optimization of the variables and tick-by-tick mode
Sort the result of the optimizer
Deeping the interval of values

The orphan values

How to know if a value is orphan?
Conclusion

The Gradient Descent algorithm

Concepts and definitions

Definition of the Gradient-Descent algorithm
Convex and non-convex functions
The Cost of error
Minimum
The cost function

Why use the Gradient-Descent algorithm?

How to use the Gradient Descent algorithm?

Evolution of the gains
The gain curve
Concave adjustment of the result using Excel
Create a chart thanks to Excel
Localize the global maximum
Choose a value

The limits of the Gradient Descent algorithm

The displacement of the minimums and the maximums
Summary about the Gradient Descent algorithm

Walk-Forward Optimization

Concepts and definitions

What about the Walk-Forward Optimization?
Temporal series
Training set
Test set
Walk-Forward Efficiency

Run a Walk-Forward Optimization

Activate the Walk-Forward
First result of the Walk-Forward optimization
First interpretation of the result
Second Walk-Forward optimization
Second result of the Walk-Forward optimization
Second interpretation of the result
Unique event cancellation
Third interpretation of the result

Interpretation of the Walk-Forward optimization result

Comparison of the standard-deviation

The limits of the Walk-Forward optimization

Summary about the Walk-Forward optimization

Stochastic modeling

Concepts and definitions

Definition of the stochastic test
Purpose of the stochastic test

Application of the test on Prorealtime

Back to the spread increase test
How to process stochastic modeling on Prorealtime?
Validation requirements of the test
What are we trying to find?

Unitary test of stochastic modeling

Initial problematic
The unitary stochastic modeling goal
Unitary test running
Interpretation of the result

Global Stochastic modeling test

Global Stochastic modeling test goal
Global test running
Result of the global stochastic modeling test
Interpretation of the result

Generalization of the stochastic modeling

The limitations of the stochastic modeling

Conclusion about the stochastic modeling

GD-SM Optimization model

Presentation of the GD-SM model

Definition of the GD-SM optimization
Why use the GD-SM optimization?
Application of the classical model to the financial market

Functioning of the GD-SM modeling

1. Selection of the possible values
2. Validation of possible values
The limits of the GD-SM

Summary about the GD-SM optimization

Entry opening after the entry point

Entry opening delayed
Backtest the delay of a trading strategy
Result of the delay backtest
Interpretation of the result

Build a position

Why build a position?
How to build a position?
Why separate your systems to build a position?
The rules to build a position
1. Choose an appropriate strategy
2. Define an opening range
3. Recheck the market conditions
Source code to build a position
Example of position building
Explanation of the source code
Example of a built position

Efficiency environment

Concept and definition
Limit the risk of uncertainty
The equation of the efficient environment
The voluntary under-optimization of the system
Management of trading systems

Controls of the strategic choices

Exposition to the financial risks
Long or short only
The chosen type of market
Operated asset
The market calendar
The limitation to the known market
Normal functioning of the market
The example of the standard error
Closed or broken markets
Quotation problems
Null or very few volumes
Detect the without body candles

Is my trading strategy becoming obsolete?

The cycle of a trading strategy
The obsolescence signs
The increase of the time in the market
The increase of the time in latent loss
The increase of the variance of the return
The spread increase retest
The stop-loss too near to a support
The market dangerously comes near your stop-loss

Acceptance tests of the automated trading systems

The acceptance recipe
Example of an acceptance recipe
Acceptance recipe of the overfitting risk management

Backtest summary

The more probable behavior of a trading system
The trick to save money and time

IV. The Production launching

The production launching is the last step after the acceptance of your automated trading system. This activity consists of putting your trading system in an execution environment. After that, your robot will operate the market buying and selling entries. This step is simple, but it includes some controls named “prerequisite validation”.

The production launching steps

I. The validation of the prerequisites
1. Validation of the acceptation
2. Automated trading preferences
3. Details of the trading system
4. Risk management
II. The production launching
1. Relaunch a backtest
2. Send the trading system to ProOrder
3. Start the robot
4. Confirm the launch

The minutes of the production launching

Example of production launching minutes
Activation and verification after production launching

V. Management of the automated trading systems

Unfortunately, hold an automated trading system does not mean that there is nothing you can do about it after the product launching. As I said at the beginning of this book, automated trading systems are not autonomous. Consequently, several measures need to be taken to guarantee the proper functioning of your set of trading systems. In this chapter, I will show you how to manage an automated trading system. I will take about the opened entry monitoring, incidents management, and continuous auditing of the trading system efficiency.

Opened entry monitoring

Create a specific interface dedicated to the entry monitoring
The ProOrder AutoTrading window
Opened entries window
Price charts
My dedicated interface to the system management interface
Manually regain an entry
Why manually regain an entry?
How to manually regain an opened entry?
Crash of an automated trading system

Manage the technical incidents

The different types of incidents
What to do in case of quotation failure?
Prepare your action plan
Quotation failure from a marketplace
Quotation failure of derivatives
What to do in case of trading safeguards activation?
Exploding of the spread
What to do in case of network failure?
Have a second network connection
Contact the customer service
What to do in case of an automated trading system crash?
Infrastructure monitoring
IG trading platform status
Marketplace status

The continual checking of the trading system efficiency

The continued test running
Entry analysis
Know the not managed and not tested events

Strategy management using z-score

Management methods of trading systems
The series of losses risk
Description of the decision model
Calculation and measure of the z-score
Calculation of the z-score in Excel
Z-score management rules
Remind about the z-score interpretation
Decision threshold to stop a strategy
Management rule to stop a strategy
Management rule to stop a strategy
Management rule to start a new strategy
Example of the application of the z-score on a real account
The limits of the z-score using

Overall conclusions

References and Bibliography

Annex

Source code to find a trading strategy

Source code to four technical indicators
Source code to five technical indicators

7 reviews for Automated trading using Prorealtime – ebook

  1. Christer Hedman

    Wow! I’ve just read the table of contents… it’s really impressive! It looks like a really good introduction to automated trading. How many hours have you worked on the book?

    This looks like an awesome new book about automated trading using Prorealtime from @ArtificallCom. Check out the table of contents. Both scope and depth looks really impressive.

    I bought your book now. Looking forward to read it and add some of your knowledge and insights to my own.

    • Vivien Schmitt

      Hi Christer,

      Thank you for purchasing and for your comment 🙂
      I spent a complete year writing and translate this ebook. It was tough but a great experience.

      Thank you once again 🙂

  2. Traderherz

    Congrats to Vivien from for publishing the english version of his ebook about automated trading!

    Good, good work Vivien! Congratulations!!

  3. ProRealAlgos

    Looking to learn more about automated trading with a starting point in the
    @ProRealTime trading software?

    There are things to learn for both beginners aswell as experienced developers in this e-book.

    Written by Vivien @ArtificallCom, a big contributor to the community!

  4. Mattias Hansson

    Just bought it. Looking forward to have a look through it The coming week

  5. RoboFuturesTrdr

    Grabbed a copy and its looking great

    Ruark Baker

  6. Peter

    The prorealtime programming guide doesn’t explain in detail how the code works. This book fill in some gaps and has quite a few examples and ideas. It has paid for itself quickly just on use of the ‘QUIT’ instruction alone. I am finding it very helpful.

  7. Olivier T.

    This book is impressive: it combines multiple disciplines such software engineering, math, trading of course…
    it is very clear with simple to understand. Congratulations to the author!

Only logged in customers who have purchased this product may leave a review.