You can use certain event types in your strategies when backtesting them (or running trading bots). Here are the event types supported in backtesting:
- Analyst Estimates
For the strategy tester, all these events are more like "points in time", so the only thing you can do in your entry or exit criteria is to detect a specific event within a given time range.
NOTE: Backtester uses calendar dates
For all the events above,
in last X days is the preferred condition to use. But please note that this condition operates with calendar days while candles on your charts reflect business days. When the events (like Analyst Estimates releases) are painted on your charts, they are landed onto a corresponding candle. In case if event happens during a weekend, its label still gets landed onto a candle (Friday or Monday) which does not reflect the calendar day.
Example: if there was an Earnings release on Friday and you want to enter "on a next candle after Earnings report gets released" then you'll have to remember that there were 3 calendar days between Monday's candle and Friday's candle. So you'll have to use
in last 3 days for your Entry condition in this case.
When backtesting for Splits, you can distinguish reverse and direct splits. You can also react to different types of events: i.e., "split declared" or "split executed". You can react to the following cases:
- Split event will happen in X days (these are usually known upfront).
- Split event has happened in last X days.
When backtesting for Earnings, you can only react to dates.
- Earnings release will happen in X days (these are known upfront).
- Earnings release has happened in last X days.
When backtesting for Dividends, you can react to different types of events: i.e., "declaration date" or "ex-date" etc. You can react to the following cases:
- Dividends event will happen in X days (these are known upfront).
- Dividends event has happened in last X days.
Backtesting Analyst Ratings
When backtesting for Analyst Ratings, you can filter a number of parameters:
- Which analyst: "any" or select one.
- What have they done: "any action" or "upgraded rank" or "downgraded rank" or "confirmed rank"
- What is the new rank after this report: "any", or "buy" or "sell" or "hold"
You can only react to cases like "Analyst Rating had been published in last X days" because those kind of dates are never known upfront.