Skip to main content

Running a Simulation

To start a simulation, go to the simulator section and click on the "Simulator" button, as depicted in the image below on AlgoTest.

Please take note of the following text:

Now, select the date on which we want to simulate our strategy. In our case, we want to simulate on budget day, i.e., 1st Feb 2024. So, we will select 01 Feb 2024 in the time period option, as we have learned in section 3.1. Also, select the time at which we want to initiate our iron fly. We will select 09:20 here. You can view the settings as shown in the image below.

It will load the historical LTP data on the option chain for February 1, 2024, at 09:20. Then, we will create an iron fly strategy on the option chain by selling the at-the-money (ATM) call and put options and buying the 3-strike away out-of-the-money (OTM) options, as shown in the image below.

On the right side, you will be able to view the payoff graph and Greeks. These tools will help you analyse your strategy. For example, you will be able to see the maximum profit or loss if the strategy goes in your favour or against it.

Now we have applied our iron fly in the simulator. To simulate our strategy, we have two options: automatic simulation or manual simulation.

Autoplay Feature

The Autoplay feature in the AlgoTest Simulator makes it easier to test trading strategies. It automatically moves through historical data based on the chosen time frame. Once you set up a strategy and select a time period, you can use the Auto Play function to start the simulation. The feature progresses through each minute, carrying out the strategy's trades using historical market conditions. You can adjust the playback speed to watch the strategy's performance in real time or faster. This continuous playback lets traders efficiently analyse how their strategies would have performed over extended periods without going through each day manually. Throughout the simulation, important performance measurements and visualisations are updated in real time, providing immediate feedback and insights.

To use this feature, simply select the playback speed by clicking on the arrow icon at your desired speed for auto-running the simulations, as shown in the image below.

Assume we want to adjust the speed so that it moves 5 minutes forward every 1 second. We will select 5 minutes per second as shown in the image below.

Click on the Autoplay button to run the simulation, as shown in the image below.

Now you can see that the simulation has started and is advancing 5 minutes every 1 second. In the image below, you can see that it has moved from 09:20 to 09:25 in 1 second, and our total profit (MTM) has reached 113.

Moving forward, after 1 second, it has advanced from 09:25 to 09:30, and our total MTM has now reached 194.

We can pause or unpause the autoplay to analyse our strategy during the simulation by clicking on the "play" and "autoplay" buttons, as illustrated in the image below.

This feature allows for continuous simulation and testing of your strategy on historical data until you decide to pause the simulation. It is particularly helpful for users who wish to automate the simulation process and avoid manually clicking forward step by step.

Manual Simulation

The AlgoTest Simulator includes a Manual Simulation feature, which enables traders to test their strategies step by step using historical data. Traders can set up their strategy and time frame, and then use the manual mode. In this feature, traders have complete control over the simulation, allowing them to move through each minute or specified time interval manually. The simulator continuously updates the strategy's performance metrics and visualisations with each step, providing detailed feedback on how the strategy performs under different market conditions. Traders can pause the simulation to analyse specific trades, adjust parameters, and make informed decisions based on real-time data updates. This mode is helpful for in-depth analysis, allowing traders to scrutinise each trade and understand how the strategy behaves in different scenarios. This detailed approach helps traders understand market dynamics and optimise their trading strategies.

To use this feature, simply select the time you want to move forward or backwards. For example, if we are at the position at 09:20 and want to move to 09:21, we will click on +1m. This will show us the simulation at 09:21.

You can advance the simulation by specific time intervals such as 1 minute, 5 minutes, 30 minutes, 1 hour, or 1 day with just a single manual click. For instance, if you want to move forward by 30 minutes, you can simply click on the "+30 minutes" button, which will move the simulation from 09:21 to 09:51, as depicted in the image below.

One advanced feature provided by the algotest simulator is the ability to drag the time to any point in the day by simply moving the cursor forward, as illustrated in the image below. For example, if we want to move from 09:51 to 11:40, we can do this in one click using this tool.