How to do backtesting in Zerodha?

  • Asked By
  • Updated On:
    22-Jun-2022
  • Replies:
    1

Short Answer

Zerodha is India’s number one broker in terms of active clients and also by trading volume. Zerodha offers many platforms to its clients to trade on. ‘Zerodha Pi’ is one of Zerodha's most advanced platforms that allows you to backtest and create various Algo strategies.

Detailed Answer

Zerodha is India’s largest and most trusted stockbroker with over 6+ million clients. Zerodha offers many platforms for trading such as Zerodha web browser, Zerodha Kite, Zerodha Pi, etc.

All these platforms have unique features. The web browser of Zerodha offers all the features to consumers including access to the back office. At this place, you can get comprehensive reports of your trades and Profit and loss statements.

Kite by Zerodha is the best mobile application in the market as of now. It makes a great platform for traders who want to trade on the go. Similarly, the Pi is a more advanced and complex platform offered by Zerodha. Pi is not for beginners as it runs on a separate platform (NEST). Here you can implement ALGO trading, Backtest and Create strategies, and many more.

How to Backtest in Zerodha Pi?

The Pi is an advanced platform offered by Zerodha to all its clients. Pi has some distinctive features such as advanced charting, Algo trading, Strategies backtesting, etc. Let’s see how to backtest strategies on Pi:

Before backtesting in Pi, you will have to code the transcript on which the trade will take place. The entry and exit criteria have to be coded separately before you start the backtest.

  1. Open your Pi terminal. Go to ‘Alerts’ and click on ‘backtesting.’ After you have clicked on ‘Back Test’, a new window will open.
  1. In the next window, select the script under ‘Select Symbol’ (Stock/Index) on which you want to run your backtest. After that under ‘Periodicity’, enter the time frame on which you want to test this strategy on. For example min, hours, days, etc.

Then select the candle time frame under the ‘Bar Interval’.For example 1 min, 15 min, etc.

After this, add the total historic time frame on which you want to test your strategy under ‘Days’. Example- 5 days, 2 days.

  1. When you have successfully populated all the necessary criteria fields, you need to add the Code that you have made. Select the ‘Buy Script Tab’ and paste the code for the “Entry Strategy”. Paste the exit code in the ‘Exit Long Script tab’. Make sure that this is a long (Buying) strategy or else this would not work.
  1. After this click on the ‘backtest’ button to begin the backtesting process. Once the system completes the backtesting process, the result of the same will be displayed on the right side of the same screen.

With this, you can backtest any of your strategies using Zerodha Pi. If you don’t know how to code, then there are many pre-existing templates that you can choose from. Click on this link to find out a range of strategies https://zerodha.com/expert-advisors/ . You can choose any one of these and implement it on your own backtesting strategy.

Tagged With: ZerodhaOptions TradingBacktestingAlgo TradingZerodha PiIntraday trading
Ask Your Query for FREE, Get quick answers from our FINTRAKK community!
Discussion (0)
Related FAQs
As a beginner, Which is better platform Sensibull or Opstra for Option Traders? I want to start option trading but have no idea which is best?

If you're looking for a straightforward and comprehensive take on options trading, then Sensibull should do the job perfectly. However, if you're and expert and want more complex trading tools, then Opstra is the one to choose.

Which is a better platform Sensibull or Opstra for Options trading?

In this current day and age, options trading has become the new cool thing that everyone wants to try. There are many option trading platforms out there that provide various Option trading tools. Sensibull and Opstra Definege are 2 of the most prominent names in the industry.

Both of them provide all the necessary tools like OI (Open Interest) Charts, PCR (Put-call Ratio), IV (Implied Volatility) chart, etc. But the main question lies, which one of them is a better platform for Options trading. Let's find the answer to that question.

How to withdraw money from Zerodha Trading Account?

To withdraw money from your Zerodha trading account, you need to place a withdrawal request by logging into Zerodha Console. Withdrawal of money is completely free. As per regulations, the withdrawal money will be credited only to the bank account which is mapped with Zerodha.

How to create strategy in Zerodha Streak?

Head into your Zerodha Streak account, then click on the create option, following which enter all the fields of your choice. Click on the finish button to execute the scrips in your trading strategy.

How to use stop loss in Zerodha?

Putting Stop losses for any position is an essential step to ensure that no major losses occur if the view on the underlying goes wrong. You should always place a Stop Loss when trading Intraday or positional. You can use a stop loss in Zerodha by following some easy steps.

What is MIS and CNC in Zerodha? Product Codes Explained

You might have come across these product codes: MIS and CNC. Ever wondered, what they mean? Here you'll learn what is MIS and CNC in context to stock trading in context to Zerodha and other stock brokers in general.

Which is the best stock broker for beginners in India?

Discount brokers have gained a lot of popularity in the past couple of years. Zerodha is currently India's largest and most trusted discount broker which is also the best option for beginners. It has all the necessary qualities required for a good broker like low commissions, low-maintenance charges, high-quality trading terminal, etc.

Is Streak free for Zerodha users?

Streak is an online Options trading and Algo trading platform introduced by Zerodha in 2018. it was Free at the time of launch to Zerodha users but that was a limited-time offer and soon Streak started charging for subscriptions also for Zerodha users. But Zerodha users get a 7 day free trial period on Streak posy which one will have to choose a plan as per their needs to continue using Streak.

Is Paytm Money better than Zerodha?

You wish to know if Paytm Money is better that Zerodha or it's the other way round. Zerodha being a leading discount broker in India has been there for overe a decade now. While Paytm Money already established in mutual fund investment arena, but a fairly new entrant in stock broking industry. So, let's compare the features and discuss few details on each of them.

What is Bracket Order (BO) in Zerodha? How to Use them?

Trading in the stock market is a pretentious task given the ups and downs it brings to the table. But for traders, brokerage firms have made life simpler and more comfortable to execute relevant trades more straightforwardly. For the same, we have Bracket Orders (BO) from leading stock brokers like Zerodha that helps in keeping a constant tab on the selling and buying of stocks on pre-determined specifications.