- ago
When optimizing the qualifier "within the past N bars", I noticed the following problem. I have performed an optimization with the following exit parameters:



The best result gives 15 bars in the qualifier. However, the exit in the following block takes place after 10 bars. If I change the qualifier to 14 bars, which is still after the 10 bars of the lower block, the result in the backtest also changes. My understanding of the qualifier is that it goes back the set bars from the last day. However, if this were the case, the result in the backtesting in this specific example should not change, as the entire maximum period of 10 days (the lower block) would always have to be covered. As I understand it, it should also be possible to omit the qualifier when entering a value greater than 9, as the entire period would be covered in both cases. However, this is not the case, as the result in the backtest is different even if the qualifier is omitted. Am I misunderstanding the logic of the qualifier or is the problem somewhere else? Is anyone familiar with this and can help me?
0
682
Solved
6 Replies

Reply

Bookmark

Sort
Glitch8
 ( 11.64% )
- ago
#1
Are you sure the result of the backtest is not changing every time you run it due to NSF positions?
0
- ago
#2
I'm not sure what NFS Positions could have to do with it. In my understanding, if I run the backtest in this example with 15 days in the qualifier, the result should be the same as if I take 14 days or leave out the qualifier. Or am I missing something?
0
Glitch8
 ( 11.64% )
- ago
#3
ANY backtest can produce different results if there are NSF positions. Just run your backtest several times, do the results change? If so then you have NSF positions.

https://www.youtube.com/watch?v=HXA-AetQ3Jk
0
- ago
#4
OK, now I've understood what you mean. No, the backtesting result always remains the same (a transaction weight is included in the strategy). Only when I change from 15 to 14 does the backtesting result change.
0
Glitch8
 ( 11.64% )
- ago
#5
I see the issue, the Block is still considering the index even if it occurs before the entry bar! I'll handle this at the WL8 level so it will work properly for B82 without a need to update the Power Pack.
1
Best Answer
- ago
#6
Great, thank you very much for your help!
0

Reply

Bookmark

Sort