Algo trading: How to get started building an algorithmic trading system in 2022?
Automated trading or Algo trading is becoming more popular nowadays in India as brokers started giving their APIs to handle the trading operations by the support of coding scripts like python, AmiBroker, etc, and also there are plenty of other options through which a trader can connect their trading systems or strategies to their broker’s terminal by using API Bridges.
Before you become an algo trader, you must have a trading system that has defined rules, I call it a RULE-BASED TRADING SYSTEM.
A rule-based trading system has strictly defined rules for all components of the trade. The basic rules cover entry criteria, position-sizing, maximum trade risk, trade management, and exit criteria.
This blog will help you to understand how to create a rule-based system that works by 5 step process.
Step 1: Understand Your Personality & Psychology
This is the most important step to understand, so read it completely.
Many new traders think they don't have to worry about their personality because they just have to follow the rules of a system and they will make money. But the most important aspect of successful trading is “YOU”, It’s not just the working strategy that helps you to make money, but how you react to the result of the system has a lot many things to do with consistent execution of the trading system.
Even if you have defined rules, you still have to consider how you will react to the results of the trading system.
You could have a highly profitable trading system, but if you cannot tolerate certain aspects of the system, sooner or later you will give up on it.
Let's take a look at the primary elements that you should be aware of.
What Are Your Goals?
The first thing you should consider is your goals of TRADING.
Do you want to multiply a small account? Or do you want to make a steady income on a larger account?
These are very important questions to ask yourself when you are getting started.
Your answer to this question will determine the type of system you will create.
Some traders want to make 1,000% in a year (yes, they are so serious). But in reality, consistent returns of 30% a year, with a decent-sized account would be more than enough to meet the trader desire (with a lot less stress 🙃 ).
So let's take a realistic look at what you really want to get out of your trading & the strategy that you want to execute.
Write down your goals (Take a pen and note down, this is a powerful way of doing it) in your trading plan.
Understanding the maximum drawdown of your system is the most important step in trading. A lot of traders want to make big money. But big profits usually come with big drawdowns.
Risk is directly proportional to REWARD!
Can you handle this DRAWDOWN?
Some traders can handle it!
However, in my experience, most traders can't.
So pay attention to your drawdown numbers. A 30% drawdown might not be a big deal when you are trading on paper. But psychology can change dramatically when real money is on the table!
You may find that you are willing to tolerate a higher or lower drawdown than you expected. That's why it's important to test different types of trading systems to find out what works best for you.
Next, it's important to understand how frequently your strategy trades and how you feel about that frequency.
For example, let's say that your strategy only executes a few trades a month. But when it does trade, there's a high probability of success and you usually have a few big winners because you trail your stop loss.
That sounds awesome, right?
Well, that actually sounds terrible to some traders. These traders get bored easily and want to be trading more frequently.
The opposite can also be true.
If a system executes too many trades, some traders get stressed out about having to trade all the time or having too many trades open at once.
So take some time to consider your optimal trading frequency.
It's not the same for everyone.
Are you the type of trader who likes to see a high win rate? Or do you prefer to win less often, but have a higher rewards system?
Personally, I trade the BANKNIFTY Intraday system which has a 45–50% win Percentage and I have seen 12 consecutive losses in this system! (Below are the details of the system)
EQUITY CURVE OF THIS SYSTEM FOR THE LAST 11 YEARS
So, Can you handle 8–15 consecutive losing trades in a row (or more) before you get a winner?
Or would you rather only make a small profit, but win 75% of the time?
Both methods are profitable.
There is nothing as to right or wrong answers here.
It's all about what you are most comfortable with.
Again, experiment with both to see what you prefer.
Fully Automated, Manual, or Both?
The mechanics of how you enter and exit trades can make a big difference in your trading results.
For example, if your trading system has to be automated in order to be profitable, but you don't know how to program an automated trading strategy, then that strategy won't work for you.
But there is always a scope to learn new things, I started learning AMIBROKER from completely zero-knowledge, It was really hard for a mechanical person like me to understand coding, but today I am able to automate my trading systems and I am able to place orders within seconds, you know, hard work always pays off 😊.
On the other hand, maybe you don't trust an automated system and would prefer to manage trades yourself. If that's the case, then be sure that you will be able to trade at the times when your trades usually shows up.
Step 2: Create a Trading Plan.
The next step is to write down your trading rules.
There is no single profitable business without a proper execution plan, the trading plan ensures that you have a solid reference point from which to make all of your trading decisions.
Use any recording method that works for you, personally, I've found that google docs, Notion and GitHub are best for me to take notes and maintain records and codes. It's just easier to take notes and change things during the development process and the autosave feature is simply awesome.
When I get an idea, I note it down so I don't forget it. Then I can come back to it later to develop the idea.
A good trading plan should have the following considerations:
Trading system name
Indicators or patterns used, with settings
Position Sizing or Risk Management Rules
Trailing SL Rules
Will this be traded manual, fully automated, or a little of both?
There may be other elements that you want to add later, but that list is a good start.
Now it's time to ask a question that “How do you know if a trading strategy will give you an advantage in the markets or has a positive expectancy?”
That's when the role of backtesting comes into the picture!
Let's move to the next step:)
Step 3: Backtest Your Trading Rules.
it's time to test your rules so you are confident that they will work in real-world trading.
There are different ways to backtest and the best method for you will depend on the type of strategy you have.
For example, if you have a fully automated strategy, you may consider testing in something like AmiBroker or Python.
If you have a manually executed strategy you need to take the historical data and upload it in Amibroker then test manually by seeing the charts or BarReplaying in the Amibroker (I have uploaded a video on my YouTube channel NATARAJ MALAVADE on Bar Reply backtesting and find that video below.
Your backtesting will give you some key pieces of information:
Calmar ratio. etc.
If a backtesting platform doesn't give you some of this data, you can always export it to an excel sheet to figure it out.
Don't expect to hit the jackpot on the first try. A successful backtesting result is almost always the result of many, many experiments😊.
Successful traders make small tweaks to a strategy and test the results. Remember to only change one thing at a time and test that change.
Otherwise, you won't know which changes worked and which ones didn't.
Once you have a strategy that hits your goals, you are ready to move on 😃.
Step 4: Forward Test Your Rules or Paper Trading.
After you have tested your strategies and are confident in the results, don't Directly jump into live trading just yet. There's one more step to do before you start the real adventure.
This is called paper trading or forward testing.
You don't want to jump directly into live trading because there are still a few things that you may need to work out.
For example, if you have a fully automated trading strategy that runs on AmiBroker, you should definitely test it in a demo account with the broker that you intend to trade live with.
So run this forward test for at least one to three months to ensure that there aren't any other hidden issues with your trading system. Once you are confident that it works as you expected, now it's time to go live!🤑
Step 5: Live Trading.
It's time to put your system into action. I would recommend starting out with a small account or using a smaller amount of risk in the beginning (Don't trade FNO anything lesser than 3lakh capital).
There may still be a few unforeseen differences between your real results and Paper trading.
But if it's all good, then let your strategy work for you:)
Remember to track your trades in a TRADING JOURNAL. This is as important as real trading. Journal will help you to review the results frequently.
Don't change or tweak anything about the system rules until at least you have completed 100 trades in the terminal. It can be tempting to start to mess with the system if it isn't winning right away!.
Resist the urge because you may just be in a normal drawdown. You need to give the time for your system to work for you.
A rule-based trading strategy will not take all of the emotion out of trading (as switching ON the algo is still a manual intervention). For some traders, a very strict trading system can actually lead to more losses because they are not free to take all opportunities that come along.
But for traders who can be indecisive about trading decisions, or prefer to minimize the effect of their emotions, strict rules can be a great way to trade.
I hope This Blog helped you. If so kindly LIKE & SHARE and if you have any questions, kindly let me know in the comments. Most importantly register to my website by using the top-right button SIGNUP or log in to get immediate notifications via mail when I post new articles.
Happy Trading 😎
Twitter:https://buff.ly/39LmQqD | YouTube: https://bit.ly/3j5tvkh | Blog:https://buff.ly/33LZZYm | Book:https://buff.ly/2RR4UAU | Online Courses:https://buff.ly/2Kywmmm | Quora:https://buff.ly/3qrluY0