The bearmarket period that I want to test:
Black Monday: Sep.87 Nov.87
Asian Crisis: Jul.97 Jan.98
Russian Debt Default: jul.98 Oct 1998
Dotcom Crash: Mar.00 Oct 2002
Subprime Crisis: Nov.07 Mar.09
COVID-19 Start: Jan.20 Mar.20
Im trying to test this using using: ((Close (BarsSince (20000301) - 1) and Close (BarsSince (20021001) - 1))) or ((Close (BarsSince (20071101)) - 1) and Close (BarsSince ( 20090301))) // DOTCOM SubPrime
However, it appears that it merely moves the start time of the backtest, which is not what.
I want the strategy to test the period between the different dates.
There is an easier way to accomplish this. Go to Research - Lists - Exposure Lists. Create an exposure list containing the date ranges that you want to be out of the market. Then select this exposure list on the Period & Restrictions page of the simulation and rerun the simulation.
Thank you, danparquette, however I don’t have access to simulation, only to the screen. As far as I can tell, the Exposure list can only be used in conjunction with simulation.
If you want the screen backtest to invest only in those bear periods, then you could rules like these:
Between(DaysSince(19900101),DaysDiff(19900101,20200101),DaysDiff(19900101,20200301))
Between(DaysSince(19900101),DaysDiff(19900101,20071101),DaysDiff(19900101,20090301))
Between(DaysSince(19900101),DaysDiff(19900101,20000301),DaysDiff(19900101,20021001))
These cover your first 3 periods. I used the 1st of each month, so adjust the dates as needed.
You could put all 3 of these in one rule with “OR” between them. Or enter them as 3 rules and set the 2nd and 3rd rules as ‘OR’ in the screener. You do that by clicking on ‘AND’ to flip it to ‘OR’. Maybe somebody else has a my elegant way to do this, but this will work.